diff --git a/src/pages/Worker/Card/WorkerBusiness.vue b/src/pages/Worker/Card/WorkerBusiness.vue index fbf43f63a..bb1cfd990 100644 --- a/src/pages/Worker/Card/WorkerBusiness.vue +++ b/src/pages/Worker/Card/WorkerBusiness.vue @@ -4,7 +4,6 @@ import { useI18n } from 'vue-i18n'; import { useRoute } from 'vue-router'; import VnTable from 'components/VnTable/VnTable.vue'; import { toDate } from 'src/filters'; -import worker from 'src/router/modules/worker'; import { useQuasar } from 'quasar'; const { t } = useI18n(); @@ -29,7 +28,7 @@ const businessFilter = { { relation: 'companyCode', scope: { - fields: ['id', 'code'], + fields: ['code'], }, }, { @@ -71,8 +70,9 @@ const businessFilter = { ], }; -async function reactivateWorker(value) { - if (value === null) return; +async function reactivateWorker(business) { + console.log('value: ', business); + if (business === null) return; quasar .dialog({ message: t('Do you want to reactivate the user?'), @@ -83,7 +83,7 @@ async function reactivateWorker(value) { cancel: true, }) .onOk(async () => { - worker.isDisable = false; + business.isDisable = false; }); } @@ -106,7 +106,6 @@ const columns = computed(() => [ component: 'date', cardVisible: true, create: true, - 'update:modelValue': reactivateWorker(), }, { label: t('worker.business.tableVisibleColumns.company'), @@ -120,6 +119,7 @@ const columns = computed(() => [ optionValue: 'code', }, cardVisible: true, + create: true, }, { align: 'left', @@ -217,6 +217,7 @@ const columns = computed(() => [ label: t('worker.business.tableVisibleColumns.rate'), component: 'input', cardVisible: true, + create: true, }, { align: 'left', @@ -225,7 +226,7 @@ const columns = computed(() => [ label: t('worker.business.tableVisibleColumns.businessType'), attrs: { url: 'WorkerBusinessTypes', - fields: ['code', 'name'], + fields: ['id', 'name'], }, cardVisible: true, create: true, @@ -277,6 +278,7 @@ const columns = computed(() => [ card-class="grid-two q-gutter-x-md" :is-editable="true" :use-model="true" + @save-changes="reactivateWorker" />