Admin Panel
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-09-29 14:57:37 +07:00
parent 04fbddba13
commit 8c6dad2a31
94 changed files with 4864 additions and 1151 deletions
+1
View File
@@ -2,6 +2,7 @@ export type User = {
id: number;
name: string;
email: string;
role: 'admin' | 'editor';
avatar?: string;
email_verified_at: string | null;
two_factor_enabled?: boolean;
+3
View File
@@ -1,4 +1,5 @@
import type { Auth } from '@/types/auth';
import type { SiteInfo } from '@/types/site';
declare module 'react' {
interface InputHTMLAttributes<T> {
@@ -12,6 +13,8 @@ declare module '@inertiajs/core' {
name: string;
locale: 'id' | 'en';
auth: Auth;
site: SiteInfo;
can: { manageUsers: boolean };
sidebarOpen: boolean;
[key: string]: unknown;
};
+1
View File
@@ -1,3 +1,4 @@
export type * from './auth';
export type * from './navigation';
export type * from './site';
export type * from './ui';
+95
View File
@@ -0,0 +1,95 @@
export type ProjectSector = 'government' | 'private' | 'soe';
/** Long-running programs highlighted as featured case studies. */
export type ProjectProgram = 'price-monitoring' | 'investment' | 'erp';
/** A portfolio entry, as stored in the `projects` table. */
export type Project = {
id: number;
title: string;
client: string;
year: number;
sector: ProjectSector;
program: ProjectProgram | null;
/** Optional detail of what the project covered. */
scope: string | null;
};
export type Office = {
id: number;
name: string;
icon: string;
building: string;
street: string;
area: string;
city: string;
district: string;
phone: string;
maps_url: string | null;
sort_order: number;
};
export type SiteContact = {
phone: string;
whatsapp: string;
email_busdev: string;
email_support: string;
};
/** Editable company details shared with every page (see `SiteInfo`). */
export type SiteInfo = {
contact: SiteContact;
offices: Office[];
};
export type ConsultationStatus = 'new' | 'contacted' | 'closed';
export type Consultation = {
id: number;
source: 'home' | 'services' | 'contact';
name: string;
company: string | null;
job_title: string | null;
email: string;
phone: string;
industry: string | null;
service: string | null;
timeline: string | null;
details: string | null;
nda_agreed: boolean;
locale: 'id' | 'en';
status: ConsultationStatus;
admin_notes: string | null;
created_at: string;
};
export type Testimonial = {
id: number;
quote_id: string;
quote_en: string;
role_id: string;
role_en: string;
organization_id: string;
organization_en: string;
is_published: boolean;
sort_order: number;
};
/** A testimonial in the visitor's language, as sent to the site. */
export type LocalizedTestimonial = {
id: number;
quote: string;
role: string;
organization: string;
};
export type UserRole = 'admin' | 'editor';
export type Paginated<T> = {
data: T[];
current_page: number;
last_page: number;
total: number;
prev_page_url: string | null;
next_page_url: string | null;
};