forked from verdnatura/salix-front
Merge branch 'dev' into 6943_fix_customer_module
This commit is contained in:
commit
c21133ebd4
181
CHANGELOG.md
181
CHANGELOG.md
|
@ -1,3 +1,184 @@
|
|||
# Version 24.38 - 2024-09-17
|
||||
|
||||
### Added 🆕
|
||||
|
||||
- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep
|
||||
- chore: refs #7323 worker changes by:jorgep
|
||||
- chore: refs #7353 fix warnings by:jorgep
|
||||
- chore: refs #7353 use Vue component nomenclature by:jorgep
|
||||
- chore: refs #7356 fix type by:jorgep
|
||||
- feat(AccountConnections): use VnToken by:alexm
|
||||
- feat: add key to routerView by:Javier Segarra
|
||||
- feat: add plus shortcut in VnTable by:Javier Segarra
|
||||
- feat: add row by:Javier Segarra
|
||||
- feat: addRow withour dialog by:Javier Segarra
|
||||
- feat: apply mixin by:Javier Segarra
|
||||
- feat by:Javier Segarra
|
||||
- feat: change navBar buttons by:Javier Segarra
|
||||
- feat: dense rows by:Javier Segarra
|
||||
- feat: fields with wrong name by:jgallego
|
||||
- feat: fix bugs and filters by:Javier Segarra
|
||||
- feat: fix refund parameters by:jgallego
|
||||
- feat: handle create row by:Javier Segarra
|
||||
- feat: handle dates by:Javier Segarra
|
||||
- feat: handle qCheckbox 3rd state by:Javier Segarra
|
||||
- feat: imrpove VnInputTime to set cursor at start by:Javier Segarra
|
||||
- feat: keyShortcut directive by:Javier Segarra
|
||||
- feat: minor fixes by:jgallego
|
||||
- feat: only filter by isDestiny by:Javier Segarra
|
||||
- feat: refs #211153 businessDataLinkGrafana by:robert
|
||||
- feat: refs #7129 add km start and end on create form by:pablone
|
||||
- feat: refs #7353 add filter & fix customTags by:jorgep
|
||||
- feat: refs #7353 add locale by:jorgep
|
||||
- feat: refs #7353 add no one opt by:jorgep
|
||||
- feat: refs #7353 add right icons by:jorgep
|
||||
- feat: refs #7353 imporve toDateFormat by:jorgep
|
||||
- feat: refs #7353 salesPerson nickname & id by:jorgep
|
||||
- feat: refs #7353 split sections by:jorgep
|
||||
- feat: refs #7847 remove reload btn by:jorgep
|
||||
- feat: refs #7847 remove reload fn by:jorgep
|
||||
- feat: refs #7889 added shortcuts to modules by:Jon
|
||||
- feat: refs #7911 added shortcut to modules by:Jon
|
||||
- feat: refuncInvoiceForm component by:jgallego
|
||||
- feat: remove duplicity by:Javier Segarra
|
||||
- feat: remove future itemFixedPrices by:Javier Segarra
|
||||
- feat: replace stickyButtons by subtoolbar by:Javier Segarra
|
||||
- feat: required validation by:Javier Segarra
|
||||
- feat: show bad dates by:Javier Segarra
|
||||
- feat: showdate icons by:Javier Segarra
|
||||
- feat: solve ItemFixedFilterPanel by:Javier Segarra
|
||||
- feat: transfer an invoice by:jgallego
|
||||
- feat: try to fix ItemFixedFilterPanel by:Javier Segarra
|
||||
- feat: unnecessary changes by:Javier Segarra
|
||||
- feat: update changelog (origin/7896_down_devToTest_2436) by:Javier Segarra
|
||||
- feat: updates by:Javier Segarra
|
||||
- feat: update version and changelog by:Javier Segarra
|
||||
- feat: vnInput\* by:Javier Segarra
|
||||
- feat: with VnTable by:Javier Segarra
|
||||
- refs #6772 feat: fix approach by:Javier Segarra
|
||||
- refs #6772 feat: refresh shelving.basic-data by:Javier Segarra
|
||||
- style: show subName value by:Javier Segarra
|
||||
|
||||
### Changed 📦
|
||||
|
||||
- perf: add v-shortcut in VnCard by:Javier Segarra
|
||||
- perf: approach by:Javier Segarra
|
||||
- perf: change directive location by:Javier Segarra
|
||||
- perf: change slots order by:Javier Segarra
|
||||
- perf: examples by:Javier Segarra
|
||||
- perf: hide icon for VnInputDate by:Javier Segarra
|
||||
- perf: improve ItemFixedPricefilterPanel by:Javier Segarra
|
||||
- perf: improve mainShrotcutMixin by:Javier Segarra
|
||||
- perf: minor clean code by:Javier Segarra
|
||||
- perf: onRowchange by:Javier Segarra
|
||||
- perf: order by by:Javier Segarra
|
||||
- perf: order components by:Javier Segarra
|
||||
- perf: refs #7889 perf shortcut test by:Jon
|
||||
- perf: remove console.log by:Javier Segarra
|
||||
- perf: remove icons in header slot by:Javier Segarra
|
||||
- perf: remove print variables by:Javier Segarra
|
||||
- perf: restore CustomerBasicData by:Javier Segarra
|
||||
- refactor: deleted useless prop by:Jon
|
||||
- refactor: deleted useless prop in FetchedTags by:Jon
|
||||
- refactor: refs #7323 drop useless code by:jorgep
|
||||
- refactor: refs #7353 clients correction by:jorgep
|
||||
- refactor: refs #7353 clients correction wip by:jorgep
|
||||
- refactor: refs #7353 ease logic by:jorgep
|
||||
- refactor: refs #7353 order correction by:jorgep
|
||||
- refactor: refs #7353 simplify code by:jorgep
|
||||
- refactor: refs #7353 tickets correction by:jorgep
|
||||
- refactor: refs #7353 use global locales by:jorgep
|
||||
- refactor: refs #7354 changed descriptor menu options by:Jon
|
||||
- refactor: refs #7354 changed icon color in table and notification when deleting a zone by:Jon
|
||||
- refactor: refs #7354 fix tableFilters by:Jon
|
||||
- refactor: refs #7354 modified VnInputTime by:Jon
|
||||
- refactor: refs #7354 refactor deliveryPanel by:Jon
|
||||
- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon
|
||||
- refactor: refs #7354 requested changes by:Jon
|
||||
- refactor: refs #7354 reverse deliveryPanel changes by:Jon
|
||||
- refactor: refs #7354 Zone migration changes by:Jon
|
||||
- refactor: refs #7889 deleted subtitle attr and use keyBinding instead by:Jon
|
||||
- refactor: refs #7889 modified shortcut and dashboard, and added tootlip in LeftMenu by:Jon
|
||||
- refs #6722 perf: not fetch when id not exists by:Javier Segarra
|
||||
- refs #6772 perf: change variable name by:JAVIER SEGARRA MARTINEZ
|
||||
- refs #6772 perf: use ArrayData (6772_reload_sections) by:Javier Segarra
|
||||
- refs #7283 refactor fix ItemDescriptor by:carlossa
|
||||
- refs #7283 refactor ItexDescriptor by:carlossa
|
||||
|
||||
### Fixed 🛠️
|
||||
|
||||
- chore: refs #6772 fix e2e (origin/6772-warmfix-fixE2e) by:jorgep
|
||||
- chore: refs #7353 fix warnings by:jorgep
|
||||
- chore: refs #7356 fix type by:jorgep
|
||||
- feat: fix bugs and filters by:Javier Segarra
|
||||
- feat: fix refund parameters by:jgallego
|
||||
- feat: minor fixes by:jgallego
|
||||
- feat: refs #7353 add filter & fix customTags by:jorgep
|
||||
- feat: try to fix ItemFixedFilterPanel by:Javier Segarra
|
||||
- fix: add border-top by:Javier Segarra
|
||||
- fix: added missing descriptors and small details by:Jon
|
||||
- fix branch by:carlossa
|
||||
- fix: call upsert when crudModel haschanges by:Javier Segarra
|
||||
- fix(ClaimList): fix summary by:alexm
|
||||
- fix: cli warnings by:Javier Segarra
|
||||
- fix: editTableOptions by:Javier Segarra
|
||||
- fix events and descriptor menu by:Jon
|
||||
- fix: InvoiceIn sections (origin/6772_reload_sections) by:Javier Segarra
|
||||
- fix: minor changes by:Javier Segarra
|
||||
- fix: minor error whit dates by:Javier Segarra
|
||||
- fix: module icon by:Javier Segarra
|
||||
- fix: options QDate by:Javier Segarra
|
||||
- fix: refs #6900 e2e error by:jorgep
|
||||
- fix: refs #6900 rollback by:jorgep
|
||||
- fix: refs #7353 css by:jorgep
|
||||
- fix: refs #7353 hide search param (origin/7353-warmfix-fixSearchbar) by:jorgep
|
||||
- fix: refs #7353 iron out filter by:jorgep
|
||||
- fix: refs #7353 iron out ticket table by:jorgep
|
||||
- fix: refs #7353 padding by:jorgep
|
||||
- fix: refs #7353 salesClientTable by:jorgep
|
||||
- fix: refs #7353 salesorderTable by:jorgep
|
||||
- fix: refs #7353 saleTicketMonitors by:jorgep
|
||||
- fix: refs #7353 use same datakey by:jorgep
|
||||
- fix: refs #7353 vnTable colors by:jorgep
|
||||
- fix: refs #7354 e2e tests by:Jon
|
||||
- fix: refs #7354 fix delivery days by:Jon
|
||||
- fix: refs #7354 fix list searchbar and filters by:Jon
|
||||
- fix: refs #7354 fix VnSearchbar search for zone section & finished basic tests by:Jon
|
||||
- fix: refs #7354 fix VnTable filters and agency field by:Jon
|
||||
- fix: refs #7354 fix zoneSearchbar by:Jon
|
||||
- fix: refs #7354 requested changes by:Jon
|
||||
- fix: refs #7356 colors by:jorgep
|
||||
- fix: refs #7356 create claim dialog by:jorgep
|
||||
- fix: refs #7889 fixed shortcut test by:Jon
|
||||
- fix: refs #7903 fixed ticket's search bar and keybinding tooltip by:Jon
|
||||
- fix: refs #7911 fixed shortcut and related files by:Jon
|
||||
- fix: remove condition duplicated by:Javier Segarra
|
||||
- fix: remove property by:Javier Segarra
|
||||
- fix tootltip by:carlossa
|
||||
- fix traduction by:carlossa
|
||||
- fix(VnSectionMain): add QPage by:alexm
|
||||
- fix(zone): zoneLocation and the others searchbar by:alexm
|
||||
- refactor: refs #7354 fix tableFilters by:Jon
|
||||
- refactor: refs #7354 refactor zones section and fixed e2e tests by:Jon
|
||||
- refs #6772 feat: fix approach by:Javier Segarra
|
||||
- refs #6772 fix: claimPhoto reload by:Javier Segarra
|
||||
- refs #6896 fix searchbar by:carlossa
|
||||
- refs #6897 fix entry by:carlossa
|
||||
- refs #6899 fix invoiceFix by:carlossa
|
||||
- refs #6899 fix order by:carlossa
|
||||
- refs #7283 fix by:carlossa
|
||||
- refs #7283 fix ItemDescriptor warehouse by:carlossa
|
||||
- refs #7283 refactor fix ItemDescriptor by:carlossa
|
||||
- refs #7355 #7366 fix account, summary, list, travelList, tooltip by:carlossa
|
||||
- refs #7355 fix accountPrivileges by:carlossa
|
||||
- refs #7355 fix accounts, vnTable by:carlossa
|
||||
- refs #7355 fix privileges by:carlossa
|
||||
- refs #7355 fix roles filters by:carlossa
|
||||
- refs #7355 fix total by:carlossa
|
||||
- refs #7355 fix views summarys, entryList, travelList refact by:carlossa
|
||||
- refs #7366 fix travel hours by:carlossa
|
||||
- test: fix e2e by:Javier Segarra
|
||||
|
||||
# Version 24.36 - 2024-08-27
|
||||
|
||||
### Added 🆕
|
||||
|
|
|
@ -62,4 +62,4 @@
|
|||
"vite": "^5.1.4",
|
||||
"vitest": "^0.31.1"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ import { useArrayData } from 'composables/useArrayData';
|
|||
const model = defineModel({ type: Object });
|
||||
const $props = defineProps({
|
||||
name: {
|
||||
type: String,
|
||||
type: [String, Boolean],
|
||||
default: '',
|
||||
},
|
||||
label: {
|
||||
|
|
|
@ -101,6 +101,10 @@ const $props = defineProps({
|
|||
type: String,
|
||||
default: '90vh',
|
||||
},
|
||||
footer: {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
});
|
||||
const { t } = useI18n();
|
||||
const stateStore = useStateStore();
|
||||
|
@ -196,7 +200,7 @@ function setUserParams(watchedParams, watchedOrder) {
|
|||
|
||||
function sanitizer(params) {
|
||||
for (const [key, value] of Object.entries(params)) {
|
||||
if (typeof value == 'object') {
|
||||
if (value && typeof value == 'object') {
|
||||
const param = Object.values(value)[0];
|
||||
if (typeof param == 'string') params[key] = param.replaceAll('%', '');
|
||||
}
|
||||
|
@ -301,6 +305,7 @@ defineExpose({
|
|||
redirect: redirectFn,
|
||||
selected,
|
||||
CrudModelRef,
|
||||
params,
|
||||
});
|
||||
|
||||
function handleOnDataSaved(_) {
|
||||
|
@ -390,7 +395,7 @@ function handleOnDataSaved(_) {
|
|||
card-container-class="grid-three"
|
||||
flat
|
||||
:style="isTableMode && `max-height: ${tableHeight}`"
|
||||
virtual-scroll
|
||||
:virtual-scroll="!isTableMode"
|
||||
@virtual-scroll="
|
||||
(event) =>
|
||||
event.index > rows.length - 2 &&
|
||||
|
@ -632,6 +637,28 @@ function handleOnDataSaved(_) {
|
|||
</QCard>
|
||||
</component>
|
||||
</template>
|
||||
<template #bottom-row="{ cols }" v-if="footer">
|
||||
<QTr v-if="rows.length" class="bg-header" style="height: 30px">
|
||||
<QTh
|
||||
v-for="col of cols.filter((cols) => cols.visible ?? true)"
|
||||
:key="col?.id"
|
||||
class="text-center"
|
||||
>
|
||||
<div
|
||||
v-if="col?.summation"
|
||||
:class="`text-${col?.align ?? 'left'}`"
|
||||
class="text-bold q-pa-sm"
|
||||
>
|
||||
{{
|
||||
rows.reduce(
|
||||
(sum, currentRow) => sum + currentRow[col.name],
|
||||
0
|
||||
)
|
||||
}}
|
||||
</div>
|
||||
</QTh>
|
||||
</QTr>
|
||||
</template>
|
||||
</QTable>
|
||||
</template>
|
||||
</CrudModel>
|
||||
|
@ -699,7 +726,7 @@ es:
|
|||
}
|
||||
|
||||
.bg-header {
|
||||
background-color: var(--vn-header-color);
|
||||
background-color: var(--vn-accent-color);
|
||||
color: var(--vn-text-color);
|
||||
}
|
||||
|
||||
|
@ -709,9 +736,7 @@ es:
|
|||
|
||||
.q-table--dark .q-table__bottom,
|
||||
.q-table--dark thead,
|
||||
.q-table--dark tr,
|
||||
.q-table--dark th,
|
||||
.q-table--dark td {
|
||||
.q-table--dark tr {
|
||||
border-color: var(--vn-section-color);
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,9 @@ const stateStore = useStateStore();
|
|||
const route = useRoute();
|
||||
const router = useRouter();
|
||||
const url = computed(() => {
|
||||
if (props.baseUrl) return `${props.baseUrl}/${route.params.id}`;
|
||||
if (props.baseUrl) {
|
||||
return `${props.baseUrl}/${route.params.id}`;
|
||||
}
|
||||
return props.customUrl;
|
||||
});
|
||||
const searchRightDataKey = computed(() => {
|
||||
|
@ -40,8 +42,10 @@ onBeforeMount(async () => {
|
|||
try {
|
||||
if (!props.baseUrl) arrayData.store.filter.where = { id: route.params.id };
|
||||
await arrayData.fetch({ append: false, updateRouter: false });
|
||||
} catch (e) {
|
||||
router.push({ name: 'WorkerList' });
|
||||
} catch {
|
||||
const { matched: matches } = router.currentRoute.value;
|
||||
const { path } = matches.at(-1);
|
||||
router.push({ path: path.replace(/:id.*/, '') });
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -17,17 +17,15 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
|
||||
let mixed;
|
||||
const componentArray = computed(() => {
|
||||
if (typeof $props.prop === 'object') return [$props.prop];
|
||||
return $props.prop;
|
||||
});
|
||||
|
||||
function mix(toComponent) {
|
||||
if (mixed) return mixed;
|
||||
const { component, attrs, event } = toComponent;
|
||||
const customComponent = $props.components[component];
|
||||
mixed = {
|
||||
return {
|
||||
component: customComponent?.component ?? component,
|
||||
attrs: {
|
||||
...toValueAttrs(attrs),
|
||||
|
@ -37,7 +35,6 @@ function mix(toComponent) {
|
|||
},
|
||||
event: { ...customComponent?.event, ...event },
|
||||
};
|
||||
return mixed;
|
||||
}
|
||||
|
||||
function toValueAttrs(attrs) {
|
||||
|
|
|
@ -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>
|
|
@ -59,6 +59,7 @@ const $props = defineProps({
|
|||
});
|
||||
|
||||
defineExpose({ search, sanitizer });
|
||||
|
||||
const emit = defineEmits([
|
||||
'update:modelValue',
|
||||
'refresh',
|
||||
|
|
|
@ -158,6 +158,7 @@ globals:
|
|||
dms: File management
|
||||
entryCreate: New entry
|
||||
latestBuys: Latest buys
|
||||
reserves: Reserves
|
||||
tickets: Tickets
|
||||
ticketCreate: New Tickets
|
||||
boxing: Boxing
|
||||
|
|
|
@ -2,6 +2,7 @@
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import { ref, watch } from 'vue';
|
||||
|
@ -24,7 +25,7 @@ watch(
|
|||
<template>
|
||||
<FormModel
|
||||
ref="formModelRef"
|
||||
:url="`VnUsers/preview`"
|
||||
url="VnUsers/preview"
|
||||
:url-update="`VnUsers/${route.params.id}/update-user`"
|
||||
:filter="accountFilter"
|
||||
model="Accounts"
|
||||
|
@ -43,6 +44,15 @@ watch(
|
|||
option-value="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>
|
||||
</template>
|
||||
</FormModel>
|
||||
|
|
|
@ -35,6 +35,7 @@ account:
|
|||
willDeactivated: User will be deactivated
|
||||
activated: User activated!
|
||||
deactivated: User deactivated!
|
||||
twoFactor: Two factor
|
||||
actions:
|
||||
setPassword: Set password
|
||||
disableAccount:
|
||||
|
|
|
@ -32,6 +32,7 @@ account:
|
|||
activated: ¡Usuario activado!
|
||||
deactivated: ¡Usuario desactivado!
|
||||
newUser: Nuevo usuario
|
||||
twoFactor: Doble factor
|
||||
privileges:
|
||||
delegate: Puede delegar privilegios
|
||||
actions:
|
||||
|
|
|
@ -3,58 +3,18 @@ import { ref } from 'vue';
|
|||
import { useRoute } from 'vue-router';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import VnSelect from 'src/components/common/VnSelect.vue';
|
||||
import VnSelectEnum from 'src/components/common/VnSelectEnum.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModel from 'components/FormModel.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnInputDate from 'components/common/VnInputDate.vue';
|
||||
|
||||
import axios from 'axios';
|
||||
import VnAvatar from 'src/components/ui/VnAvatar.vue';
|
||||
|
||||
const route = useRoute();
|
||||
const { t } = useI18n();
|
||||
|
||||
const claimStates = ref([]);
|
||||
const claimStatesCopy = ref([]);
|
||||
const optionsList = 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>
|
||||
<template>
|
||||
<FetchData
|
||||
|
@ -70,7 +30,7 @@ const statesFilter = {
|
|||
auto-load
|
||||
:reload="true"
|
||||
>
|
||||
<template #form="{ data, validate, filter }">
|
||||
<template #form="{ data, validate }">
|
||||
<VnRow>
|
||||
<VnInput
|
||||
v-model="data.client.name"
|
||||
|
@ -101,20 +61,14 @@ const statesFilter = {
|
|||
/>
|
||||
</template>
|
||||
</VnSelect>
|
||||
<QSelect
|
||||
<VnSelect
|
||||
v-model="data.claimStateFk"
|
||||
:options="claimStates"
|
||||
option-value="id"
|
||||
option-label="description"
|
||||
emit-value
|
||||
url="ClaimStates"
|
||||
:label="t('claim.state')"
|
||||
map-options
|
||||
use-input
|
||||
@filter="(value, update) => filter(value, update, statesFilter)"
|
||||
option-label="description"
|
||||
:rules="validate('claim.claimStateFk')"
|
||||
:input-debounce="0"
|
||||
>
|
||||
</QSelect>
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QInput
|
||||
|
@ -123,16 +77,14 @@ const statesFilter = {
|
|||
:rules="validate('claim.packages')"
|
||||
type="number"
|
||||
/>
|
||||
<QSelect
|
||||
<VnSelectEnum
|
||||
v-model="data.pickup"
|
||||
:options="optionsList"
|
||||
option-value="id"
|
||||
option-label="description"
|
||||
emit-value
|
||||
:label="t('claim.pickup')"
|
||||
map-options
|
||||
use-input
|
||||
:input-debounce="0"
|
||||
table="claim"
|
||||
column="pickup"
|
||||
option-label="description"
|
||||
:translation="(value) => t(`claim.${value}`)"
|
||||
:default-options="[{ id: null, description: t('claim.null') }]"
|
||||
/>
|
||||
</VnRow>
|
||||
</template>
|
||||
|
|
|
@ -56,17 +56,18 @@ const customerContactsRef = ref(null);
|
|||
</div>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QIcon
|
||||
<QBtn
|
||||
@click="customerContactsRef.insert()"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
name="add"
|
||||
size="sm"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Add contact') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
|
|
|
@ -272,16 +272,17 @@ function handleLocation(data, location) {
|
|||
</div>
|
||||
</VnRow>
|
||||
|
||||
<QIcon
|
||||
<QBtn
|
||||
@click.stop="addNote()"
|
||||
class="cursor-pointer add-icon q-mt-md"
|
||||
name="add"
|
||||
size="sm"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Add note') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</template>
|
||||
</FormModel>
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,251 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { useState } from 'src/composables/useState';
|
||||
import { useQuasar } from 'quasar';
|
||||
|
||||
import VnSubToolbar from 'src/components/ui/VnSubToolbar.vue';
|
||||
import FetchData from 'components/FetchData.vue';
|
||||
import FormModelPopup from 'components/FormModelPopup.vue';
|
||||
import VnInput from 'src/components/common/VnInput.vue';
|
||||
import VnRow from 'components/ui/VnRow.vue';
|
||||
import RightMenu from 'src/components/common/RightMenu.vue';
|
||||
import EntryStockBoughtFilter from './EntryStockBoughtFilter.vue';
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import WorkerDescriptorProxy from 'src/pages/Worker/Card/WorkerDescriptorProxy.vue';
|
||||
import EntryStockBoughtDetail from 'src/pages/Entry/EntryStockBoughtDetail.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const quasar = useQuasar();
|
||||
const state = useState();
|
||||
const user = state.getUser();
|
||||
const columns = [
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Id',
|
||||
name: 'id',
|
||||
isId: true,
|
||||
columnFilter: false,
|
||||
visible: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'workerFk',
|
||||
label: t('Buyer'),
|
||||
isTitle: true,
|
||||
component: 'select',
|
||||
cardVisible: true,
|
||||
create: true,
|
||||
attrs: {
|
||||
url: 'Workers/activeWithInheritedRole',
|
||||
fields: ['id', 'name'],
|
||||
where: { role: 'buyer' },
|
||||
optionFilter: 'firstName',
|
||||
optionLabel: 'name',
|
||||
optionValue: 'id',
|
||||
useLike: false,
|
||||
},
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Reserve'),
|
||||
name: 'reserve',
|
||||
columnFilter: false,
|
||||
create: true,
|
||||
component: 'number',
|
||||
summation: true,
|
||||
cardVisible: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Bought'),
|
||||
name: 'bought',
|
||||
summation: true,
|
||||
cardVisible: true,
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Date'),
|
||||
name: 'dated',
|
||||
component: 'date',
|
||||
visible: false,
|
||||
create: true,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'tableActions',
|
||||
actions: [
|
||||
{
|
||||
title: t('More'),
|
||||
icon: 'search',
|
||||
isPrimary: true,
|
||||
action: (row) => {
|
||||
quasar.dialog({
|
||||
component: EntryStockBoughtDetail,
|
||||
componentProps: {
|
||||
workerFk: row.workerFk,
|
||||
dated: userParams.value.dated,
|
||||
},
|
||||
});
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
const fetchDataRef = ref();
|
||||
const travelDialogRef = ref(false);
|
||||
const tableRef = ref();
|
||||
const travel = ref(null);
|
||||
const userParams = ref({
|
||||
dated: Date.vnNew(),
|
||||
});
|
||||
const filter = ref({
|
||||
where: {
|
||||
shipped: (userParams.value.dated
|
||||
? new Date(userParams.value.dated)
|
||||
: Date.vnNew()
|
||||
).setHours(0, 0, 0, 0),
|
||||
m3: { neq: null },
|
||||
},
|
||||
include: [
|
||||
{
|
||||
relation: 'warehouseIn',
|
||||
scope: {
|
||||
fields: ['code'],
|
||||
},
|
||||
},
|
||||
],
|
||||
});
|
||||
|
||||
const setUserParams = async ({ dated }) => {
|
||||
const shipped = (dated ? new Date(dated) : Date.vnNew()).setHours(0, 0, 0, 0);
|
||||
filter.value.where.shipped = shipped;
|
||||
fetchDataRef.value?.fetch();
|
||||
};
|
||||
|
||||
function openDialog() {
|
||||
travelDialogRef.value = true;
|
||||
}
|
||||
</script>
|
||||
<template>
|
||||
<VnSubToolbar>
|
||||
<template #st-data>
|
||||
<FetchData
|
||||
ref="fetchDataRef"
|
||||
url="Travels"
|
||||
auto-load
|
||||
:filter="filter"
|
||||
@on-fetch="
|
||||
(data) => {
|
||||
travel = data.filter((data) => data.warehouseIn.code === 'VNH');
|
||||
}
|
||||
"
|
||||
/>
|
||||
<VnRow class="travel">
|
||||
<div v-if="travel">
|
||||
<span style="color: var(--vn-label-color)">
|
||||
{{ t('Booked trucks') }}:
|
||||
</span>
|
||||
<span>
|
||||
{{ travel[0]?.m3 }}
|
||||
</span>
|
||||
<QBtn
|
||||
v-if="travel[0]?.m3"
|
||||
style="max-width: 20%"
|
||||
flat
|
||||
icon="edit"
|
||||
@click="openDialog()"
|
||||
:title="t('Edit travel')"
|
||||
color="primary"
|
||||
/>
|
||||
</div>
|
||||
</VnRow>
|
||||
</template>
|
||||
</VnSubToolbar>
|
||||
<QDialog v-model="travelDialogRef" :maximized="true" :class="['vn-row', 'wrap']">
|
||||
<FormModelPopup
|
||||
:url-update="`Travels/${travel[0].id}`"
|
||||
model="travel"
|
||||
:title="t('Travel m3')"
|
||||
:form-initial-data="{ id: travel[0].id, m3: travel[0].m3 }"
|
||||
@on-data-saved="fetchDataRef.fetch()"
|
||||
>
|
||||
<template #form-inputs="{ data }">
|
||||
<VnInput
|
||||
v-model="data.id"
|
||||
:label="t('id')"
|
||||
type="number"
|
||||
disable
|
||||
readonly
|
||||
/>
|
||||
<VnInput v-model="data.m3" :label="t('m3')" type="number" />
|
||||
</template>
|
||||
</FormModelPopup>
|
||||
</QDialog>
|
||||
<RightMenu>
|
||||
<template #right-panel>
|
||||
<EntryStockBoughtFilter
|
||||
data-key="StockBoughts"
|
||||
@set-user-params="setUserParams"
|
||||
/>
|
||||
</template>
|
||||
</RightMenu>
|
||||
<QPage class="column items-center q-pa-md">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="StockBoughts"
|
||||
url="StockBoughts/getStockBought"
|
||||
save-url="StockBoughts/crud"
|
||||
order="reserve DESC"
|
||||
:right-search="false"
|
||||
:is-editable="true"
|
||||
:create="{
|
||||
urlCreate: 'StockBoughts',
|
||||
title: t('Reserve some space'),
|
||||
onDataSaved: () => tableRef.reload(),
|
||||
formInitialData: {
|
||||
workerFk: user.id,
|
||||
dated: Date.vnNow(),
|
||||
},
|
||||
}"
|
||||
:columns="columns"
|
||||
:user-params="userParams"
|
||||
:footer="true"
|
||||
auto-load
|
||||
>
|
||||
<template #column-workerFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.worker?.user?.name }}
|
||||
<WorkerDescriptorProxy :id="row?.workerFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</QPage>
|
||||
</template>
|
||||
<style lang="css" scoped>
|
||||
.travel {
|
||||
margin-bottom: 0px;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
en:
|
||||
Buyer: Buyer
|
||||
Reserve: Reserve
|
||||
Bought: Bought
|
||||
More: More
|
||||
Date: Date
|
||||
This buyer has already made a reservation for this date: This buyer has already made a reservation for this date
|
||||
es:
|
||||
Edit travel: Editar envío
|
||||
Travel: Envíos
|
||||
Booked trucks: Camiones reservados
|
||||
Buyer: Comprador
|
||||
Reserve: Reservado
|
||||
Bought: Comprado
|
||||
More: Más
|
||||
Date: Fecha
|
||||
Reserve some space: Reservar espacio
|
||||
This buyer has already made a reservation for this date: Este comprador ya ha hecho una reserva para esta fecha
|
||||
</i18n>
|
|
@ -0,0 +1,113 @@
|
|||
<script setup>
|
||||
import { ref } from 'vue';
|
||||
import { useI18n } from 'vue-i18n';
|
||||
|
||||
import VnTable from 'components/VnTable/VnTable.vue';
|
||||
import EntryDescriptorProxy from 'src/pages/Entry/Card/EntryDescriptorProxy.vue';
|
||||
import ItemDescriptorProxy from 'src/pages/Item/Card/ItemDescriptorProxy.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const tableRef = ref();
|
||||
const $props = defineProps({
|
||||
workerFk: {
|
||||
type: Number,
|
||||
required: true,
|
||||
},
|
||||
dated: {
|
||||
type: Date,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const customUrl = `StockBoughts/getStockBoughtDetail?workerFk=${$props.workerFk}&date=${$props.dated}`;
|
||||
const columns = [
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Entry',
|
||||
name: 'entryFk',
|
||||
isTitle: true,
|
||||
isId: true,
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'itemFk',
|
||||
label: t('Item'),
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Name'),
|
||||
name: 'itemName',
|
||||
create: true,
|
||||
columnClass: 'expand',
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
name: 'volume',
|
||||
label: t('Volume'),
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: t('Packaging'),
|
||||
name: 'packagingFk',
|
||||
columnFilter: false,
|
||||
},
|
||||
{
|
||||
align: 'left',
|
||||
label: 'Packing',
|
||||
name: 'packing',
|
||||
columnFilter: false,
|
||||
},
|
||||
];
|
||||
</script>
|
||||
<template>
|
||||
<QDialog :maximized="true">
|
||||
<div class="container">
|
||||
<VnTable
|
||||
ref="tableRef"
|
||||
data-key="StockBoughtsDetail"
|
||||
:url="customUrl"
|
||||
order="itemName DESC"
|
||||
:columns="columns"
|
||||
:right-search="false"
|
||||
:disable-infinite-scroll="true"
|
||||
:disable-option="{ card: true }"
|
||||
:limit="0"
|
||||
auto-load
|
||||
>
|
||||
<template #column-entryFk="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.entryFk }}
|
||||
<EntryDescriptorProxy :id="row.entryFk" />
|
||||
</span>
|
||||
</template>
|
||||
<template #column-itemName="{ row }">
|
||||
<span class="link" @click.stop>
|
||||
{{ row?.itemName }}
|
||||
<ItemDescriptorProxy :id="row.itemFk" />
|
||||
</span>
|
||||
</template>
|
||||
</VnTable>
|
||||
</div>
|
||||
</QDialog>
|
||||
</template>
|
||||
<style lang="css">
|
||||
.q-dialog__inner {
|
||||
max-width: 50vw;
|
||||
overflow: auto;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin: auto;
|
||||
}
|
||||
</style>
|
||||
<i18n>
|
||||
es:
|
||||
Buyer: Comprador
|
||||
Reserve: Reservado
|
||||
Bought: Comprado
|
||||
More: Más
|
||||
Date: Fecha
|
||||
</i18n>
|
|
@ -0,0 +1,63 @@
|
|||
<script setup>
|
||||
import { useI18n } from 'vue-i18n';
|
||||
import { onMounted } from 'vue';
|
||||
import { useStateStore } from 'stores/useStateStore';
|
||||
|
||||
import VnFilterPanel from 'src/components/ui/VnFilterPanel.vue';
|
||||
import VnInputDate from 'src/components/common/VnInputDate.vue';
|
||||
|
||||
const { t } = useI18n();
|
||||
const props = defineProps({
|
||||
dataKey: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
const stateStore = useStateStore();
|
||||
const emit = defineEmits(['set-user-params']);
|
||||
const setUserParams = (params) => {
|
||||
emit('set-user-params', params);
|
||||
};
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnFilterPanel
|
||||
:data-key="props.dataKey"
|
||||
:search-button="true"
|
||||
search-url="table"
|
||||
@set-user-params="setUserParams"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<div class="q-gutter-x-xs">
|
||||
<strong>{{ t(`params.${tag.label}`) }}: </strong>
|
||||
<span>{{ formatFn(tag.value) }}</span>
|
||||
</div>
|
||||
</template>
|
||||
<template #body="{ params }">
|
||||
<QItem class="q-my-sm">
|
||||
<QItemSection>
|
||||
<VnInputDate
|
||||
id="date"
|
||||
v-model="params.dated"
|
||||
:label="t('Date')"
|
||||
is-outlined
|
||||
/>
|
||||
</QItemSection>
|
||||
</QItem>
|
||||
</template>
|
||||
</VnFilterPanel>
|
||||
</template>
|
||||
<i18n>
|
||||
en:
|
||||
params:
|
||||
dated: Date
|
||||
workerFk: Worker
|
||||
es:
|
||||
Date: Fecha
|
||||
params:
|
||||
dated: Date
|
||||
workerFk: Trabajador
|
||||
</i18n>
|
|
@ -177,7 +177,7 @@ watchEffect(selectedRows);
|
|||
<VnSearchbar
|
||||
:info="t('youCanSearchByInvoiceReference')"
|
||||
:label="t('searchInvoice')"
|
||||
data-key="InvoiceOutList"
|
||||
data-key="invoiceOut"
|
||||
/>
|
||||
<VnSubToolbar>
|
||||
<template #st-actions>
|
||||
|
|
|
@ -12,7 +12,7 @@ import ItemListFilter from '../ItemListFilter.vue';
|
|||
search-data-key="ItemList"
|
||||
:searchbar-props="{
|
||||
url: 'Items/filter',
|
||||
label: 'searchbar.labelr',
|
||||
label: 'searchbar.label',
|
||||
info: 'searchbar.info',
|
||||
}"
|
||||
/>
|
||||
|
|
|
@ -11,7 +11,6 @@ import VnConfirm from 'components/ui/VnConfirm.vue';
|
|||
import RegularizeStockForm from 'components/RegularizeStockForm.vue';
|
||||
import ItemDescriptorImage from 'src/pages/Item/Card/ItemDescriptorImage.vue';
|
||||
import useCardDescription from 'src/composables/useCardDescription';
|
||||
import { getUrl } from 'src/composables/getUrl';
|
||||
import axios from 'axios';
|
||||
import { dashIfEmpty } from 'src/filters';
|
||||
|
||||
|
@ -51,10 +50,8 @@ const entityId = computed(() => {
|
|||
const regularizeStockFormDialog = ref(null);
|
||||
const available = ref(null);
|
||||
const visible = ref(null);
|
||||
const salixUrl = ref();
|
||||
|
||||
onMounted(async () => {
|
||||
salixUrl.value = await getUrl('');
|
||||
await getItemConfigs();
|
||||
await updateStock();
|
||||
});
|
||||
|
@ -200,16 +197,11 @@ const openCloneDialog = async () => {
|
|||
<template #actions="{}">
|
||||
<QCardActions class="row justify-center">
|
||||
<QBtn
|
||||
:href="
|
||||
salixUrl +
|
||||
'item/' +
|
||||
entityId +
|
||||
'/diary?' +
|
||||
'warehouseFk=' +
|
||||
warehouseFk +
|
||||
'&lineFk=' +
|
||||
$props.saleFk
|
||||
"
|
||||
:to="{
|
||||
name: 'ItemDiary',
|
||||
params: { id: entityId },
|
||||
query: { warehouseFk, lineFk: $props.saleFk },
|
||||
}"
|
||||
size="md"
|
||||
icon="vn:transaction"
|
||||
color="primary"
|
||||
|
|
|
@ -168,19 +168,20 @@ const insertTag = (rows) => {
|
|||
</div>
|
||||
</VnRow>
|
||||
<VnRow class="justify-center items-center">
|
||||
<QIcon
|
||||
<QBtn
|
||||
@click="insertTag(rows)"
|
||||
class="cursor-pointer"
|
||||
:disable="!validRow"
|
||||
color="primary"
|
||||
name="add"
|
||||
size="sm"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
style="flex: 0"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('itemTags.addTag') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
|
|
|
@ -11,7 +11,7 @@ import FetchData from 'src/components/FetchData.vue';
|
|||
import { dateRange } from 'src/filters';
|
||||
|
||||
defineProps({ dataKey: { type: String, required: true } });
|
||||
const { t } = useI18n();
|
||||
const { t, te } = useI18n();
|
||||
const warehouses = ref();
|
||||
const groupedStates = ref();
|
||||
|
||||
|
@ -26,6 +26,12 @@ const handleScopeDays = (params, days, 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>
|
||||
<template>
|
||||
<FetchData url="Warehouses" auto-load @on-fetch="(data) => (warehouses = data)" />
|
||||
|
@ -43,10 +49,11 @@ const handleScopeDays = (params, days, callback) => {
|
|||
:hidden-tags="['from', 'to', 'search']"
|
||||
:custom-tags="['scopeDays']"
|
||||
:unremovable-params="['from', 'to', 'scopeDays']"
|
||||
search-url="saleMonitorTickets"
|
||||
>
|
||||
<template #tags="{ tag, formatFn }">
|
||||
<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)" />
|
||||
</div>
|
||||
</template>
|
||||
|
@ -110,7 +117,7 @@ const handleScopeDays = (params, days, callback) => {
|
|||
url="Workers/search"
|
||||
:params="{ departmentCodes: ['VT'] }"
|
||||
is-outlined
|
||||
option-value="code"
|
||||
option-value="id"
|
||||
option-label="name"
|
||||
:no-one="true"
|
||||
>
|
||||
|
|
|
@ -3,7 +3,6 @@ import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
|||
import { useI18n } from 'vue-i18n';
|
||||
const { t } = useI18n();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<VnSearchbar
|
||||
data-key="RouteList"
|
||||
|
|
|
@ -103,8 +103,8 @@ es:
|
|||
Roadmap: Troncal
|
||||
ETD date: Fecha ETD
|
||||
ETD hour: Hora ETD
|
||||
Tractor plate: Matrícula tractor
|
||||
Trailer plate: Matrícula trailer
|
||||
Tractor plate: Matrícula tractora
|
||||
Trailer plate: Matrícula remolque
|
||||
Carrier: Transportista
|
||||
Price: Precio
|
||||
Driver name: Nombre del conductor
|
||||
|
|
|
@ -164,8 +164,8 @@ en:
|
|||
to: To
|
||||
es:
|
||||
params:
|
||||
tractorPlate: Matrícula del tractor
|
||||
trailerPlate: Matrícula del trailer
|
||||
tractorPlate: Matrícula tractora
|
||||
trailerPlate: Matrícula remolque
|
||||
supplierFk: Transportista
|
||||
price: Precio
|
||||
driverName: Nombre del conductor
|
||||
|
@ -174,8 +174,8 @@ es:
|
|||
to: Hasta
|
||||
From: Desde
|
||||
To: Hasta
|
||||
Tractor Plate: Matrícula del tractor
|
||||
Trailer Plate: Matrícula del trailer
|
||||
Tractor Plate: Matrícula tractora
|
||||
Trailer Plate: Matrícula remolque
|
||||
Carrier: Transportista
|
||||
Price: Precio
|
||||
Driver name: Nombre del conductor
|
||||
|
|
|
@ -65,9 +65,10 @@ const updateDefaultStop = (data) => {
|
|||
</div>
|
||||
</QCardSection>
|
||||
<QCardSection>
|
||||
<QIcon
|
||||
name="add"
|
||||
size="sm"
|
||||
<QBtn
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
@click="roadmapStopsCrudRef.insert()"
|
||||
|
@ -75,7 +76,7 @@ const updateDefaultStop = (data) => {
|
|||
<QTooltip>
|
||||
{{ t('Add stop') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</QCardSection>
|
||||
</QCard>
|
||||
</template>
|
||||
|
|
|
@ -149,8 +149,8 @@ const filter = {
|
|||
<i18n>
|
||||
es:
|
||||
Carrier: Transportista
|
||||
Tractor Plate: Matrícula tractor
|
||||
Trailer Plate: Matrícula trailer
|
||||
Tractor Plate: Matrícula tractora
|
||||
Trailer Plate: Matrícula remolque
|
||||
Phone: Teléfono
|
||||
Worker: Trabajador
|
||||
Observations: Observaciones
|
||||
|
|
|
@ -237,4 +237,5 @@ es:
|
|||
Price: Precio
|
||||
Observations: Observaciones
|
||||
Preview: Vista previa
|
||||
Select the estimated date of departure (ETD): Selecciona la fecha estimada de salida
|
||||
</i18n>
|
||||
|
|
|
@ -102,9 +102,7 @@ const setWireTransfer = async () => {
|
|||
<VnInput :label="t('supplier.accounts.iban')" v-model="row.iban">
|
||||
<template #append>
|
||||
<QIcon name="info" class="cursor-info">
|
||||
<QTooltip>{{
|
||||
t('components.iban_tooltip')
|
||||
}}</QTooltip>
|
||||
<QTooltip>{{ t('components.iban_tooltip') }}</QTooltip>
|
||||
</QIcon>
|
||||
</template>
|
||||
</VnInput>
|
||||
|
@ -165,9 +163,10 @@ const setWireTransfer = async () => {
|
|||
</div>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QIcon
|
||||
name="add"
|
||||
size="sm"
|
||||
<QBtn
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
@click="supplierAccountRef.insert()"
|
||||
|
@ -175,7 +174,7 @@ const setWireTransfer = async () => {
|
|||
<QTooltip>
|
||||
{{ t('Add account') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
|
|
|
@ -84,9 +84,10 @@ const insertRow = () => {
|
|||
</VnRow>
|
||||
</QCardSection>
|
||||
<VnRow>
|
||||
<QIcon
|
||||
name="add"
|
||||
size="sm"
|
||||
<QBtn
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
class="cursor-pointer"
|
||||
color="primary"
|
||||
@click="insertRow()"
|
||||
|
@ -94,7 +95,7 @@ const insertRow = () => {
|
|||
<QTooltip>
|
||||
{{ t('Add contact') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</VnRow>
|
||||
</QCard>
|
||||
</template>
|
||||
|
|
|
@ -109,7 +109,7 @@ const getEntryQueryParams = (supplier) => {
|
|||
:subtitle="data.subtitle"
|
||||
:filter="filter"
|
||||
@on-fetch="setData"
|
||||
data-key="supplier"
|
||||
data-key="supplierDescriptor"
|
||||
:summary="$props.summary"
|
||||
>
|
||||
<template #body="{ entity }">
|
||||
|
|
|
@ -19,8 +19,8 @@ const sageTransactionTypesOptions = ref([]);
|
|||
const supplierActivitiesOptions = ref([]);
|
||||
|
||||
function handleLocation(data, location) {
|
||||
const { town, label, provinceFk, countryFk } = location ?? {};
|
||||
data.postCode = label;
|
||||
const { town, code, provinceFk, countryFk } = location ?? {};
|
||||
data.postCode = code;
|
||||
data.city = town;
|
||||
data.provinceFk = provinceFk;
|
||||
data.countryFk = countryFk;
|
||||
|
|
|
@ -70,6 +70,9 @@ const agenciesOptions = ref([]);
|
|||
hide-selected
|
||||
/>
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<VnInput v-model="data.m3" label="m3" />
|
||||
</VnRow>
|
||||
<VnRow>
|
||||
<QCheckbox
|
||||
:label="t('travel.basicData.delivered')"
|
||||
|
|
|
@ -11,6 +11,9 @@ import TravelSummary from './Card/TravelSummary.vue';
|
|||
import VnSearchbar from 'components/ui/VnSearchbar.vue';
|
||||
import { toDate } from 'src/filters';
|
||||
import { getDateQBadgeColor } from 'src/composables/getDateQBadgeColor.js';
|
||||
import { dateRange } from 'src/filters';
|
||||
import VnInputNumber from 'src/components/common/VnInputNumber.vue';
|
||||
|
||||
const { viewSummary } = useSummaryDialog();
|
||||
const router = useRouter();
|
||||
const { t } = useI18n();
|
||||
|
@ -24,11 +27,27 @@ const $props = defineProps({
|
|||
},
|
||||
});
|
||||
const entityId = computed(() => $props.id || route.params.id);
|
||||
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
handleScopeDays();
|
||||
});
|
||||
|
||||
const cloneTravel = (travelData) => {
|
||||
const stringifiedTravelData = JSON.stringify(travelData);
|
||||
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) => {
|
||||
router.push({ name: 'TravelCreate', query: { travelData: queryParams } });
|
||||
};
|
||||
|
@ -37,10 +56,6 @@ const redirectCreateEntryView = (travelData) => {
|
|||
router.push({ name: 'EntryCreate', query: { travelFk: travelData.id } });
|
||||
};
|
||||
|
||||
onMounted(async () => {
|
||||
stateStore.rightDrawer = true;
|
||||
});
|
||||
|
||||
const columns = computed(() => [
|
||||
{
|
||||
align: 'left',
|
||||
|
@ -241,6 +256,17 @@ const columns = computed(() => [
|
|||
:class="{ 'is-active': row.isReceived }"
|
||||
/>
|
||||
</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>
|
||||
</template>
|
||||
|
||||
|
|
|
@ -180,17 +180,18 @@ function handleEvent(type, event, node) {
|
|||
{{ t('Remove') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
<QIcon
|
||||
name="add"
|
||||
<QBtn
|
||||
color="primary"
|
||||
size="sm"
|
||||
flat
|
||||
icon="add"
|
||||
shortcut="+"
|
||||
class="cursor-pointer"
|
||||
@click.stop="showCreateNodeForm(node.id)"
|
||||
>
|
||||
<QTooltip>
|
||||
{{ t('Create') }}
|
||||
</QTooltip>
|
||||
</QIcon>
|
||||
</QBtn>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -12,7 +12,7 @@ export default {
|
|||
component: RouterView,
|
||||
redirect: { name: 'EntryMain' },
|
||||
menus: {
|
||||
main: ['EntryList', 'MyEntries', 'EntryLatestBuys'],
|
||||
main: ['EntryList', 'MyEntries', 'EntryLatestBuys', 'EntryStockBought'],
|
||||
card: ['EntryBasicData', 'EntryBuys', 'EntryNotes', 'EntryDms', 'EntryLog'],
|
||||
},
|
||||
children: [
|
||||
|
@ -58,6 +58,15 @@ export default {
|
|||
},
|
||||
component: () => import('src/pages/Entry/EntryLatestBuys.vue'),
|
||||
},
|
||||
{
|
||||
path: 'stock-Bought',
|
||||
name: 'EntryStockBought',
|
||||
meta: {
|
||||
title: 'reserves',
|
||||
icon: 'deployed_code_history',
|
||||
},
|
||||
component: () => import('src/pages/Entry/EntryStockBought.vue'),
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
|
|
|
@ -0,0 +1,41 @@
|
|||
describe('EntryStockBought', () => {
|
||||
beforeEach(() => {
|
||||
cy.viewport(1920, 1080);
|
||||
cy.login('buyer');
|
||||
cy.visit(`/#/entry/stock-Bought`);
|
||||
});
|
||||
it('Should edit the reserved space', () => {
|
||||
cy.get('.q-field__native.q-placeholder').should('have.value', '01/01/2001');
|
||||
cy.get('tBody > tr').its('length').should('eq', 2);
|
||||
cy.get('input[name="reserve"]').type('10{enter}');
|
||||
cy.get('button[title="Save"]').click();
|
||||
cy.get('.q-notification__message').should('have.text', 'Data saved');
|
||||
});
|
||||
it('Should add a new reserved space for buyerBoss', () => {
|
||||
cy.get('.q-page-sticky > div > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('input[aria-label="Reserve"]').type('1');
|
||||
cy.get('input[aria-label="Date"]').eq(1).clear();
|
||||
cy.get('input[aria-label="Date"]').eq(1).type('01-01');
|
||||
cy.get('input[aria-label="Buyer"]').type('buyerboss{downarrow}{enter}');
|
||||
cy.get('.q-notification__message').should('have.text', 'Data created');
|
||||
cy.get('tBody > tr').its('length').should('eq', 3);
|
||||
});
|
||||
it('Should check detail for the buyer', () => {
|
||||
cy.get(':nth-child(1) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('tBody > tr').eq(1).its('length').should('eq', 1);
|
||||
});
|
||||
it('Should check detail for the buyerBoss and had no content', () => {
|
||||
cy.get(':nth-child(2) > .sticky > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('.q-table__bottom.row.items-center.q-table__bottom--nodata').should(
|
||||
'have.text',
|
||||
'warningNo data available'
|
||||
);
|
||||
});
|
||||
it('Should edit travel m3 and refresh', () => {
|
||||
cy.get('.vn-row > div > .q-btn > .q-btn__content > .q-icon').click();
|
||||
cy.get('input[aria-label="m3"]').clear();
|
||||
cy.get('input[aria-label="m3"]').type('60');
|
||||
cy.get('.q-mt-lg > .q-btn--standard > .q-btn__content > .block').click();
|
||||
cy.get('.vn-row > div > :nth-child(2)').should('have.text', '60');
|
||||
});
|
||||
});
|
Loading…
Reference in New Issue