Merge branch 'master' into Hotfix-VnSearchbarRemoveParams
gitea/salix-front/pipeline/pr-master This commit looks good
Details
gitea/salix-front/pipeline/pr-master This commit looks good
Details
This commit is contained in:
commit
afe3795e39
|
@ -361,7 +361,7 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
@on-fetch="(data) => (warehousesOptions = data)"
|
||||
auto-load
|
||||
url="Warehouses"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC' }"
|
||||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
|
@ -394,7 +394,6 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
/>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<QPage>
|
||||
<VnTable
|
||||
@on-fetch="
|
||||
(data) =>
|
||||
|
@ -425,15 +424,12 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
'row-key': 'id',
|
||||
selection: 'multiple',
|
||||
}"
|
||||
:crud-model="{
|
||||
disableInfiniteScroll: true,
|
||||
}"
|
||||
:use-model="true"
|
||||
v-model:selected="rowsSelected"
|
||||
:create-as-dialog="false"
|
||||
:create="{
|
||||
onDataSaved: handleOnDataSave,
|
||||
}"
|
||||
:use-model="true"
|
||||
:disable-option="{ card: true }"
|
||||
>
|
||||
<template #header-selection="scope">
|
||||
|
@ -578,7 +574,6 @@ function handleOnDataSave({ CrudModelRef }) {
|
|||
@on-data-saved="onEditCellDataSaved()"
|
||||
/>
|
||||
</QDialog>
|
||||
</QPage>
|
||||
</template>
|
||||
<style lang="scss">
|
||||
.q-table th,
|
||||
|
|
|
@ -1,42 +1,33 @@
|
|||
<script setup>
|
||||
import { ref, computed, onMounted, watch } from 'vue';
|
||||
import { ref, computed, onMounted } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import TicketDescriptorProxy from 'src/pages/Ticket/Card/TicketDescriptorProxy.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import { dashIfEmpty, toCurrency } from 'filters/index';
|
||||
import { toCurrency } from 'filters/index';
|
||||
import useNotify from 'src/composables/useNotify.js';
|
||||
import axios from 'axios';
|
||||
import ItemRequestDenyForm from './ItemRequestDenyForm.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import ItemRequestFilter from './ItemRequestFilter.vue';
|
||||
const { t } = useI18n();
|
||||
const { notify } = useNotify();
|
||||
const stateStore = useStateStore();
|
||||
let filterParams = ref({});
|
||||
const denyFormRef = ref(null);
|
||||
const denyRequestId = ref(null);
|
||||
const denyRequestIndex = ref(null);
|
||||
const itemRequestsOptions = ref([]);
|
||||
const arrayData = useArrayData('ItemRequests', {
|
||||
url: 'TicketRequests/filter',
|
||||
userParams: filterParams,
|
||||
order: ['shippedDate ASC', 'isOk ASC'],
|
||||
});
|
||||
const store = arrayData.store;
|
||||
|
||||
const userParams = {
|
||||
state: 'pending',
|
||||
daysOnward: 7,
|
||||
};
|
||||
|
||||
const tableRef = ref();
|
||||
watch(
|
||||
() => store.data,
|
||||
(value) => (itemRequestsOptions.value = value)
|
||||
);
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
|
@ -220,14 +211,14 @@ const onDenyAccept = (_, responseData) => {
|
|||
denyRequestIndex.value = null;
|
||||
tableRef.value.reload();
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
await arrayData.fetch({ append: false });
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<ItemRequestFilter data-key="itemRequest" ref="tableRef" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="itemRequest"
|
||||
|
@ -236,6 +227,7 @@ onMounted(async () => {
|
|||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:is-editable="true"
|
||||
:right-search="false"
|
||||
auto-load
|
||||
:disable-option="{ card: true }"
|
||||
chip-locale="item.params"
|
||||
|
@ -297,14 +289,17 @@ onMounted(async () => {
|
|||
<template #moreFilterPanel="{ params }">
|
||||
<VnInputNumber
|
||||
:label="t('params.scopeDays')"
|
||||
v-model.number="params.scopeDays"
|
||||
v-model.number="params.daysOnward"
|
||||
@keyup.enter="(evt) => handleScopeDays(evt.target.value)"
|
||||
@remove="handleScopeDays()"
|
||||
class="q-px-xs q-pr-lg"
|
||||
filled
|
||||
dense
|
||||
lazy-rules
|
||||
is-outlined
|
||||
/>
|
||||
</template>
|
||||
|
||||
<template #column-denyOptions="{ row, rowIndex }">
|
||||
<QTd class="sticky no-padding">
|
||||
<QIcon
|
||||
|
|
|
@ -6,7 +6,6 @@ import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
|||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
|
@ -42,20 +41,6 @@ const exprBuilder = (param, value) => {
|
|||
};
|
||||
}
|
||||
};
|
||||
|
||||
const add = (paramsObj, key) => {
|
||||
if (paramsObj[key] === undefined) {
|
||||
paramsObj[key] = 1;
|
||||
} else {
|
||||
paramsObj[key]++;
|
||||
}
|
||||
};
|
||||
|
||||
const decrement = (paramsObj, key) => {
|
||||
if (paramsObj[key] === 0) return;
|
||||
|
||||
paramsObj[key]--;
|
||||
};
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
@ -79,8 +64,7 @@ const decrement = (paramsObj, key) => {
|
|||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<span v-if="tag.label !== 'state'">{{ formatFn(tag.value) }}</span>
|
||||
<span v-else>{{ t(`${tag.value}`) }}</span>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params, searchFn }">
|
||||
|
@ -174,83 +158,6 @@ const decrement = (paramsObj, key) => {
|
|||
</VnSelect>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
v-model="params.myTeam"
|
||||
:label="t('params.myTeam')"
|
||||
@update:model-value="searchFn()"
|
||||
toggle-indeterminate
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QCard bordered>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.from')"
|
||||
v-model="params.from"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
:label="t('params.to')"
|
||||
v-model="params.to"
|
||||
@update:model-value="searchFn()"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
v-model="params.scopeDays"
|
||||
:label="t('globals.daysOnward')"
|
||||
type="number"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
:min="0"
|
||||
>
|
||||
<template #append>
|
||||
<QBtn
|
||||
icon="add"
|
||||
flat
|
||||
dense
|
||||
size="12px"
|
||||
shortcut="+"
|
||||
@click="add(params, 'scopeDays')"
|
||||
/>
|
||||
<QBtn
|
||||
icon="remove"
|
||||
flat
|
||||
dense
|
||||
size="12px"
|
||||
@click="decrement(params, 'scopeDays')"
|
||||
/>
|
||||
</template>
|
||||
</VnInput>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QIcon name="info" style="position: absolute; top: 4px; right: 4px">
|
||||
<QTooltip max-width="300px">
|
||||
{{ t('dateFiltersTooltip') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QCard>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<QCheckbox
|
||||
:label="t('params.mine')"
|
||||
v-model="params.mine"
|
||||
toggle-indeterminate
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnSelect
|
||||
|
@ -267,6 +174,16 @@ const decrement = (paramsObj, key) => {
|
|||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
<QItem>
|
||||
<QItemSection>
|
||||
<VnInput
|
||||
:label="t('params.daysOnward')"
|
||||
v-model="params.daysOnward"
|
||||
lazy-rules
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
|
|
|
@ -23,13 +23,13 @@ const countriesOptions = ref([]);
|
|||
<template>
|
||||
<FetchData
|
||||
url="Provinces"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC'}"
|
||||
@on-fetch="(data) => (provincesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
<FetchData
|
||||
url="countries"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC', limit: 30 }"
|
||||
:filter="{ fields: ['id', 'name'], order: 'name ASC'}"
|
||||
@on-fetch="(data) => (countriesOptions = data)"
|
||||
auto-load
|
||||
/>
|
||||
|
|
|
@ -8,7 +8,7 @@ import VnLv from 'src/components/ui/VnLv.vue';
|
|||
import VnTitle from 'src/components/common/VnTitle.vue';
|
||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||
import FetchData from 'src/components/FetchData.vue';
|
||||
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import { toDate, toCurrency } from 'src/filters';
|
||||
import axios from 'axios';
|
||||
|
||||
|
@ -256,16 +256,20 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
:label="t('globals.warehouseOut')"
|
||||
:value="travel.warehouseOut?.name"
|
||||
/>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('travel.basicData.isRaid')"
|
||||
v-model="travel.isRaid"
|
||||
:disable="true"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('travel.summary.delivered')"
|
||||
v-model="travel.isDelivered"
|
||||
:disable="true"
|
||||
/>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
<QCard class="vn-one">
|
||||
<QCardSection class="q-pa-none">
|
||||
|
@ -320,7 +324,6 @@ const getLink = (param) => `#/travel/${entityId.value}/${param}`;
|
|||
<QTd>
|
||||
<QCheckbox
|
||||
v-if="col.name === 'isConfirmed'"
|
||||
:label="t('travel.summary.received')"
|
||||
:true-value="1"
|
||||
:false-value="0"
|
||||
v-model="row[col.name]"
|
||||
|
|
|
@ -77,7 +77,6 @@ defineExpose({ states });
|
|||
:label="t('travel.shipped')"
|
||||
v-model="params.shipped"
|
||||
@update:model-value="searchFn()"
|
||||
dense
|
||||
outlined
|
||||
rounded
|
||||
/>
|
||||
|
@ -153,7 +152,7 @@ es:
|
|||
Id: Id
|
||||
ref: Referencia
|
||||
agency: Agencia
|
||||
warehouseInFk: Alm.Salida
|
||||
warehouseInFk: Alm.Entrada
|
||||
shipped: F.Envío
|
||||
shipmentHour: Hora de envío
|
||||
warehouseOut: Alm.Entrada
|
||||
|
|
|
@ -54,7 +54,9 @@ const columns = computed(() => [
|
|||
name: 'id',
|
||||
label: t('globals.id'),
|
||||
isId: true,
|
||||
cardVisible: true,
|
||||
chip: {
|
||||
condition: () => true,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -64,7 +66,7 @@ const columns = computed(() => [
|
|||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
isTitle: true,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
|
@ -103,14 +105,14 @@ const columns = computed(() => [
|
|||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'shipped',
|
||||
label: t('globals.shipped'),
|
||||
name: 'shipped',
|
||||
create: true,
|
||||
cardVisible: true,
|
||||
component: 'date',
|
||||
columnField: {
|
||||
component: null,
|
||||
},
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
format: (row, dashIfEmpty) => dashIfEmpty(toDate(row.shipped)),
|
||||
},
|
||||
{
|
||||
|
@ -201,7 +203,7 @@ const columns = computed(() => [
|
|||
/>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<TravelFilter data-key="TravelList" ref="travelFilterRef" />
|
||||
<TravelFilter data-key="TravelList" />
|
||||
</template>
|
||||
</RightMenu>
|
||||
<VnTable
|
||||
|
|
|
@ -23,6 +23,7 @@ const insertTag = () => {
|
|||
workerPitCrudRef.value.insert();
|
||||
};
|
||||
const quasar = useQuasar();
|
||||
|
||||
const deleteRelative = async (id) => {
|
||||
await new Promise((resolve) => {
|
||||
quasar
|
||||
|
@ -62,7 +63,6 @@ const deleteRelative = async (id) => {
|
|||
>
|
||||
<template #form="{ data }">
|
||||
<QCard class="q-px-lg q-py-lg">
|
||||
<VnTitle :text="t('IRPF')" />
|
||||
<VnRow>
|
||||
<VnInput
|
||||
:label="t('familySituation')"
|
||||
|
@ -100,8 +100,12 @@ const deleteRelative = async (id) => {
|
|||
:label="t(`spousePension`)"
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox v-model="data.isDependend" :label="t(`isDependend`)" />
|
||||
<VnRow wrap>
|
||||
<QCheckbox
|
||||
clearable
|
||||
v-model="data.isDependend"
|
||||
:label="t(`isDependend`)"
|
||||
/>
|
||||
<QCheckbox
|
||||
v-model="data.hasHousingPaymentBefore"
|
||||
:label="t(`hasHousingPaymentBefore`)"
|
||||
|
@ -127,7 +131,11 @@ const deleteRelative = async (id) => {
|
|||
:filter="{
|
||||
where: { workerFk: route.params.id },
|
||||
}"
|
||||
:data-required="{ workerFk: route.params.id }"
|
||||
:data-required="{
|
||||
workerFk: route.params.id,
|
||||
isJointCustody: false,
|
||||
isDependend: false,
|
||||
}"
|
||||
:has-sub-toolbar="false"
|
||||
>
|
||||
<template #body="{ rows }">
|
||||
|
|
|
@ -16,24 +16,14 @@ const actions = {
|
|||
clone: async () => {
|
||||
const opts = { message: t('Zone cloned'), type: 'positive' };
|
||||
|
||||
try {
|
||||
const { data } = await axios.post(`Zones/${zoneId}/clone`, {});
|
||||
notify(opts);
|
||||
push(`/zone/${data.id}/basic-data`);
|
||||
} catch (e) {
|
||||
opts.message = t('It was not able to clone the zone');
|
||||
opts.type = 'negative';
|
||||
}
|
||||
},
|
||||
remove: async () => {
|
||||
try {
|
||||
await axios.post(`Zones/${zoneId}/deleteZone`);
|
||||
|
||||
notify({ message: t('Zone deleted'), type: 'positive' });
|
||||
push({ name: 'ZoneList' });
|
||||
} catch (e) {
|
||||
notify({ message: e.message, type: 'negative' });
|
||||
}
|
||||
},
|
||||
};
|
||||
function openConfirmDialog(callback) {
|
||||
|
|
Loading…
Reference in New Issue