@enyxs/wikex-components 0.11.25 → 0.11.27

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,16 @@
1
+ /* src/shared/rich-text.css */
2
+ .wikex-cms-text-link[href],
3
+ a[data-cms-text-rendered=true][href] {
4
+ transition: opacity 200ms ease;
5
+ }
6
+ .wikex-cms-text-link[href]:hover,
7
+ a[data-cms-text-rendered=true][href]:hover {
8
+ opacity: 0.75;
9
+ }
10
+ @media (prefers-reduced-motion: reduce) {
11
+ .wikex-cms-text-link[href],
12
+ a[data-cms-text-rendered=true][href] {
13
+ transition: none;
14
+ }
15
+ }
16
+ /*# sourceMappingURL=chrome-model.css.map */
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../src/shared/rich-text.css"],"sourcesContent":[".wikex-cms-text-link[href],\na[data-cms-text-rendered=\"true\"][href] {\n transition: opacity 200ms ease;\n}\n\n.wikex-cms-text-link[href]:hover,\na[data-cms-text-rendered=\"true\"][href]:hover {\n opacity: 0.75;\n}\n\n@media (prefers-reduced-motion: reduce) {\n .wikex-cms-text-link[href],\n a[data-cms-text-rendered=\"true\"][href] {\n transition: none;\n }\n}\n"],"mappings":";AAAA,CAAC,mBAAmB,CAAC;AACrB,CAAC,CAAC,4BAA8B,CAAC;AAC/B,cAAY,QAAQ,MAAM;AAC5B;AAEA,CALC,mBAKmB,CAAC,KAAK;AAC1B,CAAC,CAAC,4BAA8B,CAAC,KAAK;AACpC,WAAS;AACX;AAEA,QAAO,wBAAyB;AAC9B,GAXD,mBAWqB,CAAC;AAAA,EACrB,CAAC,CAAC,4BAA8B,CAAC;AAC/B,gBAAY;AACd;AACF;","names":[]}
@@ -21,20 +21,10 @@ type ConsultationSubmission = {
21
21
  sourcePath: string;
22
22
  website: string;
23
23
  };
24
- declare const consultationStatuses: {
25
- readonly new: "Mới";
26
- readonly contacted: "Đã liên hệ";
27
- readonly completed: "Hoàn tất";
28
- readonly cancelled: "Không tiếp tục";
29
- };
30
- type ConsultationStatus = keyof typeof consultationStatuses;
31
24
  declare const consultationCities: Record<string, string>;
32
25
  declare const consultationCapitals: Record<string, string>;
33
26
  type Consultation = Omit<ConsultationSubmission, 'website' | 'submissionId'> & {
34
27
  id: string;
35
- status: ConsultationStatus;
36
- notes: string;
37
- createdAt: string;
38
28
  updatedAt: string;
39
29
  };
40
30
  type ConsultationList = {
@@ -44,4 +34,4 @@ type ConsultationList = {
44
34
  pageSize: number;
45
35
  };
46
36
 
47
- export { type Consultation, type ConsultationList, type ConsultationStatus, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, consultationStatuses, partnerExperiences, partnerTypes, registrationRegions };
37
+ export { type Consultation, type ConsultationList, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, partnerExperiences, partnerTypes, registrationRegions };
@@ -21,20 +21,10 @@ type ConsultationSubmission = {
21
21
  sourcePath: string;
22
22
  website: string;
23
23
  };
24
- declare const consultationStatuses: {
25
- readonly new: "Mới";
26
- readonly contacted: "Đã liên hệ";
27
- readonly completed: "Hoàn tất";
28
- readonly cancelled: "Không tiếp tục";
29
- };
30
- type ConsultationStatus = keyof typeof consultationStatuses;
31
24
  declare const consultationCities: Record<string, string>;
32
25
  declare const consultationCapitals: Record<string, string>;
33
26
  type Consultation = Omit<ConsultationSubmission, 'website' | 'submissionId'> & {
34
27
  id: string;
35
- status: ConsultationStatus;
36
- notes: string;
37
- createdAt: string;
38
28
  updatedAt: string;
39
29
  };
40
30
  type ConsultationList = {
@@ -44,4 +34,4 @@ type ConsultationList = {
44
34
  pageSize: number;
45
35
  };
46
36
 
47
- export { type Consultation, type ConsultationList, type ConsultationStatus, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, consultationStatuses, partnerExperiences, partnerTypes, registrationRegions };
37
+ export { type Consultation, type ConsultationList, type ConsultationSubmission, type RegistrationKind, consultationCapitals, consultationCities, partnerExperiences, partnerTypes, registrationRegions };
@@ -22,7 +22,6 @@ var consultation_model_exports = {};
22
22
  __export(consultation_model_exports, {
23
23
  consultationCapitals: () => consultationCapitals,
24
24
  consultationCities: () => consultationCities,
25
- consultationStatuses: () => consultationStatuses,
26
25
  partnerExperiences: () => partnerExperiences,
27
26
  partnerTypes: () => partnerTypes,
28
27
  registrationRegions: () => registrationRegions
@@ -38,19 +37,12 @@ var registrationRegions = {
38
37
  };
39
38
  var partnerTypes = { individual: "C\xE1 nh\xE2n", broker: "M\xF4i gi\u1EDBi t\xE0i ch\xEDnh", professional: "Chuy\xEAn vi\xEAn m\xF4i gi\u1EDBi", other: "Kh\xE1c" };
40
39
  var partnerExperiences = { none: "Ch\u01B0a c\xF3 kinh nghi\u1EC7m", under1: "D\u01B0\u1EDBi 1 n\u0103m", oneTo3: "1\u20133 n\u0103m", over3: "Tr\xEAn 3 n\u0103m", other: "Kh\xE1c" };
41
- var consultationStatuses = {
42
- new: "M\u1EDBi",
43
- contacted: "\u0110\xE3 li\xEAn h\u1EC7",
44
- completed: "Ho\xE0n t\u1EA5t",
45
- cancelled: "Kh\xF4ng ti\u1EBFp t\u1EE5c"
46
- };
47
40
  var consultationCities = { "ho-chi-minh-city": "TP. H\u1ED3 Ch\xED Minh", hanoi: "H\xE0 N\u1ED9i", other: "Kh\xE1c" };
48
41
  var consultationCapitals = { "under-10m": "D\u01B0\u1EDBi 10 tri\u1EC7u", "10m-30m": "10\u201330 tri\u1EC7u", "30m-100m": "30\u2013100 tri\u1EC7u", "over-100m": "Tr\xEAn 100 tri\u1EC7u" };
49
42
  // Annotate the CommonJS export names for ESM import in node:
50
43
  0 && (module.exports = {
51
44
  consultationCapitals,
52
45
  consultationCities,
53
- consultationStatuses,
54
46
  partnerExperiences,
55
47
  partnerTypes,
56
48
  registrationRegions
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/consultation-model.ts"],"sourcesContent":["export type RegistrationKind = 'consultation' | 'partner';\nexport const registrationRegions: Record<string, string> = {\n north: 'Khu vực miền Bắc', 'north-central': 'Khu vực Bắc Trung Bộ', central: 'Khu vực miền Trung',\n highlands: 'Khu vực Tây Nguyên', south: 'Khu vực miền Nam', mekong: 'Khu vực miền Tây',\n};\nexport const partnerTypes: Record<string, string> = { individual: 'Cá nhân', broker: 'Môi giới tài chính', professional: 'Chuyên viên môi giới', other: 'Khác' };\nexport const partnerExperiences: Record<string, string> = { none: 'Chưa có kinh nghiệm', under1: 'Dưới 1 năm', oneTo3: '1–3 năm', over3: 'Trên 3 năm', other: 'Khác' };\nexport type ConsultationSubmission = {\n kind: RegistrationKind;\n region: string;\n partner: string;\n experience: string;\n sources: string[];\n otherSource: string;\n submissionId: string;\n name: string;\n phone: string;\n email: string;\n city: string;\n markets: string[];\n otherMarket: string;\n capital: string;\n language: 'vi' | 'en';\n sourcePath: string;\n website: string;\n};\n\nexport const consultationStatuses = {\n new: 'Mới', contacted: 'Đã liên hệ', completed: 'Hoàn tất', cancelled: 'Không tiếp tục',\n} as const;\nexport type ConsultationStatus = keyof typeof consultationStatuses;\nexport const consultationCities: Record<string, string> = { 'ho-chi-minh-city': 'TP. Hồ Chí Minh', hanoi: 'Hà Nội', other: 'Khác' };\nexport const consultationCapitals: Record<string, string> = { 'under-10m': 'Dưới 10 triệu', '10m-30m': '10–30 triệu', '30m-100m': '30–100 triệu', 'over-100m': 'Trên 100 triệu' };\nexport type Consultation = Omit<ConsultationSubmission, 'website' | 'submissionId'> & {\n id: string; status: ConsultationStatus; notes: string; createdAt: string; updatedAt: string;\n};\nexport type ConsultationList = { items: Consultation[]; total: number; page: number; pageSize: number };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,sBAA8C;AAAA,EACzD,OAAO;AAAA,EAAoB,iBAAiB;AAAA,EAAwB,SAAS;AAAA,EAC7E,WAAW;AAAA,EAAsB,OAAO;AAAA,EAAoB,QAAQ;AACtE;AACO,IAAM,eAAuC,EAAE,YAAY,iBAAW,QAAQ,oCAAsB,cAAc,sCAAwB,OAAO,UAAO;AACxJ,IAAM,qBAA6C,EAAE,MAAM,oCAAuB,QAAQ,6BAAc,QAAQ,qBAAW,OAAO,sBAAc,OAAO,UAAO;AAqB9J,IAAM,uBAAuB;AAAA,EAClC,KAAK;AAAA,EAAO,WAAW;AAAA,EAAc,WAAW;AAAA,EAAY,WAAW;AACzE;AAEO,IAAM,qBAA6C,EAAE,oBAAoB,2BAAmB,OAAO,kBAAU,OAAO,UAAO;AAC3H,IAAM,uBAA+C,EAAE,aAAa,gCAAiB,WAAW,yBAAe,YAAY,0BAAgB,aAAa,yBAAiB;","names":[]}
1
+ {"version":3,"sources":["../src/consultation-model.ts"],"sourcesContent":["export type RegistrationKind = 'consultation' | 'partner';\nexport const registrationRegions: Record<string, string> = {\n north: 'Khu vực miền Bắc', 'north-central': 'Khu vực Bắc Trung Bộ', central: 'Khu vực miền Trung',\n highlands: 'Khu vực Tây Nguyên', south: 'Khu vực miền Nam', mekong: 'Khu vực miền Tây',\n};\nexport const partnerTypes: Record<string, string> = { individual: 'Cá nhân', broker: 'Môi giới tài chính', professional: 'Chuyên viên môi giới', other: 'Khác' };\nexport const partnerExperiences: Record<string, string> = { none: 'Chưa có kinh nghiệm', under1: 'Dưới 1 năm', oneTo3: '1–3 năm', over3: 'Trên 3 năm', other: 'Khác' };\nexport type ConsultationSubmission = {\n kind: RegistrationKind;\n region: string;\n partner: string;\n experience: string;\n sources: string[];\n otherSource: string;\n submissionId: string;\n name: string;\n phone: string;\n email: string;\n city: string;\n markets: string[];\n otherMarket: string;\n capital: string;\n language: 'vi' | 'en';\n sourcePath: string;\n website: string;\n};\n\nexport const consultationCities: Record<string, string> = { 'ho-chi-minh-city': 'TP. Hồ Chí Minh', hanoi: 'Hà Nội', other: 'Khác' };\nexport const consultationCapitals: Record<string, string> = { 'under-10m': 'Dưới 10 triệu', '10m-30m': '10–30 triệu', '30m-100m': '30–100 triệu', 'over-100m': 'Trên 100 triệu' };\nexport type Consultation = Omit<ConsultationSubmission, 'website' | 'submissionId'> & {\n id: string; updatedAt: string;\n};\nexport type ConsultationList = { items: Consultation[]; total: number; page: number; pageSize: number };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AACO,IAAM,sBAA8C;AAAA,EACzD,OAAO;AAAA,EAAoB,iBAAiB;AAAA,EAAwB,SAAS;AAAA,EAC7E,WAAW;AAAA,EAAsB,OAAO;AAAA,EAAoB,QAAQ;AACtE;AACO,IAAM,eAAuC,EAAE,YAAY,iBAAW,QAAQ,oCAAsB,cAAc,sCAAwB,OAAO,UAAO;AACxJ,IAAM,qBAA6C,EAAE,MAAM,oCAAuB,QAAQ,6BAAc,QAAQ,qBAAW,OAAO,sBAAc,OAAO,UAAO;AAqB9J,IAAM,qBAA6C,EAAE,oBAAoB,2BAAmB,OAAO,kBAAU,OAAO,UAAO;AAC3H,IAAM,uBAA+C,EAAE,aAAa,gCAAiB,WAAW,yBAAe,YAAY,0BAAgB,aAAa,yBAAiB;","names":[]}
@@ -9,18 +9,11 @@ var registrationRegions = {
9
9
  };
10
10
  var partnerTypes = { individual: "C\xE1 nh\xE2n", broker: "M\xF4i gi\u1EDBi t\xE0i ch\xEDnh", professional: "Chuy\xEAn vi\xEAn m\xF4i gi\u1EDBi", other: "Kh\xE1c" };
11
11
  var partnerExperiences = { none: "Ch\u01B0a c\xF3 kinh nghi\u1EC7m", under1: "D\u01B0\u1EDBi 1 n\u0103m", oneTo3: "1\u20133 n\u0103m", over3: "Tr\xEAn 3 n\u0103m", other: "Kh\xE1c" };
12
- var consultationStatuses = {
13
- new: "M\u1EDBi",
14
- contacted: "\u0110\xE3 li\xEAn h\u1EC7",
15
- completed: "Ho\xE0n t\u1EA5t",
16
- cancelled: "Kh\xF4ng ti\u1EBFp t\u1EE5c"
17
- };
18
12
  var consultationCities = { "ho-chi-minh-city": "TP. H\u1ED3 Ch\xED Minh", hanoi: "H\xE0 N\u1ED9i", other: "Kh\xE1c" };
19
13
  var consultationCapitals = { "under-10m": "D\u01B0\u1EDBi 10 tri\u1EC7u", "10m-30m": "10\u201330 tri\u1EC7u", "30m-100m": "30\u2013100 tri\u1EC7u", "over-100m": "Tr\xEAn 100 tri\u1EC7u" };
20
14
  export {
21
15
  consultationCapitals,
22
16
  consultationCities,
23
- consultationStatuses,
24
17
  partnerExperiences,
25
18
  partnerTypes,
26
19
  registrationRegions
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/consultation-model.ts"],"sourcesContent":["export type RegistrationKind = 'consultation' | 'partner';\nexport const registrationRegions: Record<string, string> = {\n north: 'Khu vực miền Bắc', 'north-central': 'Khu vực Bắc Trung Bộ', central: 'Khu vực miền Trung',\n highlands: 'Khu vực Tây Nguyên', south: 'Khu vực miền Nam', mekong: 'Khu vực miền Tây',\n};\nexport const partnerTypes: Record<string, string> = { individual: 'Cá nhân', broker: 'Môi giới tài chính', professional: 'Chuyên viên môi giới', other: 'Khác' };\nexport const partnerExperiences: Record<string, string> = { none: 'Chưa có kinh nghiệm', under1: 'Dưới 1 năm', oneTo3: '1–3 năm', over3: 'Trên 3 năm', other: 'Khác' };\nexport type ConsultationSubmission = {\n kind: RegistrationKind;\n region: string;\n partner: string;\n experience: string;\n sources: string[];\n otherSource: string;\n submissionId: string;\n name: string;\n phone: string;\n email: string;\n city: string;\n markets: string[];\n otherMarket: string;\n capital: string;\n language: 'vi' | 'en';\n sourcePath: string;\n website: string;\n};\n\nexport const consultationStatuses = {\n new: 'Mới', contacted: 'Đã liên hệ', completed: 'Hoàn tất', cancelled: 'Không tiếp tục',\n} as const;\nexport type ConsultationStatus = keyof typeof consultationStatuses;\nexport const consultationCities: Record<string, string> = { 'ho-chi-minh-city': 'TP. Hồ Chí Minh', hanoi: 'Hà Nội', other: 'Khác' };\nexport const consultationCapitals: Record<string, string> = { 'under-10m': 'Dưới 10 triệu', '10m-30m': '10–30 triệu', '30m-100m': '30–100 triệu', 'over-100m': 'Trên 100 triệu' };\nexport type Consultation = Omit<ConsultationSubmission, 'website' | 'submissionId'> & {\n id: string; status: ConsultationStatus; notes: string; createdAt: string; updatedAt: string;\n};\nexport type ConsultationList = { items: Consultation[]; total: number; page: number; pageSize: number };\n"],"mappings":";AACO,IAAM,sBAA8C;AAAA,EACzD,OAAO;AAAA,EAAoB,iBAAiB;AAAA,EAAwB,SAAS;AAAA,EAC7E,WAAW;AAAA,EAAsB,OAAO;AAAA,EAAoB,QAAQ;AACtE;AACO,IAAM,eAAuC,EAAE,YAAY,iBAAW,QAAQ,oCAAsB,cAAc,sCAAwB,OAAO,UAAO;AACxJ,IAAM,qBAA6C,EAAE,MAAM,oCAAuB,QAAQ,6BAAc,QAAQ,qBAAW,OAAO,sBAAc,OAAO,UAAO;AAqB9J,IAAM,uBAAuB;AAAA,EAClC,KAAK;AAAA,EAAO,WAAW;AAAA,EAAc,WAAW;AAAA,EAAY,WAAW;AACzE;AAEO,IAAM,qBAA6C,EAAE,oBAAoB,2BAAmB,OAAO,kBAAU,OAAO,UAAO;AAC3H,IAAM,uBAA+C,EAAE,aAAa,gCAAiB,WAAW,yBAAe,YAAY,0BAAgB,aAAa,yBAAiB;","names":[]}
1
+ {"version":3,"sources":["../src/consultation-model.ts"],"sourcesContent":["export type RegistrationKind = 'consultation' | 'partner';\nexport const registrationRegions: Record<string, string> = {\n north: 'Khu vực miền Bắc', 'north-central': 'Khu vực Bắc Trung Bộ', central: 'Khu vực miền Trung',\n highlands: 'Khu vực Tây Nguyên', south: 'Khu vực miền Nam', mekong: 'Khu vực miền Tây',\n};\nexport const partnerTypes: Record<string, string> = { individual: 'Cá nhân', broker: 'Môi giới tài chính', professional: 'Chuyên viên môi giới', other: 'Khác' };\nexport const partnerExperiences: Record<string, string> = { none: 'Chưa có kinh nghiệm', under1: 'Dưới 1 năm', oneTo3: '1–3 năm', over3: 'Trên 3 năm', other: 'Khác' };\nexport type ConsultationSubmission = {\n kind: RegistrationKind;\n region: string;\n partner: string;\n experience: string;\n sources: string[];\n otherSource: string;\n submissionId: string;\n name: string;\n phone: string;\n email: string;\n city: string;\n markets: string[];\n otherMarket: string;\n capital: string;\n language: 'vi' | 'en';\n sourcePath: string;\n website: string;\n};\n\nexport const consultationCities: Record<string, string> = { 'ho-chi-minh-city': 'TP. Hồ Chí Minh', hanoi: 'Hà Nội', other: 'Khác' };\nexport const consultationCapitals: Record<string, string> = { 'under-10m': 'Dưới 10 triệu', '10m-30m': '10–30 triệu', '30m-100m': '30–100 triệu', 'over-100m': 'Trên 100 triệu' };\nexport type Consultation = Omit<ConsultationSubmission, 'website' | 'submissionId'> & {\n id: string; updatedAt: string;\n};\nexport type ConsultationList = { items: Consultation[]; total: number; page: number; pageSize: number };\n"],"mappings":";AACO,IAAM,sBAA8C;AAAA,EACzD,OAAO;AAAA,EAAoB,iBAAiB;AAAA,EAAwB,SAAS;AAAA,EAC7E,WAAW;AAAA,EAAsB,OAAO;AAAA,EAAoB,QAAQ;AACtE;AACO,IAAM,eAAuC,EAAE,YAAY,iBAAW,QAAQ,oCAAsB,cAAc,sCAAwB,OAAO,UAAO;AACxJ,IAAM,qBAA6C,EAAE,MAAM,oCAAuB,QAAQ,6BAAc,QAAQ,qBAAW,OAAO,sBAAc,OAAO,UAAO;AAqB9J,IAAM,qBAA6C,EAAE,oBAAoB,2BAAmB,OAAO,kBAAU,OAAO,UAAO;AAC3H,IAAM,uBAA+C,EAAE,aAAa,gCAAiB,WAAW,yBAAe,YAAY,0BAAgB,aAAa,yBAAiB;","names":[]}
@@ -1,12 +1,11 @@
1
1
  import * as react from 'react';
2
- import { ConsultationList, ConsultationStatus, Consultation } from './consultation-model.mjs';
2
+ import { ConsultationList, Consultation } from './consultation-model.mjs';
3
3
  export { ConsultationSubmission, RegistrationKind } from './consultation-model.mjs';
4
4
 
5
5
  type ConsultationManagerProps = {
6
6
  kind?: 'consultation' | 'partner';
7
7
  data: ConsultationList;
8
8
  search: string;
9
- status: ConsultationStatus | '';
10
9
  loading: boolean;
11
10
  busy: boolean;
12
11
  canWrite: boolean;
@@ -15,14 +14,12 @@ type ConsultationManagerProps = {
15
14
  message: string;
16
15
  } | null;
17
16
  onSearch: (value: string) => void;
18
- onStatus: (value: ConsultationStatus | '') => void;
19
17
  onPage: (page: number) => void;
20
18
  onPageSize: (size: number) => void;
21
19
  onReload: () => void;
22
- onSave: (item: Consultation, status: ConsultationStatus, notes: string) => Promise<void>;
23
20
  onDelete: (item: Consultation) => Promise<void>;
24
21
  onDismissNotice: () => void;
25
22
  };
26
- declare function ConsultationManager({ kind, data, search, status, loading, busy, canWrite, notice, onSearch, onStatus, onPage, onPageSize, onReload, onSave, onDelete, onDismissNotice }: ConsultationManagerProps): react.JSX.Element;
23
+ declare function ConsultationManager({ kind, data, search, loading, busy, canWrite, notice, onSearch, onPage, onPageSize, onReload, onDelete, onDismissNotice }: ConsultationManagerProps): react.JSX.Element;
27
24
 
28
- export { Consultation, ConsultationList, ConsultationManager, type ConsultationManagerProps, ConsultationStatus };
25
+ export { Consultation, ConsultationList, ConsultationManager, type ConsultationManagerProps };
@@ -1,12 +1,11 @@
1
1
  import * as react from 'react';
2
- import { ConsultationList, ConsultationStatus, Consultation } from './consultation-model.js';
2
+ import { ConsultationList, Consultation } from './consultation-model.js';
3
3
  export { ConsultationSubmission, RegistrationKind } from './consultation-model.js';
4
4
 
5
5
  type ConsultationManagerProps = {
6
6
  kind?: 'consultation' | 'partner';
7
7
  data: ConsultationList;
8
8
  search: string;
9
- status: ConsultationStatus | '';
10
9
  loading: boolean;
11
10
  busy: boolean;
12
11
  canWrite: boolean;
@@ -15,14 +14,12 @@ type ConsultationManagerProps = {
15
14
  message: string;
16
15
  } | null;
17
16
  onSearch: (value: string) => void;
18
- onStatus: (value: ConsultationStatus | '') => void;
19
17
  onPage: (page: number) => void;
20
18
  onPageSize: (size: number) => void;
21
19
  onReload: () => void;
22
- onSave: (item: Consultation, status: ConsultationStatus, notes: string) => Promise<void>;
23
20
  onDelete: (item: Consultation) => Promise<void>;
24
21
  onDismissNotice: () => void;
25
22
  };
26
- declare function ConsultationManager({ kind, data, search, status, loading, busy, canWrite, notice, onSearch, onStatus, onPage, onPageSize, onReload, onSave, onDelete, onDismissNotice }: ConsultationManagerProps): react.JSX.Element;
23
+ declare function ConsultationManager({ kind, data, search, loading, busy, canWrite, notice, onSearch, onPage, onPageSize, onReload, onDelete, onDismissNotice }: ConsultationManagerProps): react.JSX.Element;
27
24
 
28
- export { Consultation, ConsultationList, ConsultationManager, type ConsultationManagerProps, ConsultationStatus };
25
+ export { Consultation, ConsultationList, ConsultationManager, type ConsultationManagerProps };
@@ -40,12 +40,6 @@ var registrationRegions = {
40
40
  };
41
41
  var partnerTypes = { individual: "C\xE1 nh\xE2n", broker: "M\xF4i gi\u1EDBi t\xE0i ch\xEDnh", professional: "Chuy\xEAn vi\xEAn m\xF4i gi\u1EDBi", other: "Kh\xE1c" };
42
42
  var partnerExperiences = { none: "Ch\u01B0a c\xF3 kinh nghi\u1EC7m", under1: "D\u01B0\u1EDBi 1 n\u0103m", oneTo3: "1\u20133 n\u0103m", over3: "Tr\xEAn 3 n\u0103m", other: "Kh\xE1c" };
43
- var consultationStatuses = {
44
- new: "M\u1EDBi",
45
- contacted: "\u0110\xE3 li\xEAn h\u1EC7",
46
- completed: "Ho\xE0n t\u1EA5t",
47
- cancelled: "Kh\xF4ng ti\u1EBFp t\u1EE5c"
48
- };
49
43
  var consultationCities = { "ho-chi-minh-city": "TP. H\u1ED3 Ch\xED Minh", hanoi: "H\xE0 N\u1ED9i", other: "Kh\xE1c" };
50
44
  var consultationCapitals = { "under-10m": "D\u01B0\u1EDBi 10 tri\u1EC7u", "10m-30m": "10\u201330 tri\u1EC7u", "30m-100m": "30\u2013100 tri\u1EC7u", "over-100m": "Tr\xEAn 100 tri\u1EC7u" };
51
45
 
@@ -58,17 +52,14 @@ function ConsultationManager({
58
52
  kind = "consultation",
59
53
  data,
60
54
  search,
61
- status,
62
55
  loading,
63
56
  busy,
64
57
  canWrite,
65
58
  notice,
66
59
  onSearch,
67
- onStatus,
68
60
  onPage,
69
61
  onPageSize,
70
62
  onReload,
71
- onSave,
72
63
  onDelete,
73
64
  onDismissNotice
74
65
  }) {
@@ -76,28 +67,20 @@ function ConsultationManager({
76
67
  const title = isPartner ? "\u0110\u0103ng k\xFD \u0111\u1ED1i t\xE1c \u2014 Wikex VN" : "\u0110\u0103ng k\xFD t\u01B0 v\u1EA5n \u2014 Trang ch\u1EE7";
77
68
  const [editing, setEditing] = (0, import_react.useState)(null);
78
69
  const [deleting, setDeleting] = (0, import_react.useState)(null);
79
- const [draftStatus, setDraftStatus] = (0, import_react.useState)("new");
80
- const [notes, setNotes] = (0, import_react.useState)("");
81
70
  return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 3, sx: { minWidth: 0 }, children: [
82
71
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: { xs: "column", sm: "row" }, gap: 2, justifyContent: "space-between", alignItems: { sm: "center" }, children: [
83
72
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 1, children: [
84
73
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "h4", children: title }),
85
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", children: "Th\xF4ng tin t\u1EEB form \u0111\u0103ng k\xFD tr\xEAn website. Theo d\xF5i li\xEAn h\u1EC7 v\xE0 ghi ch\xFA x\u1EED l\xFD." })
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", children: "Th\xF4ng tin t\u1EEB form \u0111\u0103ng k\xFD tr\xEAn website." })
86
75
  ] }),
87
76
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { variant: "outlined", disabled: loading || busy, onClick: onReload, children: "T\u1EA3i l\u1EA1i danh s\xE1ch" })
88
77
  ] }),
89
- !canWrite && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Alert, { severity: "info", children: "B\u1EA1n c\xF3 quy\u1EC1n xem \u0111\u0103ng k\xFD. C\u1EA7n quy\u1EC1n ch\u1EC9nh s\u1EEDa \u0111\u0103ng k\xFD \u0111\u1EC3 c\u1EADp nh\u1EADt ho\u1EB7c x\xF3a." }),
78
+ !canWrite && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Alert, { severity: "info", children: "B\u1EA1n c\xF3 quy\u1EC1n xem \u0111\u0103ng k\xFD. C\u1EA7n quy\u1EC1n ghi \u0111\u0103ng k\xFD \u0111\u1EC3 x\xF3a." }),
90
79
  notice && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Alert, { severity: notice.severity, onClose: onDismissNotice, children: notice.message }),
91
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Card, { sx: { p: 3 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: { xs: "column", sm: "row" }, spacing: 2, children: [
92
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TextField, { size: "small", fullWidth: true, label: "T\xECm theo t\xEAn, \u0111i\u1EC7n tho\u1EA1i ho\u1EB7c email", value: search, disabled: busy, onChange: (event) => onSearch(event.target.value) }),
93
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TextField, { select: true, size: "small", label: "Tr\u1EA1ng th\xE1i", value: status, disabled: busy, sx: { minWidth: 200 }, onChange: (event) => onStatus(event.target.value), children: [
94
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.MenuItem, { value: "", children: "T\u1EA5t c\u1EA3" }),
95
- Object.entries(consultationStatuses).map(([key, label]) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.MenuItem, { value: key, children: label }, key))
96
- ] })
97
- ] }) }),
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Card, { sx: { p: 3 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Stack, { direction: { xs: "column", sm: "row" }, spacing: 2, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TextField, { size: "small", fullWidth: true, label: "T\xECm theo t\xEAn, \u0111i\u1EC7n tho\u1EA1i ho\u1EB7c email", value: search, disabled: busy, onChange: (event) => onSearch(event.target.value) }) }) }),
98
81
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { "aria-busy": loading, sx: { opacity: loading ? 0.65 : 1 }, children: [
99
82
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { sx: { overflowX: "auto" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Table, { "aria-label": title, sx: { minWidth: 1050 }, children: [
100
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableRow, { children: ["Kh\xE1ch h\xE0ng", "\u0110i\u1EC7n tho\u1EA1i / Email", "Khu v\u1EF1c", isPartner ? "\u0110\u1ED1i t\xE1c / Kinh nghi\u1EC7m" : "Th\u1ECB tr\u01B0\u1EDDng / V\u1ED1n", "Tr\u1EA1ng th\xE1i", "Ng\xE0y g\u1EEDi", "Thao t\xE1c"].map((title2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: title2 }, title2)) }) }),
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableHead, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableRow, { children: ["Kh\xE1ch h\xE0ng", "\u0110i\u1EC7n tho\u1EA1i / Email", "Khu v\u1EF1c", isPartner ? "\u0110\u1ED1i t\xE1c / Kinh nghi\u1EC7m" : "Th\u1ECB tr\u01B0\u1EDDng / V\u1ED1n", "Ng\xE0y c\u1EADp nh\u1EADt", "Thao t\xE1c"].map((title2) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: title2 }, title2)) }) }),
101
84
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableBody, { children: [
102
85
  data.items.map((item) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableRow, { children: [
103
86
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.TableCell, { sx: { maxWidth: 220, overflowWrap: "anywhere" }, children: [
@@ -120,18 +103,15 @@ function ConsultationManager({
120
103
  ] }),
121
104
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: capital(item.capital) })
122
105
  ] }) }),
123
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Chip, { size: "small", label: consultationStatuses[item.status], color: item.status === "new" ? "warning" : item.status === "completed" ? "success" : "default" }) }),
124
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { sx: { whiteSpace: "nowrap" }, children: date(item.createdAt) }),
106
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { sx: { whiteSpace: "nowrap" }, children: date(item.updatedAt) }),
125
107
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: "row", spacing: 1, children: [
126
108
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { size: "small", disabled: busy, onClick: () => {
127
109
  setEditing(item);
128
- setDraftStatus(item.status);
129
- setNotes(item.notes);
130
- }, children: "Xem / x\u1EED l\xFD" }),
110
+ }, children: "Xem chi ti\u1EBFt" }),
131
111
  canWrite && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { size: "small", color: "error", disabled: busy, onClick: () => setDeleting(item), children: "X\xF3a" })
132
112
  ] }) })
133
113
  ] }, item.id)),
134
- !data.items.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { colSpan: 7, align: "center", sx: { py: 6 }, children: loading ? "\u0110ang t\u1EA3i \u0111\u0103ng k\xFD\u2026" : "Ch\u01B0a c\xF3 \u0111\u0103ng k\xFD ph\xF9 h\u1EE3p." }) })
114
+ !data.items.length && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableRow, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TableCell, { colSpan: 6, align: "center", sx: { py: 6 }, children: loading ? "\u0110ang t\u1EA3i \u0111\u0103ng k\xFD\u2026" : "Ch\u01B0a c\xF3 \u0111\u0103ng k\xFD ph\xF9 h\u1EE3p." }) })
135
115
  ] })
136
116
  ] }) }),
137
117
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
@@ -170,99 +150,61 @@ function ConsultationManager({
170
150
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { component: "span", variant: "body2", color: "text.secondary", children: [
171
151
  isPartner ? "Wikex VN" : "Trang ch\u1EE7",
172
152
  " \xB7 ",
173
- editing && date(editing.createdAt)
153
+ editing && date(editing.updatedAt)
174
154
  ] })
175
155
  ] })
176
156
  ] })
177
157
  ] }),
178
158
  /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.DialogContent, { dividers: true, sx: { px: { xs: 2.5, sm: 3 }, py: 3, bgcolor: "background.neutral" }, children: [
179
159
  notice?.severity === "error" && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Alert, { severity: "error", sx: { mb: 2 }, children: notice.message }),
180
- editing && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { sx: { display: "grid", gridTemplateColumns: { xs: "1fr", md: "minmax(0, 1.2fr) minmax(0, 1fr)" }, gap: 2.5 }, children: [
181
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 2.5, sx: { minWidth: 0 }, children: [
182
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { variant: "outlined", sx: { p: 2.5, boxShadow: "none" }, children: [
183
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", sx: { mb: 2 }, children: "Th\xF4ng tin li\xEAn h\u1EC7" }),
184
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
185
- { label: "\u0110i\u1EC7n tho\u1EA1i", value: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Link, { href: `tel:${editing.phone.replace(/[^+0-9]/g, "")}`, underline: "hover", color: "text.primary", children: editing.phone }) },
186
- { label: "Khu v\u1EF1c", value: isPartner ? registrationRegions[editing.region] || "Ch\u01B0a cung c\u1EA5p" : city(editing.city) },
187
- { label: "Email", value: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Link, { href: `mailto:${editing.email}`, underline: "hover", color: "text.primary", children: editing.email }), full: true }
188
- ].map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { sx: { minWidth: 0, gridColumn: field.full ? "1 / -1" : void 0 }, children: [
160
+ editing && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { sx: { display: "grid", gridTemplateColumns: "1fr", gap: 2.5 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 2.5, sx: { minWidth: 0 }, children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { variant: "outlined", sx: { p: 2.5, boxShadow: "none" }, children: [
162
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", sx: { mb: 2 }, children: "Th\xF4ng tin li\xEAn h\u1EC7" }),
163
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
164
+ { label: "\u0110i\u1EC7n tho\u1EA1i", value: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Link, { href: `tel:${editing.phone.replace(/[^+0-9]/g, "")}`, underline: "hover", color: "text.primary", children: editing.phone }) },
165
+ { label: "Khu v\u1EF1c", value: isPartner ? registrationRegions[editing.region] || "Ch\u01B0a cung c\u1EA5p" : city(editing.city) },
166
+ { label: "Email", value: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Link, { href: `mailto:${editing.email}`, underline: "hover", color: "text.primary", children: editing.email }), full: true }
167
+ ].map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { sx: { minWidth: 0, gridColumn: field.full ? "1 / -1" : void 0 }, children: [
168
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dt", variant: "caption", color: "text.secondary", sx: { mb: 0.5 }, children: field.label }),
169
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dd", variant: "body2", sx: { m: 0, fontWeight: 600, overflowWrap: "anywhere" }, children: field.value })
170
+ ] }, field.label)) })
171
+ ] }),
172
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { variant: "outlined", sx: { p: 2.5, boxShadow: "none" }, children: [
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", sx: { mb: 2 }, children: isPartner ? "Th\xF4ng tin h\u1EE3p t\xE1c" : "Nhu c\u1EA7u t\u01B0 v\u1EA5n" }),
174
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
175
+ (isPartner ? [
176
+ { label: "\u0110\u1ED1i t\xE1c", value: partnerTypes[editing.partner] || "Ch\u01B0a cung c\u1EA5p" },
177
+ { label: "Kinh nghi\u1EC7m", value: partnerExperiences[editing.experience] || "Ch\u01B0a cung c\u1EA5p" }
178
+ ] : [{ label: "S\u1ED1 v\u1ED1n d\u1EF1 ki\u1EBFn", value: capital(editing.capital) }]).map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { children: [
189
179
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dt", variant: "caption", color: "text.secondary", sx: { mb: 0.5 }, children: field.label }),
190
180
  /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dd", variant: "body2", sx: { m: 0, fontWeight: 600, overflowWrap: "anywhere" }, children: field.value })
191
- ] }, field.label)) })
192
- ] }),
193
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { variant: "outlined", sx: { p: 2.5, boxShadow: "none" }, children: [
194
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", sx: { mb: 2 }, children: isPartner ? "Th\xF4ng tin h\u1EE3p t\xE1c" : "Nhu c\u1EA7u t\u01B0 v\u1EA5n" }),
195
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { component: "dl", sx: { m: 0, display: "grid", gridTemplateColumns: { xs: "1fr", sm: "1fr 1fr" }, gap: 2 }, children: [
196
- (isPartner ? [
197
- { label: "\u0110\u1ED1i t\xE1c", value: partnerTypes[editing.partner] || "Ch\u01B0a cung c\u1EA5p" },
198
- { label: "Kinh nghi\u1EC7m", value: partnerExperiences[editing.experience] || "Ch\u01B0a cung c\u1EA5p" }
199
- ] : [{ label: "S\u1ED1 v\u1ED1n d\u1EF1 ki\u1EBFn", value: capital(editing.capital) }]).map((field) => /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { children: [
200
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dt", variant: "caption", color: "text.secondary", sx: { mb: 0.5 }, children: field.label }),
201
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dd", variant: "body2", sx: { m: 0, fontWeight: 600, overflowWrap: "anywhere" }, children: field.value })
202
- ] }, field.label)),
203
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { sx: { gridColumn: "1 / -1", minWidth: 0 }, children: [
204
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dt", variant: "caption", color: "text.secondary", sx: { mb: 1 }, children: isPartner ? "K\xEAnh \u0111ang c\xF3 s\u1EB5n" : "Th\u1ECB tr\u01B0\u1EDDng quan t\xE2m" }),
205
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Stack, { component: "dd", direction: "row", flexWrap: "wrap", gap: 0.75, sx: { m: 0 }, children: (isPartner ? editing.sources : editing.markets).length ? (isPartner ? editing.sources : editing.markets).map(
206
- (value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Chip, { label: value, size: "small", variant: "outlined", sx: { maxWidth: "100%", height: "auto", "& .MuiChip-label": { whiteSpace: "normal", py: 0.5, overflowWrap: "anywhere" } } }, `${value}-${index}`)
207
- ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", children: "Ch\u01B0a cung c\u1EA5p" }) }),
208
- (isPartner ? editing.otherSource : editing.otherMarket) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { variant: "body2", sx: { mt: 1, overflowWrap: "anywhere" }, children: [
209
- "Kh\xE1c: ",
210
- isPartner ? editing.otherSource : editing.otherMarket
211
- ] })
212
- ] })
213
- ] }),
214
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Divider, { sx: { my: 2 } }),
215
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 0.5, children: [
216
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { variant: "caption", color: "text.secondary", children: [
217
- "Trang g\u1EEDi: ",
218
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { component: "span", sx: { overflowWrap: "anywhere" }, children: editing.sourcePath })
219
- ] }),
220
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { variant: "caption", color: "text.secondary", children: [
221
- "Ng\xF4n ng\u1EEF: ",
222
- editing.language === "en" ? "Ti\u1EBFng Anh" : "Ti\u1EBFng Vi\u1EC7t"
181
+ ] }, field.label)),
182
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Box, { sx: { gridColumn: "1 / -1", minWidth: 0 }, children: [
183
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { component: "dt", variant: "caption", color: "text.secondary", sx: { mb: 1 }, children: isPartner ? "K\xEAnh \u0111ang c\xF3 s\u1EB5n" : "Th\u1ECB tr\u01B0\u1EDDng quan t\xE2m" }),
184
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Stack, { component: "dd", direction: "row", flexWrap: "wrap", gap: 0.75, sx: { m: 0 }, children: (isPartner ? editing.sources : editing.markets).length ? (isPartner ? editing.sources : editing.markets).map(
185
+ (value, index) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Chip, { label: value, size: "small", variant: "outlined", sx: { maxWidth: "100%", height: "auto", "& .MuiChip-label": { whiteSpace: "normal", py: 0.5, overflowWrap: "anywhere" } } }, `${value}-${index}`)
186
+ ) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", children: "Ch\u01B0a cung c\u1EA5p" }) }),
187
+ (isPartner ? editing.otherSource : editing.otherMarket) && /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { variant: "body2", sx: { mt: 1, overflowWrap: "anywhere" }, children: [
188
+ "Kh\xE1c: ",
189
+ isPartner ? editing.otherSource : editing.otherMarket
223
190
  ] })
224
191
  ] })
225
- ] })
226
- ] }),
227
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Card, { variant: "outlined", sx: { p: 2.5, boxShadow: "none", alignSelf: "start", minWidth: 0 }, children: [
228
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { direction: "row", gap: 1, justifyContent: "space-between", alignItems: "center", sx: { mb: 1 }, children: [
229
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "subtitle1", children: "X\u1EED l\xFD \u0111\u0103ng k\xFD" }),
230
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Chip, { size: "small", label: consultationStatuses[draftStatus], color: draftStatus === "new" ? "warning" : draftStatus === "completed" ? "success" : draftStatus === "contacted" ? "info" : "default" })
231
192
  ] }),
232
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "body2", color: "text.secondary", sx: { mb: 3 }, children: "C\u1EADp nh\u1EADt ti\u1EBFn \u0111\u1ED9 li\xEAn h\u1EC7 v\xE0 ghi ch\xFA cho \u0111\u1ED9i ng\u0169." }),
233
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 2.5, children: [
234
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.TextField, { fullWidth: true, select: true, label: "Tr\u1EA1ng th\xE1i x\u1EED l\xFD", value: draftStatus, disabled: busy || !canWrite, onChange: (event) => setDraftStatus(event.target.value), children: Object.entries(consultationStatuses).map(([key, label]) => /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.MenuItem, { value: key, children: label }, key)) }),
235
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
236
- import_material.TextField,
237
- {
238
- fullWidth: true,
239
- label: "Ghi ch\xFA n\u1ED9i b\u1ED9",
240
- placeholder: "N\u1ED9i dung trao \u0111\u1ED5i, nhu c\u1EA7u v\xE0 l\u1ECBch h\u1EB9n ti\u1EBFp theo\u2026",
241
- value: notes,
242
- disabled: busy || !canWrite,
243
- multiline: true,
244
- minRows: 5,
245
- inputProps: { maxLength: 5e3 },
246
- helperText: `${notes.length.toLocaleString("vi-VN")} / 5.000 k\xFD t\u1EF1 \xB7 Ch\u1EC9 hi\u1EC3n th\u1ECB trong CMS`,
247
- onChange: (event) => setNotes(event.target.value)
248
- }
249
- ),
250
- !canWrite && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Typography, { variant: "caption", color: "text.secondary", children: "B\u1EA1n ch\u1EC9 c\xF3 quy\u1EC1n xem th\xF4ng tin \u0111\u0103ng k\xFD." })
193
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Divider, { sx: { my: 2 } }),
194
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Stack, { spacing: 0.5, children: [
195
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { variant: "caption", color: "text.secondary", children: [
196
+ "Trang g\u1EEDi: ",
197
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Box, { component: "span", sx: { overflowWrap: "anywhere" }, children: editing.sourcePath })
198
+ ] }),
199
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.Typography, { variant: "caption", color: "text.secondary", children: [
200
+ "Ng\xF4n ng\u1EEF: ",
201
+ editing.language === "en" ? "Ti\u1EBFng Anh" : "Ti\u1EBFng Vi\u1EC7t"
202
+ ] })
251
203
  ] })
252
204
  ] })
253
- ] })
205
+ ] }) })
254
206
  ] }),
255
- /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_material.DialogActions, { sx: { px: { xs: 2.5, sm: 3 }, py: 2, gap: 1 }, children: [
256
- /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { disabled: busy, onClick: () => setEditing(null), children: "\u0110\xF3ng" }),
257
- canWrite && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { variant: "contained", loading: busy, disabled: busy, onClick: async () => {
258
- if (!editing) return;
259
- try {
260
- await onSave(editing, draftStatus, notes);
261
- setEditing(null);
262
- } catch {
263
- }
264
- }, children: "L\u01B0u x\u1EED l\xFD" })
265
- ] })
207
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.DialogActions, { sx: { px: { xs: 2.5, sm: 3 }, py: 2, gap: 1 }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_material.Button, { disabled: busy, onClick: () => setEditing(null), children: "\u0110\xF3ng" }) })
266
208
  ]
267
209
  }
268
210
  ),