forked from verdnatura/salix-front
refs #6553 fix VnTable
This commit is contained in:
parent
8363f813de
commit
8f925401d5
|
@ -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"
|
||||
/>
|
||||
</template>
|
||||
<style lang="scss" scoped></style>
|
||||
|
|
Loading…
Reference in New Issue