diff --git a/src/frontend/src/components/QuantDataGrid.vue b/src/frontend/src/components/QuantDataGrid.vue index 24050163..e8d9d61f 100644 --- a/src/frontend/src/components/QuantDataGrid.vue +++ b/src/frontend/src/components/QuantDataGrid.vue @@ -1,168 +1,59 @@ - - + - +const props = defineProps<{ + headers: GridColumn[]; + items: any[]; + loading?: boolean; + paginator?: boolean; + rows?: number; +}>(); + diff --git a/src/frontend/src/components/QuantDatePicker.vue b/src/frontend/src/components/QuantDatePicker.vue index d66fb617..dce94e7c 100644 --- a/src/frontend/src/components/QuantDatePicker.vue +++ b/src/frontend/src/components/QuantDatePicker.vue @@ -1,51 +1,57 @@ - - + + + diff --git a/src/frontend/src/components/QuantMasterGrid.vue b/src/frontend/src/components/QuantMasterGrid.vue index 76f99cdb..3bbfbf15 100644 --- a/src/frontend/src/components/QuantMasterGrid.vue +++ b/src/frontend/src/components/QuantMasterGrid.vue @@ -1,86 +1,63 @@ - - + - + +const props = defineProps<{ + headers?: GridHeader[]; + items?: any[]; + height?: number; +}>(); + +const gridHeaders = computed(() => { + if (props.headers && props.headers.length > 0) return props.headers; + // Fallback defaults if not supplied + return [ + { key: 'code', label: '코드', width: '120px' }, + { key: 'name', label: '명칭' }, + { key: 'status', label: '상태', width: '90px', align: 'center' } + ]; +}); + diff --git a/src/frontend/src/components/QuantStatusChip.vue b/src/frontend/src/components/QuantStatusChip.vue index e0385ab2..ebace8f4 100644 --- a/src/frontend/src/components/QuantStatusChip.vue +++ b/src/frontend/src/components/QuantStatusChip.vue @@ -1,18 +1,31 @@ - - + + + diff --git a/src/frontend/src/components/QuantTabPanel.vue b/src/frontend/src/components/QuantTabPanel.vue index b465469c..b9a33190 100644 --- a/src/frontend/src/components/QuantTabPanel.vue +++ b/src/frontend/src/components/QuantTabPanel.vue @@ -1,74 +1,64 @@ - - + - + +const props = defineProps<{ + tabs: TabItem[]; + modelValue?: string; +}>(); + +const emit = defineEmits(['update:modelValue', 'tab-change']); + +const activeTabId = ref(props.modelValue || (props.tabs[0] ? props.tabs[0].id : '')); + +watch( + () => props.modelValue, + (newVal) => { + if (newVal) activeTabId.value = newVal; + } +); + +const onTabChange = (val: string | number | undefined) => { + const strVal = String(val ?? ''); + activeTabId.value = strVal; + emit('update:modelValue', strVal); + emit('tab-change', strVal); +}; +