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 { useRoute } from 'vue-router';
|
||||||
import VnTable from 'components/VnTable/VnTable.vue';
|
import VnTable from 'components/VnTable/VnTable.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import worker from 'src/router/modules/worker';
|
|
||||||
import { useQuasar } from 'quasar';
|
import { useQuasar } from 'quasar';
|
||||||
|
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -29,7 +28,7 @@ const businessFilter = {
|
||||||
{
|
{
|
||||||
relation: 'companyCode',
|
relation: 'companyCode',
|
||||||
scope: {
|
scope: {
|
||||||
fields: ['id', 'code'],
|
fields: ['code'],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
@ -71,8 +70,9 @@ const businessFilter = {
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
||||||
async function reactivateWorker(value) {
|
async function reactivateWorker(business) {
|
||||||
if (value === null) return;
|
console.log('value: ', business);
|
||||||
|
if (business === null) return;
|
||||||
quasar
|
quasar
|
||||||
.dialog({
|
.dialog({
|
||||||
message: t('Do you want to reactivate the user?'),
|
message: t('Do you want to reactivate the user?'),
|
||||||
|
@ -83,7 +83,7 @@ async function reactivateWorker(value) {
|
||||||
cancel: true,
|
cancel: true,
|
||||||
})
|
})
|
||||||
.onOk(async () => {
|
.onOk(async () => {
|
||||||
worker.isDisable = false;
|
business.isDisable = false;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -106,7 +106,6 @@ const columns = computed(() => [
|
||||||
component: 'date',
|
component: 'date',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
'update:modelValue': reactivateWorker(),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: t('worker.business.tableVisibleColumns.company'),
|
label: t('worker.business.tableVisibleColumns.company'),
|
||||||
|
@ -120,6 +119,7 @@ const columns = computed(() => [
|
||||||
optionValue: 'code',
|
optionValue: 'code',
|
||||||
},
|
},
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -217,6 +217,7 @@ const columns = computed(() => [
|
||||||
label: t('worker.business.tableVisibleColumns.rate'),
|
label: t('worker.business.tableVisibleColumns.rate'),
|
||||||
component: 'input',
|
component: 'input',
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
|
create: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -225,7 +226,7 @@ const columns = computed(() => [
|
||||||
label: t('worker.business.tableVisibleColumns.businessType'),
|
label: t('worker.business.tableVisibleColumns.businessType'),
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'WorkerBusinessTypes',
|
url: 'WorkerBusinessTypes',
|
||||||
fields: ['code', 'name'],
|
fields: ['id', 'name'],
|
||||||
},
|
},
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
create: true,
|
create: true,
|
||||||
|
@ -277,6 +278,7 @@ const columns = computed(() => [
|
||||||
card-class="grid-two q-gutter-x-md"
|
card-class="grid-two q-gutter-x-md"
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
|
@save-changes="reactivateWorker"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped></style>
|
<style lang="scss" scoped></style>
|
||||||
|
|
Loading…
Reference in New Issue