forked from verdnatura/salix-front
fix(worker): add searchurls
This commit is contained in:
parent
c1e4c45318
commit
6c9627c6c5
|
@ -3,11 +3,12 @@ import { ref, computed } from 'vue';
|
||||||
import { useI18n } from 'vue-i18n';
|
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 FetchData from 'src/components/FetchData.vue';
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
|
const payrollComponents = ref([]);
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const entityId = computed(() => route.params.id);
|
const entityId = computed(() => route.params.id);
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -25,8 +26,9 @@ const columns = computed(() => [
|
||||||
create: true,
|
create: true,
|
||||||
component: 'select',
|
component: 'select',
|
||||||
attrs: {
|
attrs: {
|
||||||
url: 'payrollComponents',
|
options: payrollComponents,
|
||||||
fields: ['id', 'name'],
|
optionLabel: 'name',
|
||||||
|
optionValue: 'id',
|
||||||
},
|
},
|
||||||
cardVisible: true,
|
cardVisible: true,
|
||||||
},
|
},
|
||||||
|
@ -73,6 +75,16 @@ const columns = computed(() => [
|
||||||
]);
|
]);
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
|
<FetchData
|
||||||
|
url="PayrollComponents"
|
||||||
|
:filter="{
|
||||||
|
fields: ['id', 'name'],
|
||||||
|
where: { name: { neq: '' } },
|
||||||
|
order: 'name ASC',
|
||||||
|
}"
|
||||||
|
@on-fetch="(data) => (payrollComponents = data)"
|
||||||
|
auto-load
|
||||||
|
/>
|
||||||
<VnTable
|
<VnTable
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
data-key="WorkerBalance"
|
data-key="WorkerBalance"
|
||||||
|
@ -94,6 +106,7 @@ const columns = computed(() => [
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
|
search-url="balance"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -134,6 +134,7 @@ const columns = computed(() => [
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
|
search-url="formation"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -100,5 +100,6 @@ const columns = [
|
||||||
:is-editable="true"
|
:is-editable="true"
|
||||||
:use-model="true"
|
:use-model="true"
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
|
search-url="medical"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -70,6 +70,7 @@ function setNotifications(data) {
|
||||||
:default-remove="false"
|
:default-remove="false"
|
||||||
:default-save="false"
|
:default-save="false"
|
||||||
@on-fetch="setNotifications"
|
@on-fetch="setNotifications"
|
||||||
|
search-url="notifications"
|
||||||
>
|
>
|
||||||
<template #body>
|
<template #body>
|
||||||
<div
|
<div
|
||||||
|
|
|
@ -63,6 +63,7 @@ function reloadData() {
|
||||||
url="DeviceProductionUsers"
|
url="DeviceProductionUsers"
|
||||||
:filter="{ where: { userFk: routeId } }"
|
:filter="{ where: { userFk: routeId } }"
|
||||||
order="id"
|
order="id"
|
||||||
|
search-url="pda"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #body="{ rows }">
|
<template #body="{ rows }">
|
||||||
|
|
Loading…
Reference in New Issue