8627-devToTest #1421
|
@ -1,26 +1,15 @@
|
|||
<script setup>
|
||||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
<template>
|
||||
<FormModel
|
||||
:url="`Departments/${route.params.id}`"
|
||||
model="department"
|
||||
auto-load
|
||||
class="full-width"
|
||||
>
|
||||
<FormModel model="Department" auto-load class="full-width">
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('globals.name')"
|
||||
:label="$t('globals.name')"
|
||||
v-model="data.name"
|
||||
:rules="validate('globals.name')"
|
||||
clearable
|
||||
|
@ -28,28 +17,28 @@ const { t } = useI18n();
|
|||
/>
|
||||
<VnInput
|
||||
v-model="data.code"
|
||||
:label="t('globals.code')"
|
||||
:label="$t('globals.code')"
|
||||
:rules="validate('globals.code')"
|
||||
clearable
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('department.chat')"
|
||||
:label="$t('department.chat')"
|
||||
v-model="data.chatName"
|
||||
:rules="validate('department.chat')"
|
||||
clearable
|
||||
/>
|
||||
<VnInput
|
||||
v-model="data.notificationEmail"
|
||||
:label="t('globals.params.email')"
|
||||
:label="$t('globals.params.email')"
|
||||
:rules="validate('globals.params.email')"
|
||||
clearable
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnSelect
|
||||
:label="t('department.bossDepartment')"
|
||||
:label="$t('department.bossDepartment')"
|
||||
v-model="data.workerFk"
|
||||
url="Workers/search"
|
||||
option-value="id"
|
||||
|
@ -59,7 +48,7 @@ const { t } = useI18n();
|
|||
:rules="validate('department.workerFk')"
|
||||
/>
|
||||
<VnSelect
|
||||
:label="t('department.selfConsumptionCustomer')"
|
||||
:label="$t('department.selfConsumptionCustomer')"
|
||||
v-model="data.clientFk"
|
||||
url="Clients"
|
||||
option-value="id"
|
||||
|
@ -71,11 +60,11 @@ const { t } = useI18n();
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('department.telework')"
|
||||
:label="$t('department.telework')"
|
||||
v-model="data.isTeleworking"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('department.notifyOnErrors')"
|
||||
:label="$t('department.notifyOnErrors')"
|
||||
v-model="data.hasToMistake"
|
||||
:false-value="0"
|
||||
:true-value="1"
|
||||
|
@ -83,17 +72,17 @@ const { t } = useI18n();
|
|||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('department.worksInProduction')"
|
||||
:label="$t('department.worksInProduction')"
|
||||
v-model="data.isProduction"
|
||||
/>
|
||||
<QCheckbox
|
||||
:label="t('department.hasToRefill')"
|
||||
:label="$t('department.hasToRefill')"
|
||||
v-model="data.hasToRefill"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('department.hasToSendMail')"
|
||||
:label="$t('department.hasToSendMail')"
|
||||
v-model="data.hasToSendMail"
|
||||
/>
|
||||
</VnRow>
|
||||
|
|
|
@ -50,7 +50,7 @@ const { openConfirmationModal } = useVnConfirm();
|
|||
:url="`Departments/${entityId}`"
|
||||
:summary="$props.summary"
|
||||
:to-module="{ name: 'WorkerDepartment' }"
|
||||
data-key="department"
|
||||
data-key="Department"
|
||||
>
|
||||
<template #menu="{}">
|
||||
<QItem
|
||||
|
|
Loading…
Reference in New Issue