Merge branch 'master' into Hotfix-ZoneEventSelect
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
7e15d3c7a4
|
@ -54,8 +54,8 @@ const $props = defineProps({
|
|||
default: true,
|
||||
},
|
||||
bottom: {
|
||||
type: Object,
|
||||
default: null,
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
cardClass: {
|
||||
type: String,
|
||||
|
@ -575,29 +575,6 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
|||
/>
|
||||
</QTd>
|
||||
</template>
|
||||
<template #bottom v-if="bottom">
|
||||
<slot name="bottom-table">
|
||||
<QBtn
|
||||
@click="
|
||||
() =>
|
||||
createAsDialog
|
||||
? (showForm = !showForm)
|
||||
: handleOnDataSaved(create)
|
||||
"
|
||||
class="cursor-pointer fill-icon"
|
||||
color="primary"
|
||||
icon="add_circle"
|
||||
size="md"
|
||||
round
|
||||
flat
|
||||
shortcut="+"
|
||||
:disabled="!disabledAttr"
|
||||
/>
|
||||
<QTooltip>
|
||||
{{ createForm.title }}
|
||||
</QTooltip>
|
||||
</slot>
|
||||
</template>
|
||||
<template #item="{ row, colsMap }">
|
||||
<component
|
||||
:is="$props.redirect ? 'router-link' : 'span'"
|
||||
|
@ -727,6 +704,27 @@ function handleSelection({ evt, added, rows: selectedRows }, rows) {
|
|||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
<div class="full-width bottomButton" v-if="bottom">
|
||||
<QBtn
|
||||
@click="
|
||||
() =>
|
||||
createAsDialog
|
||||
? (showForm = !showForm)
|
||||
: handleOnDataSaved(create)
|
||||
"
|
||||
class="cursor-pointer fill-icon"
|
||||
color="primary"
|
||||
icon="add_circle"
|
||||
size="md"
|
||||
round
|
||||
flat
|
||||
shortcut="+"
|
||||
:disabled="!disabledAttr"
|
||||
/>
|
||||
<QTooltip>
|
||||
{{ createForm.title }}
|
||||
</QTooltip>
|
||||
</div>
|
||||
</template>
|
||||
</CrudModel>
|
||||
<QPageSticky v-if="$props.create" :offset="[20, 20]" style="z-index: 2">
|
||||
|
|
|
@ -63,6 +63,10 @@ const props = defineProps({
|
|||
type: Function,
|
||||
default: undefined,
|
||||
},
|
||||
searchRemoveParams: {
|
||||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
});
|
||||
|
||||
const searchText = ref();
|
||||
|
@ -101,12 +105,18 @@ async function search() {
|
|||
|
||||
const filter = {
|
||||
params: {
|
||||
...Object.fromEntries(staticParams),
|
||||
search: searchText.value,
|
||||
},
|
||||
...{ filter: props.filter },
|
||||
filter: props.filter,
|
||||
};
|
||||
|
||||
if (!props.searchRemoveParams || !searchText.value) {
|
||||
filter.params = {
|
||||
...Object.fromEntries(staticParams),
|
||||
search: searchText.value,
|
||||
};
|
||||
}
|
||||
|
||||
if (props.whereFilter) {
|
||||
filter.filter = {
|
||||
where: props.whereFilter(searchText.value),
|
||||
|
|
|
@ -149,7 +149,8 @@ select:-webkit-autofill {
|
|||
.q-card,
|
||||
.q-table,
|
||||
.q-table__bottom,
|
||||
.q-drawer {
|
||||
.q-drawer,
|
||||
.bottomButton {
|
||||
background-color: var(--vn-section-color);
|
||||
}
|
||||
|
||||
|
|
|
@ -107,7 +107,7 @@ const setParams = (params) => {
|
|||
|
||||
const getPreview = async () => {
|
||||
const params = {
|
||||
recipientId: entityId,
|
||||
recipientId: entityId.value,
|
||||
};
|
||||
const validationMessage = validateMessage();
|
||||
if (validationMessage) return notify(t(validationMessage), 'negative');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<script setup>
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { onMounted, onUnmounted, ref, computed, watch, provide, nextTick } from 'vue';
|
||||
import { onMounted, onUnmounted, ref, computed, watch, provide } from 'vue';
|
||||
import axios from 'axios';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
|
@ -101,6 +101,7 @@ provide('onItemSaved', onItemSaved);
|
|||
url="Orders/CatalogFilter"
|
||||
:label="t('Search items')"
|
||||
:info="t('You can search items by name or id')"
|
||||
:search-remove-params="false"
|
||||
/>
|
||||
<QDrawer v-model="stateStore.rightDrawer" side="right" :width="256" show-if-above>
|
||||
<QScrollArea class="fit text-grey-8">
|
||||
|
|
|
@ -54,6 +54,7 @@ const transfer = ref({
|
|||
});
|
||||
const tableRef = ref([]);
|
||||
const canProceed = ref();
|
||||
const isLoading = ref(false);
|
||||
|
||||
watch(
|
||||
() => route.params.id,
|
||||
|
@ -213,6 +214,9 @@ const updateQuantity = async ({ quantity, id }) => {
|
|||
};
|
||||
|
||||
const addSale = async (sale) => {
|
||||
if (isLoading.value) return;
|
||||
|
||||
isLoading.value = true;
|
||||
const params = {
|
||||
barcode: sale.itemFk,
|
||||
quantity: sale.quantity,
|
||||
|
@ -233,7 +237,7 @@ const addSale = async (sale) => {
|
|||
sale.item = newSale.item;
|
||||
|
||||
notify('globals.dataSaved', 'positive');
|
||||
window.location.reload();
|
||||
arrayData.fetch({});
|
||||
};
|
||||
|
||||
const updateConcept = async (sale) => {
|
||||
|
@ -466,6 +470,7 @@ const addRow = (original = null) => {
|
|||
};
|
||||
|
||||
const endNewRow = (row) => {
|
||||
if (!row) return;
|
||||
if (row.itemFk && row.quantity) {
|
||||
row.isNew = false;
|
||||
}
|
||||
|
|
|
@ -381,7 +381,7 @@ const isUnsatisfied = async (reason) => {
|
|||
|
||||
const resendEmail = async () => {
|
||||
const params = {
|
||||
recipient: worker.value?.user?.email,
|
||||
recipient: worker.value[0]?.user?.emailUser?.email,
|
||||
week: selectedWeekNumber.value,
|
||||
year: selectedDate.value.getFullYear(),
|
||||
workerId: Number(route.params.id),
|
||||
|
|
|
@ -163,7 +163,13 @@ onUnmounted(() => {
|
|||
<QBtn color="primary" icon="search" dense flat @click="reFetch()" />
|
||||
</template>
|
||||
</VnInput>
|
||||
<VnSearchbar v-if="!showSearchBar" :data-key="datakey" :url="url" :redirect="false" />
|
||||
<VnSearchbar
|
||||
v-if="!showSearchBar"
|
||||
:data-key="datakey"
|
||||
:url="url"
|
||||
:redirect="false"
|
||||
:search-remove-params="false"
|
||||
/>
|
||||
<QTree
|
||||
ref="treeRef"
|
||||
:nodes="nodes"
|
||||
|
|
Loading…
Reference in New Issue