diff --git a/src/lib/components/dictionary/instrument/config/instrument-config.js b/src/lib/components/dictionary/instrument/config/instrument-config.js
index b55fd04..6d58adb 100644
--- a/src/lib/components/dictionary/instrument/config/instrument-config.js
+++ b/src/lib/components/dictionary/instrument/config/instrument-config.js
@@ -13,20 +13,24 @@ export const searchFields = [
export const detailSections = [
{
- title: "",
- class: "grid grid-cols-1 gap-4",
- groups: [
- {
- class: "space-y-3",
- fields: [
- { key: "IEID", label: "Internal Equipment ID" },
- { key: "InstrumentID", label: "Instrument ID" },
- { key: "InstrumentName", label: "Instrument Name" },
- { key: "WorkstationID", label: "Workstation" },
- { key: "EquipmentRole", label: "Equipment Role" },
- { key: "isEnable", label: "Enable" },
- ]
- },
+ class: "grid grid-cols-2 gap-4 items-center",
+ fields: [
+ { key: "IEID", label: "Internal Equipment ID" },
+ { key: "InstrumentID", label: "Instrument ID" },
+ ]
+ },
+ {
+ class: "grid grid-cols-2 gap-4 items-center",
+ fields: [
+ { key: "DepartmentName", label: "Department" },
+ { key: "WorkstationName", label: "Workstation" },
+ ]
+ },
+ {
+ class: "grid grid-cols-2 gap-4 items-center",
+ fields: [
+ { key: "EquipmentRole", label: "Equipment Role" },
+ { key: "isEnable", label: "Enable" },
]
},
];
diff --git a/src/lib/components/dictionary/instrument/config/instrument-form-config.js b/src/lib/components/dictionary/instrument/config/instrument-form-config.js
index 7f8c9ce..63d73d0 100644
--- a/src/lib/components/dictionary/instrument/config/instrument-form-config.js
+++ b/src/lib/components/dictionary/instrument/config/instrument-form-config.js
@@ -13,8 +13,8 @@ export const instrumentInitialForm = {
InstrumentID: '',
InstrumentName: '',
WorkstationID: '',
- isEnable: '',
- EquipmentRole: '',
+ isEnable: '1',
+ EquipmentRole: 'M',
};
export const instrumentDefaultErrors = {
@@ -27,18 +27,18 @@ export const instrumentFormFields = [
{
type: "row",
columns: [
- {
- key: "EID",
- label: "Equipment ID",
- required: false,
- type: "text",
- },
{
key: "IEID",
label: "Internal Equipment ID",
required: false,
type: "text",
},
+ {
+ key: "InstrumentName",
+ label: "Instrument Name",
+ required: false,
+ type: "text",
+ },
]
},
{
@@ -48,10 +48,47 @@ export const instrumentFormFields = [
key: "DepartmentID",
label: "Department ID",
required: false,
- type: "textarea",
+ type: "select",
+ optionsEndpoint: `${API.BASE_URL}${API.DEPARTMENT}`,
+ valueKey: "DepartmentID",
+ labelKey: "DepartmentName",
+ },
+ {
+ key: "WorkstationID",
+ label: "Workstation ID",
+ required: false,
+ type: "select",
+ optionsEndpoint: `${API.BASE_URL}${API.WORKSTATION}`,
+ valueKey: "WorkstationID",
+ labelKey: "WorkstationName",
},
]
- }
+ },
+ {
+ type: "row",
+ columns: [
+ {
+ key: "EquipmentRole",
+ label: "Equipment Role",
+ required: false,
+ type: "toggle",
+ optionsToggle: [
+ { value: 'B', label: 'Backup' },
+ { value: 'M', label: 'Main' },
+ ]
+ },
+ {
+ key: "isEnable",
+ label: "Enable",
+ required: false,
+ type: "toggle",
+ optionsToggle: [
+ { value: 0, label: 'Disabled' },
+ { value: 1, label: 'Enabled' }
+ ]
+ },
+ ]
+ },
]
},
];
diff --git a/src/lib/components/dictionary/instrument/page/create-page.svelte b/src/lib/components/dictionary/instrument/page/create-page.svelte
index 4649907..eeff9d9 100644
--- a/src/lib/components/dictionary/instrument/page/create-page.svelte
+++ b/src/lib/components/dictionary/instrument/page/create-page.svelte
@@ -1 +1,60 @@
-cr
\ No newline at end of file
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/lib/components/dictionary/instrument/page/edit-page.svelte b/src/lib/components/dictionary/instrument/page/edit-page.svelte
index 9a58f89..3bf7cdc 100644
--- a/src/lib/components/dictionary/instrument/page/edit-page.svelte
+++ b/src/lib/components/dictionary/instrument/page/edit-page.svelte
@@ -1 +1,93 @@
-ed
\ No newline at end of file
+
+
+
+
+
+
+
\ No newline at end of file