- Seleziona l'ordine GAS e compare sulla email
- img logo
This commit is contained in:
@@ -1979,7 +1979,7 @@ export const colTableProducts = [
|
||||
}),
|
||||
AddCol({
|
||||
name: 'idGasordines',
|
||||
label_trans: 'gasordine.name',
|
||||
label_trans: 'gas.name',
|
||||
fieldtype: costanti.FieldType.multiselect,
|
||||
jointable: 'gasordines',
|
||||
}),
|
||||
|
||||
@@ -10,6 +10,7 @@ import {
|
||||
IProject,
|
||||
ITimeLineMain,
|
||||
ITodo,
|
||||
IOrder,
|
||||
IUserFields,
|
||||
Privacy,
|
||||
TipoVisu, IGroup, IMySkill, IMyBacheca, IImgGallery, IMsgGlobParam, IUserExport, ISpecialField, IAccount, IMyCircuit, ISendCoin, IMovement, IMovVisu, INotif, IMyElem, IMyCard, ILabelValue, ILabelValueStr, IAnim, ILang, IGroupShort, IPagination, IFavorite, IBookmark,
|
||||
@@ -66,6 +67,7 @@ export const tools = {
|
||||
|
||||
COOK_SEARCH: 'SEARCH_',
|
||||
COOK_TAB_CIRCUIT: 'TAB_CIRC',
|
||||
COOK_COSA_PRODOTTI: 'PROD',
|
||||
|
||||
FRIENDS_SEARCH: 'FR_SE',
|
||||
GROUP_SEARCH: 'GR_SE',
|
||||
@@ -8250,6 +8252,10 @@ export const tools = {
|
||||
return unitrec ? (short ? unitrec.short : unitrec.label) : ''
|
||||
},
|
||||
|
||||
getWeightTotalByOrder(order: IOrder) {
|
||||
return (order.product && order.product.weight ? order.product.weight : 1) * (order.quantitypreordered | 0 + order.quantity | 0)
|
||||
},
|
||||
|
||||
isPartecipero(myrec: any) {
|
||||
const userStore = useUserStore()
|
||||
if (myrec && myrec.mybookings && myrec.mybookings.length > 0) {
|
||||
|
||||
@@ -12,6 +12,8 @@ import { toolsext } from '@store/Modules/toolsext'
|
||||
import { useGlobalStore } from './globalStore'
|
||||
import { ref } from 'vue'
|
||||
|
||||
import translate from '@src/globalroutines/util'
|
||||
|
||||
export const useProducts = defineStore('Products', {
|
||||
state: (): IProductsState => ({
|
||||
products: [],
|
||||
@@ -27,7 +29,7 @@ export const useProducts = defineStore('Products', {
|
||||
ris = state.products.filter((rec) => (rec.idGasordines && rec.idGasordines.length > 0))
|
||||
} else if (cosa === shared_consts.PROD.BOTTEGA) {
|
||||
ris = state.products.filter((rec) => (!rec.idGasordines || (rec.idGasordines && rec.idGasordines.length === 0)))
|
||||
}
|
||||
}
|
||||
return ris ? ris : []
|
||||
} else {
|
||||
return state.products
|
||||
@@ -285,11 +287,12 @@ export const useProducts = defineStore('Products', {
|
||||
quantity: order.quantity,
|
||||
quantitypreordered: order.quantitypreordered,
|
||||
idStorehouse: order.idStorehouse,
|
||||
idGasordine: order.idGasordine,
|
||||
idScontisticas: product.idScontisticas,
|
||||
}
|
||||
|
||||
if (product.storehouses.length === 1) {
|
||||
order.idStorehouse = product.storehouses[0]._id
|
||||
myorder.idStorehouse = product.storehouses[0]._id
|
||||
}
|
||||
|
||||
return myorder
|
||||
@@ -731,7 +734,25 @@ export const useProducts = defineStore('Products', {
|
||||
return false;
|
||||
},
|
||||
|
||||
getSingleGasordine(order: IOrder, short: boolean): string {
|
||||
try {
|
||||
const mygas = order.gasordine
|
||||
if (mygas) {
|
||||
if (short)
|
||||
return mygas.name!
|
||||
else
|
||||
return mygas.name + ' (' + mygas.city + ') ' + translate('gas.dataora_chiusura_ordini') + ': ' + tools.getstrDateShort(mygas.dataora_chiusura_ordini)
|
||||
+ ' ' + translate('gas.dataora_ritiro') + ': ' + tools.getstrDateShort(mygas.dataora_ritiro)
|
||||
} else
|
||||
return ''
|
||||
} catch (e) {
|
||||
return ''
|
||||
}
|
||||
}
|
||||
|
||||
},
|
||||
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user