Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 2920-item_descriptor_user_warehouse
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
commit
9a1b6e4653
|
@ -461,8 +461,8 @@ export default {
|
|||
itemDescriptorPopover: '.vn-popover.shown vn-item-descriptor',
|
||||
itemDescriptorPopoverItemDiaryButton: 'vn-item-descriptor a[href="#!/item/2/diary?warehouseFk=5&lineFk=16"]',
|
||||
popoverDiaryButton: '.vn-popover.shown vn-item-descriptor vn-icon[icon="icon-transaction"]',
|
||||
firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(3)',
|
||||
firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)',
|
||||
firstSaleQuantity: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(4)',
|
||||
firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(7)',
|
||||
invoiceOutRef: 'vn-ticket-summary > vn-card > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(7) > section > span',
|
||||
setOk: 'vn-ticket-summary vn-button[label="SET OK"] > button',
|
||||
descriptorTicketId: 'vn-ticket-descriptor > vn-descriptor-content > div > div.body > div.top > div'
|
||||
|
|
|
@ -62,7 +62,7 @@ module.exports = Self => {
|
|||
itemId: sale.itemFk,
|
||||
ticketId: sale.ticketFk,
|
||||
nickname: nickname,
|
||||
ticketUrl: `${origin}/#!/ticket/${sale.ticketFk}/summary`,
|
||||
ticketUrl: `${origin}/#!/ticket/${sale.ticketFk}/sale`,
|
||||
itemUrl: `${origin}/#!/item/${sale.itemFk}/summary`
|
||||
});
|
||||
await models.Chat.sendCheckingPresence(ctx, salesPerson.id, message);
|
||||
|
|
|
@ -58,7 +58,7 @@ module.exports = function(Self) {
|
|||
const httpRequest = httpCtx.req.http.req;
|
||||
const $t = httpRequest.__;
|
||||
const origin = httpRequest.headers.origin;
|
||||
const fullPath = `${origin}/#!/client/${client.id}`;
|
||||
const fullPath = `${origin}/#!/client/${client.id}/credit-insurance/index`;
|
||||
const message = $t('MESSAGE_INSURANCE_CHANGE', {
|
||||
clientId: client.id,
|
||||
clientName: client.name,
|
||||
|
|
|
@ -221,7 +221,7 @@ module.exports = Self => {
|
|||
|
||||
const message = $t('Changed this data from the ticket', {
|
||||
ticketId: args.id,
|
||||
ticketUrl: `${origin}/#!/ticket/${args.id}/summary`,
|
||||
ticketUrl: `${origin}/#!/ticket/${args.id}/sale`,
|
||||
changes: changesMade
|
||||
});
|
||||
await models.Chat.sendCheckingPresence(ctx, salesPersonId, message, myOptions);
|
||||
|
|
|
@ -77,7 +77,7 @@ module.exports = Self => {
|
|||
const origin = ctx.req.headers.origin;
|
||||
const message = $t('This ticket is not an stowaway anymore', {
|
||||
ticketId: stowawayFk,
|
||||
ticketUrl: `${origin}/#!/ticket/${stowawayFk}/summary`
|
||||
ticketUrl: `${origin}/#!/ticket/${stowawayFk}/sale`
|
||||
});
|
||||
await models.Chat.sendCheckingPresence(ctx, salesPerson.id, message);
|
||||
}
|
||||
|
|
|
@ -22,7 +22,7 @@ module.exports = Self => {
|
|||
Self.summary = async ticketFk => {
|
||||
let models = Self.app.models;
|
||||
let summaryObj = await getTicketData(Self, ticketFk);
|
||||
summaryObj.sales = await getSales(models.Sale, ticketFk);
|
||||
summaryObj.sales = await models.Ticket.getSales(ticketFk);
|
||||
summaryObj.packagings = await models.TicketPackaging.find({
|
||||
where: {ticketFk: ticketFk},
|
||||
include: [{relation: 'packaging',
|
||||
|
@ -102,20 +102,6 @@ module.exports = Self => {
|
|||
return await Self.findOne(filter);
|
||||
}
|
||||
|
||||
async function getSales(Sale, ticketFk) {
|
||||
let filter = {
|
||||
where: {
|
||||
ticketFk: ticketFk
|
||||
},
|
||||
order: 'concept',
|
||||
include: [
|
||||
{relation: 'item'},
|
||||
{relation: 'claimBeginning'}
|
||||
]
|
||||
};
|
||||
return await Sale.find(filter);
|
||||
}
|
||||
|
||||
async function getRequests(Self, ticketFk) {
|
||||
let filter = {
|
||||
where: {
|
||||
|
|
|
@ -120,6 +120,7 @@
|
|||
<vn-tr>
|
||||
<vn-th shrink></vn-th>
|
||||
<vn-th number shrink>Item</vn-th>
|
||||
<vn-th number shrink>Available</vn-th>
|
||||
<vn-th number shrink>Quantity</vn-th>
|
||||
<vn-th>Description</vn-th>
|
||||
<vn-th number>Price</vn-th>
|
||||
|
@ -137,12 +138,6 @@
|
|||
vn-tooltip="{{::$ctrl.$t('Claim')}}: {{::sale.claimBeginning.claimFk}}">
|
||||
</vn-icon>
|
||||
</a>
|
||||
<vn-icon
|
||||
ng-show="sale.visible || sale.available"
|
||||
color-main
|
||||
icon="warning"
|
||||
vn-tooltip="Visible: {{::sale.visible || 0}} <br> {{::$ctrl.translate.instant('Available')}} {{::sale.available || 0}}">
|
||||
</vn-icon>
|
||||
<vn-icon ng-show="sale.reserved" icon="icon-reserva"></vn-icon>
|
||||
</vn-td>
|
||||
<vn-td number shrink>
|
||||
|
@ -152,6 +147,10 @@
|
|||
{{sale.itemFk | zeroFill:6}}
|
||||
</span>
|
||||
</vn-td>
|
||||
<vn-td number shrink>
|
||||
<vn-chip class="transparent" ng-class="{'message': sale.available < 0}">{{::sale.available}}
|
||||
</vn-chip>
|
||||
</vn-td>
|
||||
<vn-td number shrink>{{::sale.quantity}}</vn-td>
|
||||
<vn-td vn-fetched-tags wide>
|
||||
<vn-one title="{{::sale.item.name}}">{{::sale.item.name}}</vn-one>
|
||||
|
|
|
@ -12,4 +12,4 @@ claim: Reclamación {0}
|
|||
sections:
|
||||
agency:
|
||||
description: 'Para agilizar su recogida, por favor, póngase en contacto con la oficina
|
||||
de integrados. <br/> Tlf: 96 166 77 88 - Ana Gómez (Ext. 2113) <em>(agomez@integra2.com)</em>'
|
||||
de integrados. <br/> Tlf: 96 166 77 88 - Ana Gómez (Ext. 2113) <em>(agomezf@integra2.com)</em>'
|
||||
|
|
Loading…
Reference in New Issue