Merge branch 'dev' into 7884-AddLabelerField
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
gitea/salix-front/pipeline/pr-dev This commit looks good
Details
This commit is contained in:
commit
d7fb8bdaf5
|
@ -2,9 +2,15 @@ import { boot } from 'quasar/wrappers';
|
||||||
import qFormMixin from './qformMixin';
|
import qFormMixin from './qformMixin';
|
||||||
import mainShortcutMixin from './mainShortcutMixin';
|
import mainShortcutMixin from './mainShortcutMixin';
|
||||||
import keyShortcut from './keyShortcut';
|
import keyShortcut from './keyShortcut';
|
||||||
|
import useNotify from 'src/composables/useNotify.js';
|
||||||
|
const { notify } = useNotify();
|
||||||
|
|
||||||
export default boot(({ app }) => {
|
export default boot(({ app }) => {
|
||||||
app.mixin(qFormMixin);
|
app.mixin(qFormMixin);
|
||||||
app.mixin(mainShortcutMixin);
|
app.mixin(mainShortcutMixin);
|
||||||
app.directive('shortcut', keyShortcut);
|
app.directive('shortcut', keyShortcut);
|
||||||
|
app.config.errorHandler = function (err) {
|
||||||
|
console.error(err);
|
||||||
|
notify('globals.error', 'negative', 'error');
|
||||||
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -297,11 +297,12 @@ const removeTag = (index, params, search) => {
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mt-lg">
|
<QItem class="q-mt-lg">
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
class="fill-icon-on-hover q-px-xs"
|
class="fill-icon-on-hover q-px-xs"
|
||||||
color="primary"
|
color="primary"
|
||||||
size="sm"
|
|
||||||
@click="tagValues.push({})"
|
@click="tagValues.push({})"
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
|
|
|
@ -69,10 +69,7 @@ const $props = defineProps({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
disableInfiniteScroll: {
|
|
||||||
type: Boolean,
|
|
||||||
default: false,
|
|
||||||
},
|
|
||||||
hasSubToolbar: {
|
hasSubToolbar: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: null,
|
default: null,
|
||||||
|
@ -305,6 +302,7 @@ defineExpose({
|
||||||
redirect: redirectFn,
|
redirect: redirectFn,
|
||||||
selected,
|
selected,
|
||||||
CrudModelRef,
|
CrudModelRef,
|
||||||
|
params,
|
||||||
});
|
});
|
||||||
|
|
||||||
function handleOnDataSaved(_) {
|
function handleOnDataSaved(_) {
|
||||||
|
@ -372,9 +370,7 @@ function handleOnDataSaved(_) {
|
||||||
ref="CrudModelRef"
|
ref="CrudModelRef"
|
||||||
@on-fetch="(...args) => emit('onFetch', ...args)"
|
@on-fetch="(...args) => emit('onFetch', ...args)"
|
||||||
:search-url="searchUrl"
|
:search-url="searchUrl"
|
||||||
:disable-infinite-scroll="
|
:disable-infinite-scroll="isTableMode"
|
||||||
$attrs['disableInfiniteScroll'] ? isTableMode : !disableInfiniteScroll
|
|
||||||
"
|
|
||||||
@save-changes="reload"
|
@save-changes="reload"
|
||||||
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
:has-sub-toolbar="$props.hasSubToolbar ?? isEditable"
|
||||||
:auto-load="hasParams || $attrs['auto-load']"
|
:auto-load="hasParams || $attrs['auto-load']"
|
||||||
|
@ -394,7 +390,7 @@ function handleOnDataSaved(_) {
|
||||||
card-container-class="grid-three"
|
card-container-class="grid-three"
|
||||||
flat
|
flat
|
||||||
:style="isTableMode && `max-height: ${tableHeight}`"
|
:style="isTableMode && `max-height: ${tableHeight}`"
|
||||||
:virtual-scroll="!isTableMode"
|
:virtual-scroll="isTableMode"
|
||||||
@virtual-scroll="
|
@virtual-scroll="
|
||||||
(event) =>
|
(event) =>
|
||||||
event.index > rows.length - 2 &&
|
event.index > rows.length - 2 &&
|
||||||
|
|
|
@ -400,7 +400,14 @@ defineExpose({
|
||||||
/>
|
/>
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="showFormDialog()" class="fill-icon">
|
<QBtn
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
@click="showFormDialog()"
|
||||||
|
class="fill-icon"
|
||||||
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Upload file') }}
|
{{ t('Upload file') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -0,0 +1,52 @@
|
||||||
|
<script setup>
|
||||||
|
import { onBeforeMount, ref, useAttrs } from 'vue';
|
||||||
|
import axios from 'axios';
|
||||||
|
import VnSelect from 'components/common/VnSelect.vue';
|
||||||
|
|
||||||
|
const { schema, table, column, translation, defaultOptions } = defineProps({
|
||||||
|
schema: {
|
||||||
|
type: String,
|
||||||
|
default: 'vn',
|
||||||
|
},
|
||||||
|
table: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
type: String,
|
||||||
|
required: true,
|
||||||
|
},
|
||||||
|
translation: {
|
||||||
|
type: Function,
|
||||||
|
default: null,
|
||||||
|
},
|
||||||
|
defaultOptions: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const $attrs = useAttrs();
|
||||||
|
const options = ref([]);
|
||||||
|
onBeforeMount(async () => {
|
||||||
|
options.value = [].concat(defaultOptions);
|
||||||
|
const { data } = await axios.get(`Applications/get-enum-values`, {
|
||||||
|
params: { schema, table, column },
|
||||||
|
});
|
||||||
|
|
||||||
|
for (const value of data)
|
||||||
|
options.value.push({
|
||||||
|
[$attrs['option-value'] ?? 'id']: value,
|
||||||
|
[$attrs['option-label'] ?? 'name']: translation ? translation(value) : value,
|
||||||
|
});
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<template>
|
||||||
|
<VnSelect
|
||||||
|
v-bind="$attrs"
|
||||||
|
:options="options"
|
||||||
|
:key="options.length"
|
||||||
|
:input-debounce="0"
|
||||||
|
/>
|
||||||
|
</template>
|
|
@ -268,6 +268,7 @@ input::-webkit-inner-spin-button {
|
||||||
max-width: 400px;
|
max-width: 400px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.edit-photo-btn {
|
.edit-photo-btn {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 12px;
|
right: 12px;
|
||||||
|
@ -280,3 +281,10 @@ input::-webkit-inner-spin-button {
|
||||||
color: var(--vn-label-color);
|
color: var(--vn-label-color);
|
||||||
text-transform: uppercase;
|
text-transform: uppercase;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.q-date {
|
||||||
|
&__today {
|
||||||
|
border: 2px solid $info;
|
||||||
|
color: $info;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
|
@ -104,6 +104,7 @@ globals:
|
||||||
ticket: Ticket
|
ticket: Ticket
|
||||||
campaign: Campaign
|
campaign: Campaign
|
||||||
weight: Weight
|
weight: Weight
|
||||||
|
error: Ups! Something went wrong
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Login
|
logIn: Login
|
||||||
addressEdit: Update address
|
addressEdit: Update address
|
||||||
|
|
|
@ -106,6 +106,7 @@ globals:
|
||||||
ticket: Ticket
|
ticket: Ticket
|
||||||
campaign: Campaña
|
campaign: Campaña
|
||||||
weight: Peso
|
weight: Peso
|
||||||
|
error: ¡Ups! Algo salió mal
|
||||||
pageTitles:
|
pageTitles:
|
||||||
logIn: Inicio de sesión
|
logIn: Inicio de sesión
|
||||||
addressEdit: Modificar consignatario
|
addressEdit: Modificar consignatario
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import { ref, watch } from 'vue';
|
import { ref, watch } from 'vue';
|
||||||
|
@ -24,7 +25,7 @@ watch(
|
||||||
<template>
|
<template>
|
||||||
<FormModel
|
<FormModel
|
||||||
ref="formModelRef"
|
ref="formModelRef"
|
||||||
:url="`VnUsers/preview`"
|
url="VnUsers/preview"
|
||||||
:url-update="`VnUsers/${route.params.id}/update-user`"
|
:url-update="`VnUsers/${route.params.id}/update-user`"
|
||||||
:filter="accountFilter"
|
:filter="accountFilter"
|
||||||
model="Accounts"
|
model="Accounts"
|
||||||
|
@ -43,6 +44,15 @@ watch(
|
||||||
option-value="code"
|
option-value="code"
|
||||||
option-label="code"
|
option-label="code"
|
||||||
/>
|
/>
|
||||||
|
<VnSelectEnum
|
||||||
|
schema="account"
|
||||||
|
table="user"
|
||||||
|
column="twoFactor"
|
||||||
|
v-model="data.twoFactor"
|
||||||
|
:label="t('account.card.twoFactor')"
|
||||||
|
option-value="code"
|
||||||
|
option-label="code"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
|
|
|
@ -142,7 +142,13 @@ const redirectToRoleSummary = (id) =>
|
||||||
<SubRoleCreateForm @on-submit-create-subrole="createSubRole" />
|
<SubRoleCreateForm @on-submit-create-subrole="createSubRole" />
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||||
<QBtn fab icon="add" color="primary" @click="openCreateSubRoleForm()">
|
<QBtn
|
||||||
|
fab
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
color="primary"
|
||||||
|
@click="openCreateSubRoleForm()"
|
||||||
|
>
|
||||||
<QTooltip>{{ t('warehouses.add') }}</QTooltip>
|
<QTooltip>{{ t('warehouses.add') }}</QTooltip>
|
||||||
</QBtn>
|
</QBtn>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
|
|
|
@ -35,6 +35,7 @@ account:
|
||||||
willDeactivated: User will be deactivated
|
willDeactivated: User will be deactivated
|
||||||
activated: User activated!
|
activated: User activated!
|
||||||
deactivated: User deactivated!
|
deactivated: User deactivated!
|
||||||
|
twoFactor: Two factor
|
||||||
actions:
|
actions:
|
||||||
setPassword: Set password
|
setPassword: Set password
|
||||||
disableAccount:
|
disableAccount:
|
||||||
|
|
|
@ -32,6 +32,7 @@ account:
|
||||||
activated: ¡Usuario activado!
|
activated: ¡Usuario activado!
|
||||||
deactivated: ¡Usuario desactivado!
|
deactivated: ¡Usuario desactivado!
|
||||||
newUser: Nuevo usuario
|
newUser: Nuevo usuario
|
||||||
|
twoFactor: Doble factor
|
||||||
privileges:
|
privileges:
|
||||||
delegate: Puede delegar privilegios
|
delegate: Puede delegar privilegios
|
||||||
actions:
|
actions:
|
||||||
|
|
|
@ -3,58 +3,18 @@ import { ref } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
|
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||||
import FetchData from 'components/FetchData.vue';
|
import FetchData from 'components/FetchData.vue';
|
||||||
import FormModel from 'components/FormModel.vue';
|
import FormModel from 'components/FormModel.vue';
|
||||||
import VnRow from 'components/ui/VnRow.vue';
|
import VnRow from 'components/ui/VnRow.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||||
|
|
||||||
import axios from 'axios';
|
|
||||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
|
||||||
const claimStates = ref([]);
|
|
||||||
const claimStatesCopy = ref([]);
|
|
||||||
const optionsList = ref([]);
|
|
||||||
|
|
||||||
const workersOptions = ref([]);
|
const workersOptions = ref([]);
|
||||||
|
|
||||||
function setClaimStates(data) {
|
|
||||||
claimStates.value = data;
|
|
||||||
claimStatesCopy.value = data;
|
|
||||||
}
|
|
||||||
|
|
||||||
async function getEnumValues() {
|
|
||||||
optionsList.value = [{ id: null, description: t('claim.null') }];
|
|
||||||
const { data } = await axios.get(`Applications/get-enum-values`, {
|
|
||||||
params: {
|
|
||||||
schema: 'vn',
|
|
||||||
table: 'claim',
|
|
||||||
column: 'pickup',
|
|
||||||
},
|
|
||||||
});
|
|
||||||
for (let value of data)
|
|
||||||
optionsList.value.push({ id: value, description: t(`claim.${value}`) });
|
|
||||||
}
|
|
||||||
|
|
||||||
getEnumValues();
|
|
||||||
|
|
||||||
const statesFilter = {
|
|
||||||
options: claimStates,
|
|
||||||
filterFn: (options, value) => {
|
|
||||||
const search = value.toLowerCase();
|
|
||||||
|
|
||||||
if (value === '') return claimStatesCopy.value;
|
|
||||||
|
|
||||||
return options.value.filter((row) => {
|
|
||||||
const description = row.description.toLowerCase();
|
|
||||||
|
|
||||||
return description.indexOf(search) > -1;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData
|
<FetchData
|
||||||
|
@ -70,7 +30,7 @@ const statesFilter = {
|
||||||
auto-load
|
auto-load
|
||||||
:reload="true"
|
:reload="true"
|
||||||
>
|
>
|
||||||
<template #form="{ data, validate, filter }">
|
<template #form="{ data, validate }">
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<VnInput
|
<VnInput
|
||||||
v-model="data.client.name"
|
v-model="data.client.name"
|
||||||
|
@ -101,20 +61,14 @@ const statesFilter = {
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
</VnSelect>
|
</VnSelect>
|
||||||
<QSelect
|
<VnSelect
|
||||||
v-model="data.claimStateFk"
|
v-model="data.claimStateFk"
|
||||||
:options="claimStates"
|
url="ClaimStates"
|
||||||
option-value="id"
|
|
||||||
option-label="description"
|
|
||||||
emit-value
|
|
||||||
:label="t('claim.state')"
|
:label="t('claim.state')"
|
||||||
map-options
|
option-label="description"
|
||||||
use-input
|
|
||||||
@filter="(value, update) => filter(value, update, statesFilter)"
|
|
||||||
:rules="validate('claim.claimStateFk')"
|
:rules="validate('claim.claimStateFk')"
|
||||||
:input-debounce="0"
|
:input-debounce="0"
|
||||||
>
|
/>
|
||||||
</QSelect>
|
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QInput
|
<QInput
|
||||||
|
@ -123,16 +77,14 @@ const statesFilter = {
|
||||||
:rules="validate('claim.packages')"
|
:rules="validate('claim.packages')"
|
||||||
type="number"
|
type="number"
|
||||||
/>
|
/>
|
||||||
<QSelect
|
<VnSelectEnum
|
||||||
v-model="data.pickup"
|
v-model="data.pickup"
|
||||||
:options="optionsList"
|
|
||||||
option-value="id"
|
|
||||||
option-label="description"
|
|
||||||
emit-value
|
|
||||||
:label="t('claim.pickup')"
|
:label="t('claim.pickup')"
|
||||||
map-options
|
table="claim"
|
||||||
use-input
|
column="pickup"
|
||||||
:input-debounce="0"
|
option-label="description"
|
||||||
|
:translation="(value) => t(`claim.${value}`)"
|
||||||
|
:default-options="[{ id: null, description: t('claim.null') }]"
|
||||||
/>
|
/>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -317,7 +317,7 @@ async function saveWhenHasChanges() {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="showImportDialog()" />
|
<QBtn fab color="primary" shortcut="+" icon="add" @click="showImportDialog()" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -246,7 +246,13 @@ function onDrag() {
|
||||||
</QDialog>
|
</QDialog>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<label for="fileInput">
|
<label for="fileInput">
|
||||||
<QBtn fab @click="inputFile.nativeEl.click()" icon="add" color="primary">
|
<QBtn
|
||||||
|
fab
|
||||||
|
@click="inputFile.nativeEl.click()"
|
||||||
|
shortcut="+"
|
||||||
|
icon="add"
|
||||||
|
color="primary"
|
||||||
|
>
|
||||||
<QInput
|
<QInput
|
||||||
ref="inputFile"
|
ref="inputFile"
|
||||||
type="file"
|
type="file"
|
||||||
|
|
|
@ -56,17 +56,18 @@ const customerContactsRef = ref(null);
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QIcon
|
<QBtn
|
||||||
@click="customerContactsRef.insert()"
|
@click="customerContactsRef.insert()"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add contact') }}
|
{{ t('Add contact') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -236,6 +236,7 @@ const toCustomerFileManagementCreate = () => {
|
||||||
@click.stop="toCustomerFileManagementCreate()"
|
@click.stop="toCustomerFileManagementCreate()"
|
||||||
color="primary"
|
color="primary"
|
||||||
fab
|
fab
|
||||||
|
shortcut="+"
|
||||||
icon="add"
|
icon="add"
|
||||||
/>
|
/>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
|
|
|
@ -99,7 +99,13 @@ const tableRef = ref();
|
||||||
</VnTable>
|
</VnTable>
|
||||||
|
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="toCustomerSamplesCreate()" color="primary" fab icon="add" />
|
<QBtn
|
||||||
|
@click.stop="toCustomerSamplesCreate()"
|
||||||
|
color="primary"
|
||||||
|
fab
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
/>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Send sample') }}
|
{{ t('Send sample') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -272,16 +272,17 @@ function handleLocation(data, location) {
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
|
|
||||||
<QIcon
|
<QBtn
|
||||||
@click.stop="addNote()"
|
@click.stop="addNote()"
|
||||||
class="cursor-pointer add-icon q-mt-md"
|
class="cursor-pointer add-icon q-mt-md"
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add note') }}
|
{{ t('Add note') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</template>
|
</template>
|
||||||
</FormModel>
|
</FormModel>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -35,6 +35,7 @@ const filter = {
|
||||||
],
|
],
|
||||||
where: { clientFk: route.params.id },
|
where: { clientFk: route.params.id },
|
||||||
order: ['shipped DESC', 'id'],
|
order: ['shipped DESC', 'id'],
|
||||||
|
limit: 30,
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
|
@ -149,7 +150,6 @@ const setShippedColor = (date) => {
|
||||||
auto-load
|
auto-load
|
||||||
order="shipped DESC, id"
|
order="shipped DESC, id"
|
||||||
:disable-option="{ card: true, table: true }"
|
:disable-option="{ card: true, table: true }"
|
||||||
limit="5"
|
|
||||||
class="full-width"
|
class="full-width"
|
||||||
:disable-infinite-scroll="true"
|
:disable-infinite-scroll="true"
|
||||||
>
|
>
|
||||||
|
|
|
@ -138,7 +138,13 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="entryObservationsRef.insert()" />
|
<QBtn
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
|
@click="entryObservationsRef.insert()"
|
||||||
|
/>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
<i18n>
|
<i18n>
|
||||||
|
|
|
@ -281,6 +281,7 @@ async function onSubmit() {
|
||||||
v-else
|
v-else
|
||||||
icon="add_circle"
|
icon="add_circle"
|
||||||
round
|
round
|
||||||
|
shortcut="+"
|
||||||
padding="xs"
|
padding="xs"
|
||||||
@click="setCreateDms()"
|
@click="setCreateDms()"
|
||||||
>
|
>
|
||||||
|
|
|
@ -230,7 +230,7 @@ async function insert() {
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn color="primary" icon="add" size="lg" round @click="insert" />
|
<QBtn color="primary" icon="add" shortcut="+" size="lg" round @click="insert" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -224,6 +224,7 @@ const formatOpt = (row, { model, options }, prop) => {
|
||||||
<QBtn
|
<QBtn
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="add"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
size="lg"
|
size="lg"
|
||||||
round
|
round
|
||||||
@click="invoiceInFormRef.insert()"
|
@click="invoiceInFormRef.insert()"
|
||||||
|
|
|
@ -405,6 +405,7 @@ const formatOpt = (row, { model, options }, prop) => {
|
||||||
color="primary"
|
color="primary"
|
||||||
icon="add"
|
icon="add"
|
||||||
size="lg"
|
size="lg"
|
||||||
|
shortcut="+"
|
||||||
round
|
round
|
||||||
@click="invoiceInFormRef.insert()"
|
@click="invoiceInFormRef.insert()"
|
||||||
>
|
>
|
||||||
|
|
|
@ -65,17 +65,18 @@ const focusLastInput = () => {
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<QIcon
|
<QBtn
|
||||||
@click="insertRow()"
|
@click="insertRow()"
|
||||||
class="cursor-pointer fill-icon-on-hover"
|
class="cursor-pointer fill-icon-on-hover"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
size="sm"
|
shortcut="+"
|
||||||
|
flat
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add barcode') }}
|
{{ t('Add barcode') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
|
|
|
@ -168,19 +168,20 @@ const insertTag = (rows) => {
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow class="justify-center items-center">
|
<VnRow class="justify-center items-center">
|
||||||
<QIcon
|
<QBtn
|
||||||
@click="insertTag(rows)"
|
@click="insertTag(rows)"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
:disable="!validRow"
|
:disable="!validRow"
|
||||||
color="primary"
|
color="primary"
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
style="flex: 0"
|
style="flex: 0"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('itemTags.addTag') }}
|
{{ t('itemTags.addTag') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -212,6 +212,7 @@ const decrement = (paramsObj, key) => {
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
size="12px"
|
size="12px"
|
||||||
|
shortcut="+"
|
||||||
@click="add(params, 'scopeDays')"
|
@click="add(params, 'scopeDays')"
|
||||||
/>
|
/>
|
||||||
<QBtn
|
<QBtn
|
||||||
|
|
|
@ -11,7 +11,7 @@ import FetchData from 'src/components/FetchData.vue';
|
||||||
import { dateRange } from 'src/filters';
|
import { dateRange } from 'src/filters';
|
||||||
|
|
||||||
defineProps({ dataKey: { type: String, required: true } });
|
defineProps({ dataKey: { type: String, required: true } });
|
||||||
const { t } = useI18n();
|
const { t, te } = useI18n();
|
||||||
const warehouses = ref();
|
const warehouses = ref();
|
||||||
const groupedStates = ref();
|
const groupedStates = ref();
|
||||||
|
|
||||||
|
@ -26,6 +26,12 @@ const handleScopeDays = (params, days, callback) => {
|
||||||
}
|
}
|
||||||
if (callback) callback();
|
if (callback) callback();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const getLocale = (label) => {
|
||||||
|
const param = label.split('.').at(-1);
|
||||||
|
const globalLocale = `globals.params.${param}`;
|
||||||
|
return te(globalLocale) ? t(globalLocale) : t(`params.${param}`);
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<FetchData url="Warehouses" auto-load @on-fetch="(data) => (warehouses = data)" />
|
<FetchData url="Warehouses" auto-load @on-fetch="(data) => (warehouses = data)" />
|
||||||
|
@ -43,10 +49,11 @@ const handleScopeDays = (params, days, callback) => {
|
||||||
:hidden-tags="['from', 'to', 'search']"
|
:hidden-tags="['from', 'to', 'search']"
|
||||||
:custom-tags="['scopeDays']"
|
:custom-tags="['scopeDays']"
|
||||||
:unremovable-params="['from', 'to', 'scopeDays']"
|
:unremovable-params="['from', 'to', 'scopeDays']"
|
||||||
|
search-url="saleMonitorTickets"
|
||||||
>
|
>
|
||||||
<template #tags="{ tag, formatFn }">
|
<template #tags="{ tag, formatFn }">
|
||||||
<div class="q-gutter-x-xs">
|
<div class="q-gutter-x-xs">
|
||||||
<strong v-text="`${t(`params.${tag.label}`)}:`" />
|
<strong v-text="`${getLocale(tag.label)}:`" />
|
||||||
<span v-text="formatFn(tag.value)" />
|
<span v-text="formatFn(tag.value)" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -110,7 +117,7 @@ const handleScopeDays = (params, days, callback) => {
|
||||||
url="Workers/search"
|
url="Workers/search"
|
||||||
:params="{ departmentCodes: ['VT'] }"
|
:params="{ departmentCodes: ['VT'] }"
|
||||||
is-outlined
|
is-outlined
|
||||||
option-value="code"
|
option-value="id"
|
||||||
option-label="name"
|
option-label="name"
|
||||||
:no-one="true"
|
:no-one="true"
|
||||||
>
|
>
|
||||||
|
|
|
@ -374,8 +374,10 @@ function addOrder(value, field, params) {
|
||||||
/>
|
/>
|
||||||
</QItem>
|
</QItem>
|
||||||
<QItem class="q-mt-lg">
|
<QItem class="q-mt-lg">
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
class="filter-icon"
|
class="filter-icon"
|
||||||
@click="tagValues.push({})"
|
@click="tagValues.push({})"
|
||||||
/>
|
/>
|
||||||
|
|
|
@ -88,7 +88,7 @@ async function deleteWorCenter(id) {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky :offset="[18, 18]">
|
<QPageSticky :offset="[18, 18]">
|
||||||
<QBtn @click.stop="dialog.show()" color="primary" fab icon="add">
|
<QBtn @click.stop="dialog.show()" color="primary" fab shortcut="+" icon="add">
|
||||||
<QDialog ref="dialog">
|
<QDialog ref="dialog">
|
||||||
<FormModelPopup
|
<FormModelPopup
|
||||||
:title="t('Add work center')"
|
:title="t('Add work center')"
|
||||||
|
|
|
@ -103,8 +103,8 @@ es:
|
||||||
Roadmap: Troncal
|
Roadmap: Troncal
|
||||||
ETD date: Fecha ETD
|
ETD date: Fecha ETD
|
||||||
ETD hour: Hora ETD
|
ETD hour: Hora ETD
|
||||||
Tractor plate: Matrícula tractor
|
Tractor plate: Matrícula tractora
|
||||||
Trailer plate: Matrícula trailer
|
Trailer plate: Matrícula remolque
|
||||||
Carrier: Transportista
|
Carrier: Transportista
|
||||||
Price: Precio
|
Price: Precio
|
||||||
Driver name: Nombre del conductor
|
Driver name: Nombre del conductor
|
||||||
|
|
|
@ -164,8 +164,8 @@ en:
|
||||||
to: To
|
to: To
|
||||||
es:
|
es:
|
||||||
params:
|
params:
|
||||||
tractorPlate: Matrícula del tractor
|
tractorPlate: Matrícula tractora
|
||||||
trailerPlate: Matrícula del trailer
|
trailerPlate: Matrícula remolque
|
||||||
supplierFk: Transportista
|
supplierFk: Transportista
|
||||||
price: Precio
|
price: Precio
|
||||||
driverName: Nombre del conductor
|
driverName: Nombre del conductor
|
||||||
|
@ -174,8 +174,8 @@ es:
|
||||||
to: Hasta
|
to: Hasta
|
||||||
From: Desde
|
From: Desde
|
||||||
To: Hasta
|
To: Hasta
|
||||||
Tractor Plate: Matrícula del tractor
|
Tractor Plate: Matrícula tractora
|
||||||
Trailer Plate: Matrícula del trailer
|
Trailer Plate: Matrícula remolque
|
||||||
Carrier: Transportista
|
Carrier: Transportista
|
||||||
Price: Precio
|
Price: Precio
|
||||||
Driver name: Nombre del conductor
|
Driver name: Nombre del conductor
|
||||||
|
|
|
@ -65,9 +65,10 @@ const updateDefaultStop = (data) => {
|
||||||
</div>
|
</div>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<QCardSection>
|
<QCardSection>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="roadmapStopsCrudRef.insert()"
|
@click="roadmapStopsCrudRef.insert()"
|
||||||
|
@ -75,7 +76,7 @@ const updateDefaultStop = (data) => {
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add stop') }}
|
{{ t('Add stop') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -149,8 +149,8 @@ const filter = {
|
||||||
<i18n>
|
<i18n>
|
||||||
es:
|
es:
|
||||||
Carrier: Transportista
|
Carrier: Transportista
|
||||||
Tractor Plate: Matrícula tractor
|
Tractor Plate: Matrícula tractora
|
||||||
Trailer Plate: Matrícula trailer
|
Trailer Plate: Matrícula remolque
|
||||||
Phone: Teléfono
|
Phone: Teléfono
|
||||||
Worker: Trabajador
|
Worker: Trabajador
|
||||||
Observations: Observaciones
|
Observations: Observaciones
|
||||||
|
|
|
@ -237,4 +237,5 @@ es:
|
||||||
Price: Precio
|
Price: Precio
|
||||||
Observations: Observaciones
|
Observations: Observaciones
|
||||||
Preview: Vista previa
|
Preview: Vista previa
|
||||||
|
Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
|
||||||
</i18n>
|
</i18n>
|
||||||
|
|
|
@ -396,7 +396,7 @@ const openSmsDialog = async () => {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky :offset="[20, 20]">
|
<QPageSticky :offset="[20, 20]">
|
||||||
<QBtn fab icon="add" color="primary" @click="openTicketsDialog">
|
<QBtn fab icon="add" shortcut="+" color="primary" @click="openTicketsDialog">
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add ticket') }}
|
{{ t('Add ticket') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -102,9 +102,7 @@ const setWireTransfer = async () => {
|
||||||
<VnInput :label="t('supplier.accounts.iban')" v-model="row.iban">
|
<VnInput :label="t('supplier.accounts.iban')" v-model="row.iban">
|
||||||
<template #append>
|
<template #append>
|
||||||
<QIcon name="info" class="cursor-info">
|
<QIcon name="info" class="cursor-info">
|
||||||
<QTooltip>{{
|
<QTooltip>{{ t('components.iban_tooltip') }}</QTooltip>
|
||||||
t('components.iban_tooltip')
|
|
||||||
}}</QTooltip>
|
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</template>
|
</template>
|
||||||
</VnInput>
|
</VnInput>
|
||||||
|
@ -165,9 +163,10 @@ const setWireTransfer = async () => {
|
||||||
</div>
|
</div>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="supplierAccountRef.insert()"
|
@click="supplierAccountRef.insert()"
|
||||||
|
@ -175,7 +174,7 @@ const setWireTransfer = async () => {
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add account') }}
|
{{ t('Add account') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -84,9 +84,10 @@ const insertRow = () => {
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCardSection>
|
</QCardSection>
|
||||||
<VnRow>
|
<VnRow>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add"
|
flat
|
||||||
size="sm"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="insertRow()"
|
@click="insertRow()"
|
||||||
|
@ -94,7 +95,7 @@ const insertRow = () => {
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Add contact') }}
|
{{ t('Add contact') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -109,7 +109,7 @@ const getEntryQueryParams = (supplier) => {
|
||||||
:subtitle="data.subtitle"
|
:subtitle="data.subtitle"
|
||||||
:filter="filter"
|
:filter="filter"
|
||||||
@on-fetch="setData"
|
@on-fetch="setData"
|
||||||
data-key="supplier"
|
data-key="supplierDescriptor"
|
||||||
:summary="$props.summary"
|
:summary="$props.summary"
|
||||||
>
|
>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
|
|
|
@ -19,8 +19,8 @@ const sageTransactionTypesOptions = ref([]);
|
||||||
const supplierActivitiesOptions = ref([]);
|
const supplierActivitiesOptions = ref([]);
|
||||||
|
|
||||||
function handleLocation(data, location) {
|
function handleLocation(data, location) {
|
||||||
const { town, label, provinceFk, countryFk } = location ?? {};
|
const { town, code, provinceFk, countryFk } = location ?? {};
|
||||||
data.postCode = label;
|
data.postCode = code;
|
||||||
data.city = town;
|
data.city = town;
|
||||||
data.provinceFk = provinceFk;
|
data.provinceFk = provinceFk;
|
||||||
data.countryFk = countryFk;
|
data.countryFk = countryFk;
|
||||||
|
|
|
@ -87,17 +87,18 @@ watch(
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<VnRow v-if="observationTypes.length > rows.length">
|
<VnRow v-if="observationTypes.length > rows.length">
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
class="fill-icon-on-hover q-ml-md"
|
class="fill-icon-on-hover q-ml-md"
|
||||||
size="sm"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="ticketNotesCrudRef.insert()"
|
@click="ticketNotesCrudRef.insert()"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('ticketNotes.addNote') }}
|
{{ t('ticketNotes.addNote') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</VnRow>
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -114,17 +114,20 @@ watch(
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
</div>
|
</div>
|
||||||
<QIcon
|
<VnRow>
|
||||||
name="add_circle"
|
<QBtn
|
||||||
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
class="fill-icon-on-hover q-ml-md"
|
class="fill-icon-on-hover q-ml-md"
|
||||||
size="sm"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
@click="ticketPackagingsCrudRef.insert()"
|
@click="ticketPackagingsCrudRef.insert()"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('package.addPackage') }}
|
{{ t('package.addPackage') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
|
</VnRow>
|
||||||
</QCard>
|
</QCard>
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
|
|
|
@ -735,6 +735,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
size="md"
|
size="md"
|
||||||
round
|
round
|
||||||
flat
|
flat
|
||||||
|
shortcut="+"
|
||||||
:disable="!isTicketEditable"
|
:disable="!isTicketEditable"
|
||||||
@click="insertRow()"
|
@click="insertRow()"
|
||||||
>
|
>
|
||||||
|
@ -746,7 +747,7 @@ onUnmounted(() => (stateStore.rightDrawer = false));
|
||||||
</QTable>
|
</QTable>
|
||||||
|
|
||||||
<QPageSticky :offset="[20, 20]">
|
<QPageSticky :offset="[20, 20]">
|
||||||
<QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" />
|
<QBtn @click="newOrderFromTicket()" color="primary" fab icon="add" shortcut="+" />
|
||||||
<QTooltip class="text-no-wrap">
|
<QTooltip class="text-no-wrap">
|
||||||
{{ t('Add item to basket') }}
|
{{ t('Add item to basket') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
|
|
|
@ -184,6 +184,12 @@ const columns = computed(() => [
|
||||||
</template>
|
</template>
|
||||||
</CrudModel>
|
</CrudModel>
|
||||||
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
<QPageSticky position="bottom-right" :offset="[25, 25]">
|
||||||
<QBtn fab color="primary" icon="add" @click="ticketServiceCrudRef.insert()" />
|
<QBtn
|
||||||
|
fab
|
||||||
|
color="primary"
|
||||||
|
icon="add"
|
||||||
|
@click="ticketServiceCrudRef.insert()"
|
||||||
|
shortcut="+"
|
||||||
|
/>
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -112,6 +112,7 @@ warehouses();
|
||||||
<template #append>
|
<template #append>
|
||||||
<QBtn
|
<QBtn
|
||||||
icon="add"
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
flat
|
flat
|
||||||
dense
|
dense
|
||||||
size="12px"
|
size="12px"
|
||||||
|
|
|
@ -11,6 +11,9 @@ import TravelSummary from './Card/TravelSummary.vue';
|
||||||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||||
import { toDate } from 'src/filters';
|
import { toDate } from 'src/filters';
|
||||||
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||||
|
import { dateRange } from 'src/filters';
|
||||||
|
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||||
|
|
||||||
const { viewSummary } = useSummaryDialog();
|
const { viewSummary } = useSummaryDialog();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -24,11 +27,27 @@ const $props = defineProps({
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
|
|
||||||
|
onMounted(async () => {
|
||||||
|
stateStore.rightDrawer = true;
|
||||||
|
handleScopeDays();
|
||||||
|
});
|
||||||
|
|
||||||
const cloneTravel = (travelData) => {
|
const cloneTravel = (travelData) => {
|
||||||
const stringifiedTravelData = JSON.stringify(travelData);
|
const stringifiedTravelData = JSON.stringify(travelData);
|
||||||
redirectToCreateView(stringifiedTravelData);
|
redirectToCreateView(stringifiedTravelData);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
function handleScopeDays(days = 7) {
|
||||||
|
days = +days;
|
||||||
|
tableRef.value.params.scopeDays = days;
|
||||||
|
const [landedFrom, landedTo] = dateRange(Date.vnNew());
|
||||||
|
landedTo.setDate(landedTo.getDate() + days);
|
||||||
|
|
||||||
|
tableRef.value.params.landedFrom = landedFrom;
|
||||||
|
tableRef.value.params.landedTo = landedTo;
|
||||||
|
}
|
||||||
|
|
||||||
const redirectToCreateView = (queryParams) => {
|
const redirectToCreateView = (queryParams) => {
|
||||||
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
|
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
|
||||||
};
|
};
|
||||||
|
@ -37,10 +56,6 @@ const redirectCreateEntryView = (travelData) => {
|
||||||
router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
|
router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
|
||||||
stateStore.rightDrawer = true;
|
|
||||||
});
|
|
||||||
|
|
||||||
const columns = computed(() => [
|
const columns = computed(() => [
|
||||||
{
|
{
|
||||||
align: 'left',
|
align: 'left',
|
||||||
|
@ -241,6 +256,17 @@ const columns = computed(() => [
|
||||||
:class="{ 'is-active': row.isReceived }"
|
:class="{ 'is-active': row.isReceived }"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<template #moreFilterPanel="{ params }">
|
||||||
|
<VnInputNumber
|
||||||
|
:label="t('params.scopeDays')"
|
||||||
|
v-model.number="params.scopeDays"
|
||||||
|
@keyup.enter="(evt) => handleScopeDays(evt.target.value)"
|
||||||
|
@remove="handleScopeDays()"
|
||||||
|
class="q-px-xs q-pr-lg"
|
||||||
|
filled
|
||||||
|
dense
|
||||||
|
/>
|
||||||
|
</template>
|
||||||
</VnTable>
|
</VnTable>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
|
|
@ -103,7 +103,7 @@ async function remove(row) {
|
||||||
url-create="WagonTypes"
|
url-create="WagonTypes"
|
||||||
model="WagonType"
|
model="WagonType"
|
||||||
:form-initial-data="initialData"
|
:form-initial-data="initialData"
|
||||||
@on-data-saved="window.location.reload()"
|
@on-data-saved="tableRef.reload()"
|
||||||
auto-load
|
auto-load
|
||||||
>
|
>
|
||||||
<template #form-inputs="{ data }">
|
<template #form-inputs="{ data }">
|
||||||
|
|
|
@ -5,7 +5,7 @@ import { useArrayData } from 'src/composables/useArrayData';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
import { useRouter } from 'vue-router';
|
import { useRouter } from 'vue-router';
|
||||||
import VnTable from 'src/components/VnTable/VnTable.vue';
|
import VnTable from 'src/components/VnTable/VnTable.vue';
|
||||||
import { computed } from 'vue';
|
import { computed, ref } from 'vue';
|
||||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||||
import VnInput from 'src/components/common/VnInput.vue';
|
import VnInput from 'src/components/common/VnInput.vue';
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ const arrayData = useArrayData('WagonList');
|
||||||
const store = arrayData.store;
|
const store = arrayData.store;
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
const tableRef = ref();
|
||||||
const filter = {
|
const filter = {
|
||||||
include: {
|
include: {
|
||||||
relation: 'type',
|
relation: 'type',
|
||||||
|
@ -107,9 +107,7 @@ async function remove(row) {
|
||||||
:create="{
|
:create="{
|
||||||
urlCreate: 'Wagons',
|
urlCreate: 'Wagons',
|
||||||
title: t('Create new wagon'),
|
title: t('Create new wagon'),
|
||||||
onDataSaved: () => {
|
onDataSaved: () => tableRef.reload(),
|
||||||
window.location.reload();
|
|
||||||
},
|
|
||||||
formInitialData: {},
|
formInitialData: {},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
|
|
|
@ -152,7 +152,11 @@ const refetch = async () => await cardDescriptorRef.value.getData();
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity }">
|
<template #body="{ entity }">
|
||||||
<VnLv :label="t('worker.card.user')" :value="entity.user?.name" />
|
<VnLv :label="t('worker.card.user')" :value="entity.user?.name" />
|
||||||
<VnLv :label="t('worker.card.email')" :value="entity.user?.email" copy />
|
<VnLv
|
||||||
|
:label="t('worker.card.email')"
|
||||||
|
:value="entity.user?.emailUser?.email"
|
||||||
|
copy
|
||||||
|
/>
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.list.department')"
|
:label="t('worker.list.department')"
|
||||||
:value="entity.department ? entity.department.department.name : null"
|
:value="entity.department ? entity.department.department.name : null"
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref, onMounted, computed } from 'vue';
|
import { ref, onBeforeMount, computed } from 'vue';
|
||||||
import { useRoute } from 'vue-router';
|
import { useRoute } from 'vue-router';
|
||||||
import { useI18n } from 'vue-i18n';
|
import { useI18n } from 'vue-i18n';
|
||||||
|
import axios from 'axios';
|
||||||
import { dashIfEmpty, toDate } from 'src/filters';
|
import { dashIfEmpty, toDate } from 'src/filters';
|
||||||
import { getUrl } from 'src/composables/getUrl';
|
|
||||||
import VnLv from 'src/components/ui/VnLv.vue';
|
import VnLv from 'src/components/ui/VnLv.vue';
|
||||||
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
import VnLinkPhone from 'src/components/ui/VnLinkPhone.vue';
|
||||||
import CardSummary from 'components/ui/CardSummary.vue';
|
import CardSummary from 'components/ui/CardSummary.vue';
|
||||||
|
@ -11,6 +11,7 @@ import VnUserLink from 'src/components/ui/VnUserLink.vue';
|
||||||
import VnTitle from 'src/components/common/VnTitle.vue';
|
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||||
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
import RoleDescriptorProxy from 'src/pages/Account/Role/Card/RoleDescriptorProxy.vue';
|
||||||
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
import DepartmentDescriptorProxy from 'src/pages/Department/Card/DepartmentDescriptorProxy.vue';
|
||||||
|
import { useRole } from 'src/composables/useRole';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const { t } = useI18n();
|
const { t } = useI18n();
|
||||||
|
@ -23,64 +24,27 @@ const $props = defineProps({
|
||||||
});
|
});
|
||||||
|
|
||||||
const entityId = computed(() => $props.id || route.params.id);
|
const entityId = computed(() => $props.id || route.params.id);
|
||||||
const workerUrl = ref();
|
const basicDataUrl = ref(null);
|
||||||
|
const isHr = computed(() => useRole().hasAny(['hr']));
|
||||||
|
const advancedSummary = ref();
|
||||||
|
|
||||||
onMounted(async () => {
|
onBeforeMount(async () => {
|
||||||
workerUrl.value = (await getUrl('')) + `worker/${entityId.value}/`;
|
if (isHr.value) {
|
||||||
|
advancedSummary.value = (
|
||||||
|
await axios.get('Workers/advancedSummary', {
|
||||||
|
params: { filter: { where: { id: entityId.value } } },
|
||||||
|
})
|
||||||
|
).data[0];
|
||||||
|
basicDataUrl.value = `#/worker/${entityId.value}/basic-data`;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
const filter = {
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'user',
|
|
||||||
scope: {
|
|
||||||
fields: ['name', 'nickname', 'roleFk'],
|
|
||||||
|
|
||||||
include: [
|
|
||||||
{
|
|
||||||
relation: 'role',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'emailUser',
|
|
||||||
scope: {
|
|
||||||
fields: ['email'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'department',
|
|
||||||
scope: {
|
|
||||||
include: {
|
|
||||||
relation: 'department',
|
|
||||||
scope: {
|
|
||||||
fields: ['name'],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'boss',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'client',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
relation: 'sip',
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<CardSummary
|
<CardSummary
|
||||||
ref="summary"
|
ref="summary"
|
||||||
:url="`Workers/${entityId}`"
|
:url="`Workers/summary`"
|
||||||
:filter="filter"
|
:filter="{ where: { id: entityId } }"
|
||||||
data-key="WorkerSummary"
|
data-key="WorkerSummary"
|
||||||
>
|
>
|
||||||
<template #header="{ entity }">
|
<template #header="{ entity }">
|
||||||
|
@ -88,10 +52,7 @@ const filter = {
|
||||||
</template>
|
</template>
|
||||||
<template #body="{ entity: worker }">
|
<template #body="{ entity: worker }">
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle
|
<VnTitle :url="basicDataUrl" :text="t('worker.summary.basicData')" />
|
||||||
:url="`#/worker/${entityId}/basic-data`"
|
|
||||||
:text="t('worker.summary.basicData')"
|
|
||||||
/>
|
|
||||||
<VnLv :label="t('worker.card.name')" :value="worker.user?.nickname" />
|
<VnLv :label="t('worker.card.name')" :value="worker.user?.nickname" />
|
||||||
<VnLv :label="t('worker.list.department')">
|
<VnLv :label="t('worker.list.department')">
|
||||||
<template #value>
|
<template #value>
|
||||||
|
@ -128,13 +89,9 @@ const filter = {
|
||||||
<VnLinkPhone :phone-number="worker.client?.phone" />
|
<VnLinkPhone :phone-number="worker.client?.phone" />
|
||||||
</template>
|
</template>
|
||||||
</VnLv>
|
</VnLv>
|
||||||
<VnLv :label="t('worker.summary.locker')" :value="worker.locker" />
|
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one" v-if="advancedSummary">
|
||||||
<VnTitle
|
<VnTitle :url="basicDataUrl" :text="t('worker.summary.basicData')" />
|
||||||
:url="`#/worker/${entityId}/basic-data`"
|
|
||||||
:text="t('worker.summary.basicData')"
|
|
||||||
/>
|
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.summary.fiDueDate')"
|
:label="t('worker.summary.fiDueDate')"
|
||||||
:value="toDate(worker.fiDueDate)"
|
:value="toDate(worker.fiDueDate)"
|
||||||
|
@ -162,7 +119,6 @@ const filter = {
|
||||||
</QCard>
|
</QCard>
|
||||||
<QCard class="vn-one">
|
<QCard class="vn-one">
|
||||||
<VnTitle :text="t('worker.summary.userData')" />
|
<VnTitle :text="t('worker.summary.userData')" />
|
||||||
<VnLv :label="t('worker.summary.userId')" :value="worker?.user?.id" />
|
|
||||||
<VnLv :label="t('worker.card.name')" :value="worker?.user?.nickname" />
|
<VnLv :label="t('worker.card.name')" :value="worker?.user?.nickname" />
|
||||||
<VnLv
|
<VnLv
|
||||||
:label="t('worker.list.email')"
|
:label="t('worker.list.email')"
|
||||||
|
|
|
@ -561,15 +561,16 @@ onMounted(async () => {
|
||||||
<span class="q-mb-md text-sm text-body1">
|
<span class="q-mb-md text-sm text-body1">
|
||||||
{{ secondsToHoursMinutes(day.dayData?.workedHours) }}
|
{{ secondsToHoursMinutes(day.dayData?.workedHours) }}
|
||||||
</span>
|
</span>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add_circle"
|
icon="add_circle"
|
||||||
|
shortcut="+"
|
||||||
|
flat
|
||||||
color="primary"
|
color="primary"
|
||||||
class="fill-icon cursor-pointer"
|
class="fill-icon cursor-pointer"
|
||||||
size="sm"
|
|
||||||
@click="showWorkerTimeForm(day.dayData?.dated, 'create')"
|
@click="showWorkerTimeForm(day.dayData?.dated, 'create')"
|
||||||
>
|
>
|
||||||
<QTooltip>{{ t('Add time') }}</QTooltip>
|
<QTooltip>{{ t('Add time') }}</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</div>
|
</div>
|
||||||
</QTd>
|
</QTd>
|
||||||
</QTr>
|
</QTr>
|
||||||
|
|
|
@ -180,17 +180,18 @@ function handleEvent(type, event, node) {
|
||||||
{{ t('Remove') }}
|
{{ t('Remove') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QIcon>
|
||||||
<QIcon
|
<QBtn
|
||||||
name="add"
|
|
||||||
color="primary"
|
color="primary"
|
||||||
size="sm"
|
flat
|
||||||
|
icon="add"
|
||||||
|
shortcut="+"
|
||||||
class="cursor-pointer"
|
class="cursor-pointer"
|
||||||
@click.stop="showCreateNodeForm(node.id)"
|
@click.stop="showCreateNodeForm(node.id)"
|
||||||
>
|
>
|
||||||
<QTooltip>
|
<QTooltip>
|
||||||
{{ t('Create') }}
|
{{ t('Create') }}
|
||||||
</QTooltip>
|
</QTooltip>
|
||||||
</QIcon>
|
</QBtn>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -74,7 +74,7 @@ async function remove(row) {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||||
<QBtn @click="create" fab icon="add" color="primary" />
|
<QBtn @click="create" fab icon="add" shortcut="+" color="primary" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -74,7 +74,7 @@ async function remove(row) {
|
||||||
</VnPaginate>
|
</VnPaginate>
|
||||||
</div>
|
</div>
|
||||||
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
<QPageSticky position="bottom-right" :offset="[18, 18]">
|
||||||
<QBtn @click="create" fab icon="add" color="primary" />
|
<QBtn @click="create" fab icon="add" shortcut="+" color="primary" />
|
||||||
</QPageSticky>
|
</QPageSticky>
|
||||||
</QPage>
|
</QPage>
|
||||||
</template>
|
</template>
|
||||||
|
|
Loading…
Reference in New Issue