Merge branch 'dev' into 2455-socialname_validation
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Joan Sanchez 2020-10-05 07:01:11 +00:00
commit 0dee59f66f
19 changed files with 87 additions and 150 deletions

View File

@ -194,7 +194,12 @@ BEGIN
vTplHost,
JSON_MERGE_PATCH(
IFNULL(t.`Priv`, '{}'),
IFNULL(u.`Priv`, '{}')
IFNULL(u.`Priv`, '{}'),
JSON_OBJECT(
'mysql_old_password', JSON_VALUE(t.`Priv`, '$.mysql_old_password'),
'mysql_native_password', JSON_VALUE(t.`Priv`, '$.mysql_native_password'),
'authentication_string', JSON_VALUE(t.`Priv`, '$.authentication_string')
)
)
FROM tRole r
LEFT JOIN mysql.global_priv t

View File

@ -20,14 +20,11 @@ export default {
userConfigFirstAutocomplete: '#localWarehouse',
userConfigSecondAutocomplete: '#localBank',
userConfigThirdAutocomplete: '#localCompany',
acceptButton: '.vn-confirm.shown button[response=accept]'
acceptButton: '.vn-confirm.shown button[response=accept]',
searchButton: 'vn-searchbar vn-icon[icon="search"]'
},
clientsIndex: {
topbarSearch: 'vn-topbar',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
searchResult: 'vn-client-index .vn-item',
createClientButton: `vn-float-button`,
othersButton: 'vn-left-menu li[name="Others"] > a'
createClientButton: `vn-float-button`
},
clientSummary: {
header: 'vn-client-summary > vn-card > h5',
@ -52,15 +49,13 @@ export default {
userName: 'vn-client-create vn-textfield[ng-model="$ctrl.client.userName"]',
email: 'vn-client-create vn-textfield[ng-model="$ctrl.client.email"]',
salesPerson: 'vn-client-create vn-autocomplete[ng-model="$ctrl.client.salesPersonFk"]',
createButton: 'vn-client-create button[type=submit]',
cancelButton: 'vn-button[href="#!/client/index"]'
createButton: 'vn-client-create button[type=submit]'
},
clientDescriptor: {
moreMenu: 'vn-client-descriptor vn-icon-button[icon=more_vert]',
simpleTicketButton: '.vn-menu [name="simpleTicket"]'
},
clientBasicData: {
basicDataButton: 'vn-left-menu a[ui-sref="client.card.basicData"]',
name: 'vn-client-basic-data vn-textfield[ng-model="$ctrl.client.name"]',
contact: 'vn-client-basic-data vn-textfield[ng-model="$ctrl.client.contact"]',
email: 'vn-client-basic-data vn-textfield[ng-model="$ctrl.client.email"]',
@ -75,7 +70,6 @@ export default {
socialName: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.socialName"]',
fiscalId: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.fi"]',
equalizationTaxCheckbox: 'vn-client-fiscal-data vn-check[ng-model="$ctrl.client.isEqualizated"]',
acceptPropagationButton: '.vn-confirm.shown button[response=accept]',
address: 'vn-client-fiscal-data vn-textfield[ng-model="$ctrl.client.street"]',
postcode: 'vn-client-fiscal-data vn-datalist[ng-model="$ctrl.client.postcode"]',
city: 'vn-client-fiscal-data vn-datalist[ng-model="$ctrl.client.city"]',
@ -89,7 +83,6 @@ export default {
notifyByMailCheckbox: 'vn-client-fiscal-data vn-check[label="Notify by email"]',
viesCheckbox: 'vn-client-fiscal-data vn-check[label="Vies"]',
saveButton: 'button[type=submit]',
acceptDuplicationButton: '.vn-confirm.shown button[response=accept]',
watcher: 'vn-client-fiscal-data vn-watcher'
},
clientBillingData: {
@ -140,12 +133,10 @@ export default {
secondObservationDescription: 'vn-client-address-edit [name=observations] vn-horizontal:nth-child(2) vn-textfield[ng-model="observation.description"]',
addObservationButton: 'vn-client-address-edit div[name="observations"] vn-icon-button[icon="add_circle"]',
saveButton: 'button[type=submit]',
cancelCreateAddressButton: 'button[ui-sref="client.card.address.index"]',
cancelEditAddressButton: 'vn-client-address-edit > form > vn-button-bar > vn-button > button',
watcher: 'vn-client-address-edit vn-watcher'
},
clientWebAccess: {
webAccessButton: 'vn-left-menu a[ui-sref="client.card.webAccess"]',
enableWebAccessCheckbox: 'vn-check[label="Enable web access"]',
userName: 'vn-client-web-access vn-textfield[ng-model="$ctrl.account.name"]',
saveButton: 'button[type=submit]'
@ -173,12 +164,7 @@ export default {
clientMandate: {
firstMandateText: 'vn-client-mandate vn-card vn-table vn-tbody > vn-tr'
},
clientInvoices: {
firstInvoiceText: 'vn-client-invoice vn-card vn-table vn-tbody > vn-tr'
},
clientLog: {
logButton: 'vn-left-menu a[ui-sref="client.card.log"]',
lastModificationDate: 'vn-client-log > vn-log vn-table vn-tbody > vn-tr > vn-td:nth-child(1)',
lastModificationPreviousValue: 'vn-client-log vn-table vn-td.before',
lastModificationCurrentValue: 'vn-client-log vn-table vn-td.after'
@ -210,15 +196,12 @@ export default {
saveButton: 'button[type=submit]'
},
itemsIndex: {
searchIcon: 'vn-searchbar vn-icon[icon="search"]',
createItemButton: `vn-float-button`,
firstSearchResult: 'vn-item-index a:nth-child(1)',
searchResult: 'vn-item-index a.vn-tr',
firstResultPreviewButton: 'vn-item-index vn-tbody > :nth-child(1) .buttons > [icon="desktop_windows"]',
searchResultCloneButton: 'vn-item-index .buttons > [icon="icon-clone"]',
acceptClonationAlertButton: '.vn-confirm.shown [response="accept"]',
topbarSearch: 'vn-topbar',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
closeItemSummaryPreview: '.vn-popup.shown',
fieldsToShowButton: 'vn-item-index vn-table > div > div > vn-icon-button[icon="more_vert"]',
fieldsToShowForm: '.vn-popover.shown .content',
@ -254,8 +237,7 @@ export default {
regularizeWarehouse: '.vn-dialog.shown vn-autocomplete[ng-model="$ctrl.warehouseFk"]',
editButton: 'vn-item-descriptor vn-float-button[icon="edit"]',
regularizeSaveButton: '.vn-dialog.shown tpl-buttons > button',
inactiveIcon: 'vn-item-descriptor vn-icon[icon="icon-unavailable"]',
navigateBackToIndex: 'vn-item-descriptor [name="goToModuleIndex"]'
inactiveIcon: 'vn-item-descriptor vn-icon[icon="icon-unavailable"]'
},
itemRequest: {
firstRequestItemID: 'vn-item-request vn-tbody > vn-tr:nth-child(1) > vn-td-editable:nth-child(7)',
@ -264,11 +246,9 @@ export default {
secondRequestStatus: 'vn-item-request vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(10)',
firstRequestStatus: 'vn-item-request vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(10)',
secondRequestDecline: 'vn-item-request vn-tbody > vn-tr:nth-child(1) vn-icon-button[icon="thumb_down"]',
declineReason: 'vn-textarea[ng-model="$ctrl.denyObservation"]',
acceptDeclineReason: 'button[response="accept"]',
declineReason: 'vn-textarea[ng-model="$ctrl.denyObservation"]'
},
itemBasicData: {
basicDataButton: 'vn-left-menu a[ui-sref="item.card.basicData"]',
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
type: 'vn-autocomplete[ng-model="$ctrl.item.typeFk"]',
intrastat: 'vn-autocomplete[ng-model="$ctrl.item.intrastatFk"]',
@ -287,8 +267,6 @@ export default {
submitBasicDataButton: `button[type=submit]`
},
itemTags: {
goToItemIndexButton: 'vn-item-descriptor [ui-sref="item.index"]',
tagsButton: 'vn-left-menu a[ui-sref="item.card.tags"]',
fourthTag: 'vn-item-tags vn-horizontal:nth-child(4) > vn-autocomplete[ng-model="itemTag.tagFk"]',
fourthValue: 'vn-item-tags vn-horizontal:nth-child(4) vn-textfield[ng-model="itemTag.value"]',
fourthRelevancy: 'vn-item-tags vn-horizontal:nth-child(4) [ng-model="itemTag.priority"]',
@ -346,8 +324,7 @@ export default {
itemDiary: {
secondTicketId: 'vn-item-diary vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(2) > span',
fourthBalance: 'vn-item-diary vn-tbody > vn-tr:nth-child(4) > vn-td.balance > span',
firstBalance: 'vn-item-diary vn-tbody > vn-tr:nth-child(1) > vn-td.balance',
warehouse: 'vn-item-diary vn-autocomplete[ng-model="$ctrl.warehouseFk"]',
firstBalance: 'vn-item-diary vn-tbody > vn-tr:nth-child(1) > vn-td.balance'
},
itemLog: {
anyLineCreated: 'vn-item-log > vn-log vn-tbody > vn-tr',
@ -387,7 +364,6 @@ export default {
searchWeeklyResult: 'vn-ticket-weekly-index vn-table vn-tbody > vn-tr',
searchResultDate: 'vn-ticket-summary [label=Landed] span',
topbarSearch: 'vn-searchbar',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
moreMenu: 'vn-ticket-index vn-icon-button[icon=more_vert]',
sixthWeeklyTicket: 'vn-ticket-weekly-index vn-table vn-tr:nth-child(6)',
weeklyTicket: 'vn-ticket-weekly-index vn-table > div > vn-tbody > vn-tr',
@ -435,13 +411,10 @@ export default {
submitNotesButton: 'button[type=submit]'
},
ticketExpedition: {
expeditionButton: 'vn-left-menu a[ui-sref="ticket.card.expedition"]',
secondExpeditionRemoveButton: 'vn-ticket-expedition vn-table div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(1) > vn-icon-button[icon="delete"]',
acceptDeleteRowButton: '.vn-confirm.shown button[response=accept]',
expeditionRow: 'vn-ticket-expedition vn-table vn-tbody > vn-tr'
},
ticketPackages: {
packagesButton: 'vn-left-menu a[ui-sref="ticket.card.package"]',
firstPackage: 'vn-autocomplete[label="Package"]',
firstQuantity: 'vn-ticket-package vn-horizontal:nth-child(1) vn-input-number[ng-model="package.quantity"]',
firstRemovePackageButton: 'vn-icon-button[vn-tooltip="Remove package"]',
@ -450,12 +423,9 @@ export default {
},
ticketSales: {
setOk: 'vn-ticket-sale vn-tool-bar > vn-button[label="Ok"] > button',
saleButton: 'vn-left-menu a[ui-sref="ticket.card.sale"]',
saleLine: 'vn-table div > vn-tbody > vn-tr',
saleDescriptorPopover: '.vn-popover.shown vn-item-descriptor',
saleDescriptorPopoverSummaryButton: '.vn-popover.shown vn-item-descriptor a[ui-sref="item.card.summary({id: $ctrl.descriptor.id})"]',
descriptorItemDiaryButton: '.vn-popover vn-item-descriptor vn-quick-link[icon="icon-transaction"] > a',
newItemFromCatalogButton: 'vn-ticket-sale vn-float-button[icon="add"]',
newItemButton: 'vn-ticket-sale vn-card vn-icon-button[icon="add_circle"]',
moreMenu: 'vn-ticket-sale vn-button[label="More"]',
moreMenuCreateClaim: 'vn-item[name="claim"]',
@ -468,12 +438,10 @@ export default {
firstSaleId: 'vn-ticket-sale vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(4) > span',
firstSaleClaimIcon: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(1) vn-icon[icon="icon-claims"]',
firstSaleDescriptorImage: '.vn-popover.shown vn-item-descriptor img',
firstSaleText: 'vn-table div > vn-tbody > vn-tr:nth-child(1)',
firstSaleThumbnailImage: 'vn-ticket-sale:nth-child(1) vn-tr:nth-child(1) vn-td:nth-child(3) > img',
firstSaleZoomedImage: 'body > div > div > img',
firstSaleQuantity: 'vn-ticket-sale [ng-model="sale.quantity"]',
firstSaleQuantityCell: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td-editable:nth-child(5)',
firstSaleIdAutocomplete: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(4) > vn-autocomplete',
firstSalePrice: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(7) > span',
firstSalePriceInput: '.vn-popover.shown input[ng-model="$ctrl.field"]',
firstSaleDiscount: 'vn-ticket-sale vn-table vn-tr:nth-child(1) > vn-td:nth-child(8) > span',
@ -481,16 +449,9 @@ export default {
firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(9)',
firstSaleReservedIcon: 'vn-ticket-sale vn-tr:nth-child(1) > vn-td:nth-child(2) > vn-icon:nth-child(3)',
firstSaleColour: 'vn-ticket-sale vn-tr:nth-child(1) vn-fetched-tags section',
firstSaleLength: 'vn-ticket-sale vn-tr:nth-child(1) vn-td-editable:nth-child(6) section:nth-child(3)',
firstSaleCheckbox: 'vn-ticket-sale vn-tr:nth-child(1) vn-check[ng-model="sale.checked"]',
secondSaleColour: 'vn-tr:nth-child(2) vn-fetched-tags section',
secondSalePrice: 'vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(7) > span',
secondSaleDiscount: 'vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(8)',
secondSaleImport: 'vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(9)',
secondSaleText: 'vn-table div > vn-tbody > vn-tr:nth-child(2)',
secondSaleId: 'vn-ticket-sale:nth-child(2) vn-td-editable:nth-child(4) text > span',
secondSaleIdCell: 'vn-ticket-sale vn-tr:nth-child(2) > vn-td-editable:nth-child(4)',
secondSaleIdInput: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(4) > vn-autocomplete',
secondSaleIdAutocomplete: 'vn-ticket-sale vn-table vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(4) > vn-autocomplete',
secondSaleQuantity: 'vn-ticket-sale vn-table vn-tr:nth-child(2) vn-input-number',
secondSaleQuantityCell: 'vn-ticket-sale > div > vn-card > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td-editable:nth-child(5)',
@ -505,19 +466,12 @@ export default {
moveToTicketInput: 'form vn-input-number[ng-model="$ctrl.transfer.ticketId"] input',
moveToTicketButton: '.vn-popover.shown vn-icon[icon="arrow_forward_ios"]',
moveToNewTicketButton: '.vn-popover.shown vn-button[label="New ticket"]',
acceptDeleteLineButton: '.vn-confirm.shown button[response=accept]',
acceptDeleteTicketButton: '.vn-confirm.shown button[response=accept]',
stateMenuButton: 'vn-ticket-sale vn-tool-bar > vn-button-menu[label="State"]',
stateMenuFixOption: ''
stateMenuButton: 'vn-ticket-sale vn-tool-bar > vn-button-menu[label="State"]'
},
ticketTracking: {
trackingButton: 'vn-left-menu a[ui-sref="ticket.card.tracking.index"]',
createStateButton: 'vn-float-button',
saveButton: 'button[type=submit]',
cancelButton: 'vn-ticket-tracking-edit vn-button[ui-sref="ticket.card.tracking.index"]'
createStateButton: 'vn-float-button'
},
ticketBasicData: {
basicDataButton: 'vn-left-menu a[ui-sref="ticket.card.basicData.stepOne"]',
agency: 'vn-autocomplete[ng-model="$ctrl.agencyModeId"]',
zone: 'vn-autocomplete[ng-model="$ctrl.zoneId"]',
nextStepButton: 'vn-step-control .buttons > section:last-child vn-button',
@ -570,9 +524,7 @@ export default {
saveStateButton: `button[type=submit]`
},
claimsIndex: {
searchClaimInput: 'vn-searchbar',
searchResult: 'vn-claim-index vn-card > vn-table > div > vn-tbody > a',
searchButton: 'vn-searchbar vn-icon[icon="search"]'
searchResult: 'vn-claim-index vn-card > vn-table > div > vn-tbody > a'
},
claimDescriptor: {
moreMenu: 'vn-claim-descriptor vn-icon-button[icon=more_vert]',
@ -594,7 +546,6 @@ export default {
},
claimBasicData: {
claimState: 'vn-claim-basic-data vn-autocomplete[ng-model="$ctrl.claim.claimStateFk"]',
responsabilityInputRange: 'vn-range',
observation: 'vn-textarea[ng-model="$ctrl.claim.observation"]',
hasToPickUpCheckbox: 'vn-claim-basic-data vn-check[ng-model="$ctrl.claim.hasToPickUp"]',
saveButton: `button[type=submit]`
@ -634,29 +585,22 @@ export default {
isPaidWithManaCheckbox: 'vn-claim-action vn-check[ng-model="$ctrl.claim.isChargedToMana"]'
},
ordersIndex: {
searchResult: 'vn-order-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
secondSearchResultTotal: 'vn-order-index vn-card > vn-table > div > vn-tbody vn-tr:nth-child(2) vn-td:nth-child(9)',
searchResultDate: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(4)',
searchResultAddress: 'vn-order-index vn-table vn-tbody > a:nth-child(1) > vn-td:nth-child(6)',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
advancedSearchButton: 'vn-order-search-panel vn-submit[label="Search"]',
openAdvancedSearch: 'vn-searchbar vn-icon[icon="arrow_drop_down"]',
advancedSearchShowEmptyCheckbox: 'vn-order-search-panel vn-check[label="Show empty"]',
createOrderButton: 'vn-float-button',
},
orderDescriptor: {
returnToModuleIndexButton: 'vn-order-descriptor a[ui-sref="order.index"]',
acceptNavigationButton: '.vn-confirm.shown button[response=accept]'
returnToModuleIndexButton: 'vn-order-descriptor a[ui-sref="order.index"]'
},
createOrderView: {
client: 'vn-autocomplete[label="Client"]',
agency: 'vn-autocomplete[label="Agency"]',
landedDatePicker: 'vn-date-picker[label="Landed"]',
createButton: 'button[type=submit]',
cancelButton: 'vn-button[href="#!/client/index"]'
createButton: 'button[type=submit]'
},
orderSummary: {
header: 'vn-order-summary h5',
id: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(1) span',
alias: 'vn-order-summary vn-one:nth-child(1) > vn-label-value:nth-child(2) span',
consignee: 'vn-order-summary vn-one:nth-child(2) > vn-label-value:nth-child(3) span',
@ -668,7 +612,6 @@ export default {
orderCatalog: {
plantRealmButton: 'vn-order-catalog > vn-side-menu vn-icon[icon="icon-plant"]',
type: 'vn-order-catalog vn-autocomplete[data="$ctrl.itemTypes"]',
itemId: 'vn-order-catalog > vn-side-menu vn-textfield[vn-id="itemId"]',
itemTagValue: 'vn-order-catalog vn-textfield[vn-id="search"]',
openTagSearch: 'vn-order-catalog vn-vertical:nth-child(4) append > vn-icon > i',
tag: 'vn-order-catalog-search-panel vn-autocomplete[ng-model="filter.tagFk"]',
@ -713,7 +656,6 @@ export default {
},
routeSummary: {
header: 'vn-route-summary > vn-card > h5',
routeId: 'vn-route-summary > vn-card > vn-horizontal > vn-one:nth-child(1) > vn-label-value:nth-child(1) > section > span',
cost: 'vn-route-summary vn-label-value[label="Cost"]',
firstTicketID: 'vn-route-summary vn-tbody > vn-tr:nth-child(1) > vn-td:nth-child(2) > span',
firstTicketDescriptor: '.vn-popover.shown vn-ticket-descriptor',
@ -732,10 +674,6 @@ export default {
},
routeTickets: {
firstTicketPriority: 'vn-route-tickets vn-tr:nth-child(1) vn-textfield[ng-model="ticket.priority"]',
secondTicketPriority: 'vn-route-tickets vn-tr:nth-child(2) vn-textfield[ng-model="ticket.priority"]',
thirdTicketPriority: 'vn-route-tickets vn-tr:nth-child(3) vn-textfield[ng-model="ticket.priority"]',
fourthTicketPriority: 'vn-route-tickets vn-tr:nth-child(4) vn-textfield[ng-model="ticket.priority"]',
eleventhTicketPriority: 'vn-route-tickets vn-tr:nth-child(11) vn-textfield[ng-model="ticket.priority"]',
firstTicketCheckbox: 'vn-route-tickets vn-tr:nth-child(1) vn-check',
buscamanButton: 'vn-route-tickets vn-button[icon="icon-buscaman"]',
firstTicketDeleteButton: 'vn-route-tickets vn-tr:nth-child(1) vn-icon[icon="delete"]',
@ -810,8 +748,7 @@ export default {
weekWorkedHours: 'vn-worker-time-control vn-side-menu vn-label-value > section > span',
nextMonthButton: 'vn-worker-time-control vn-side-menu vn-calendar vn-button[icon=keyboard_arrow_right]',
secondWeekDay: 'vn-worker-time-control vn-side-menu vn-calendar .day:nth-child(8) > .day-number',
navigateBackToIndex: 'vn-worker-descriptor [name="goToModuleIndex"]',
acceptDeleteDialog: '.vn-confirm.shown button[response="accept"]'
navigateBackToIndex: 'vn-worker-descriptor [name="goToModuleIndex"]'
},
workerCalendar: {
year: 'vn-worker-calendar vn-autocomplete[ng-model="$ctrl.year"]',
@ -831,7 +768,6 @@ export default {
},
invoiceOutIndex: {
topbarSearch: 'vn-searchbar',
searchButton: 'vn-searchbar vn-icon[icon="search"]',
searchResult: 'vn-invoice-out-index vn-card > vn-table > div > vn-tbody > a.vn-tr',
},
invoiceOutDescriptor: {
@ -853,7 +789,6 @@ export default {
travelBasicDada: {
reference: 'vn-travel-basic-data vn-textfield[ng-model="$ctrl.travel.ref"]',
agency: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.agencyModeFk"]',
shippingDate: 'vn-travel-basic-data vn-date-picker[ng-model="$ctrl.travel.shipped"]',
deliveryDate: 'vn-travel-basic-data vn-date-picker[ng-model="$ctrl.travel.landed"]',
outputWarehouse: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.warehouseOutFk"]',
inputWarehouse: 'vn-travel-basic-data vn-autocomplete[ng-model="$ctrl.travel.warehouseInFk"]',
@ -873,7 +808,6 @@ export default {
newThermographWarehouse: 'vn-autocomplete[ng-model="$ctrl.newThermograph.warehouseId"]',
newThermographTemperature: 'vn-autocomplete[ng-model="$ctrl.newThermograph.temperature"]',
createThermographButton: 'form button[response="accept"]',
thermographID: 'vn-travel-thermograph-create vn-autocomplete[ng-model="$ctrl.dms.thermographId"]',
uploadIcon: 'vn-travel-thermograph-create vn-icon[icon="icon-attach"]',
createdThermograph: 'vn-travel-thermograph-index vn-tbody > vn-tr',
upload: 'vn-travel-thermograph-create button[type=submit]'

View File

@ -17,7 +17,7 @@ describe('Client create path', () => {
it(`should search for the user Carol Danvers to confirm it isn't created yet`, async() => {
await page.doSearch('Carol Danvers');
const result = await page.countElement(selectors.clientsIndex.searchResult);
const result = await page.countElement(selectors.globalItems.searchResult);
expect(result).toEqual(0);
});

View File

@ -77,7 +77,7 @@ describe('Client Edit fiscalData path', () => {
await page.waitToClick(selectors.clientFiscalData.equalizationTaxCheckbox);
await page.waitToClick(selectors.clientFiscalData.verifiedDataCheckbox);
await page.waitToClick(selectors.clientFiscalData.saveButton);
await page.waitToClick(selectors.clientFiscalData.acceptDuplicationButton);
await page.waitToClick(selectors.globalItems.acceptButton);
const message = await page.waitForSnackbar();
expect(message.text).toBe('Invalid Tax number');
@ -87,14 +87,14 @@ describe('Client Edit fiscalData path', () => {
await page.clearInput(selectors.clientFiscalData.fiscalId);
await page.write(selectors.clientFiscalData.fiscalId, '94980061C');
await page.waitToClick(selectors.clientFiscalData.saveButton);
await page.waitToClick(selectors.clientFiscalData.acceptDuplicationButton);
await page.waitToClick(selectors.globalItems.acceptButton);
const message = await page.waitForSnackbar();
expect(message.type).toBe('success');
});
it('should propagate the Equalization tax', async() => {
await page.waitToClick(selectors.clientFiscalData.acceptPropagationButton);
await page.waitToClick(selectors.globalItems.acceptButton);
const message = await page.waitForSnackbar();
expect(message.text).toBe('Equivalent tax spreaded');
@ -157,7 +157,7 @@ describe('Client Edit fiscalData path', () => {
it('should propagate the Equalization tax changes', async() => {
await page.waitFor(1000);
await page.waitToClick(selectors.clientFiscalData.acceptPropagationButton);
await page.waitToClick(selectors.globalItems.acceptButton);
const message = await page.waitForSnackbar();
expect(message.text).toBe('Equivalent tax spreaded');

View File

@ -59,7 +59,7 @@ describe('Client lock verified data path', () => {
it('should check the Verified data checkbox', async() => {
await page.waitToClick(selectors.clientFiscalData.verifiedDataCheckbox);
await page.waitToClick(selectors.clientFiscalData.saveButton);
await page.waitToClick(selectors.clientFiscalData.acceptDuplicationButton);
await page.waitToClick(selectors.globalItems.acceptButton);
const message = await page.waitForSnackbar();
expect(message.type).toBe('success');

View File

@ -124,7 +124,6 @@ describe('Item regularize path', () => {
page.waitForNavigation({waitUntil: ['load', 'networkidle0', 'domcontentloaded']}),
page.waitToClick(selectors.globalItems.ticketsButton)
]);
await page.waitForTransitionEnd('vn-searchbar');
await page.waitForState('ticket.index');
});

View File

@ -8,7 +8,7 @@ describe('Item index path', () => {
browser = await getBrowser();
page = browser.page;
await page.loginAndModule('salesPerson', 'item');
await page.waitToClick(selectors.itemsIndex.searchIcon);
await page.waitToClick(selectors.globalItems.searchButton);
});
afterAll(async() => {
@ -42,7 +42,7 @@ describe('Item index path', () => {
it('should navigate forth and back to see the images column is still visible', async() => {
await page.waitToClick(selectors.itemsIndex.firstSearchResult);
await page.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton);
await page.waitToClick(selectors.itemsIndex.searchIcon);
await page.waitToClick(selectors.globalItems.searchButton);
await page.wait(selectors.itemsIndex.searchResult);
await page.waitImgLoad(selectors.itemsIndex.firstItemImage);
const imageVisible = await page.isVisible(selectors.itemsIndex.firstItemImageTd);
@ -76,7 +76,7 @@ describe('Item index path', () => {
it('should now navigate forth and back to see the ids column is now visible', async() => {
await page.waitToClick(selectors.itemsIndex.firstSearchResult);
await page.waitToClick(selectors.itemDescriptor.goBackToModuleIndexButton);
await page.waitToClick(selectors.itemsIndex.searchIcon);
await page.waitToClick(selectors.globalItems.searchButton);
await page.wait(selectors.itemsIndex.searchResult);
const idVisible = await page.isVisible(selectors.itemsIndex.firstItemId);

View File

@ -101,7 +101,7 @@ describe('Ticket List sale path', () => {
await page.waitToClick(selectors.ticketSales.secondSaleCheckbox);
await page.waitToClick(selectors.ticketSales.thirdSaleCheckbox);
await page.waitToClick(selectors.ticketSales.deleteSaleButton);
await page.waitToClick(selectors.ticketSales.acceptDeleteLineButton);
await page.waitToClick(selectors.globalItems.acceptButton);
const message = await page.waitForSnackbar();
expect(message.type).toBe('success');

View File

@ -219,7 +219,7 @@ describe('Ticket Edit sale path', () => {
await page.wait(2000);
await page.waitToClick(selectors.ticketSales.deleteSaleButton);
await page.wait(2000);
await page.waitToClick(selectors.ticketSales.acceptDeleteLineButton);
await page.waitToClick(selectors.globalItems.acceptButton);
await page.wait(2000);
await page.waitForSpinnerLoad();
const message = await page.waitForSnackbar();

View File

@ -19,7 +19,7 @@ describe('Ticket expeditions and log path', () => {
it(`should delete a former expedition and confirm the remaining expedition are the expected ones`, async() => {
await page.waitToClick(selectors.ticketExpedition.secondExpeditionRemoveButton);
await page.waitToClick(selectors.ticketExpedition.acceptDeleteRowButton);
await page.waitToClick(selectors.globalItems.acceptButton);
await page.reloadSection('ticket.card.expedition');
await page.waitForSelector(selectors.ticketExpedition.expeditionRow, {});

View File

@ -53,7 +53,7 @@ describe('Ticket descriptor path', () => {
it(`should search for the deleted ticket and check it's date`, async() => {
await page.write(selectors.ticketsIndex.topbarSearch, '18');
await page.waitToClick(selectors.ticketsIndex.searchButton);
await page.waitToClick(selectors.globalItems.searchButton);
await page.waitForState('ticket.card.summary');
const result = await page.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText');

View File

@ -20,7 +20,7 @@ describe('Ticket index payout path', () => {
});
it('should check the second ticket from a client and 1 of another', async() => {
await page.keyboard.press('Enter');
await page.waitToClick(selectors.globalItems.searchButton);
await page.waitToClick(selectors.ticketsIndex.secondTicketCheckbox);
await page.waitToClick(selectors.ticketsIndex.sixthTicketCheckbox);
await page.waitToClick(selectors.ticketsIndex.payoutButton);

View File

@ -34,7 +34,7 @@ describe('Order edit basic data path', () => {
const orderId = '16';
await page.waitToClick(selectors.orderDescriptor.returnToModuleIndexButton);
await page.waitToClick(selectors.orderDescriptor.acceptNavigationButton);
await page.waitToClick(selectors.globalItems.acceptButton);
await page.waitForContentLoaded();
await page.accessToSearchResult(orderId);
await page.accessToSection('order.card.basicData');

View File

@ -16,7 +16,7 @@ describe('Order Index', () => {
});
it(`should check the second search result doesn't contain a total of 0€`, async() => {
await page.waitToClick(selectors.ordersIndex.searchButton);
await page.waitToClick(selectors.globalItems.searchButton);
const result = await page.waitToGetProperty(selectors.ordersIndex.secondSearchResultTotal, 'innerText');
expect(result).not.toContain('0.00');

View File

@ -18,7 +18,7 @@ describe('Entry lastest buys path', () => {
it('should access the latest buys seccion and search not seeing the edit buys button yet', async() => {
await page.waitToClick(selectors.entryLatestBuys.latestBuysSectionButton);
await page.waitFor(250);
await page.keyboard.press('Enter');
await page.waitToClick(selectors.globalItems.searchButton);
await page.waitForSelector(selectors.entryLatestBuys.editBuysButton, {visible: false});
});

View File

@ -35,8 +35,9 @@ module.exports = Self => {
WHERE t.shipped >= CURDATE() AND t.clientFk = ? AND ts.alertLevel = 0
AND t.id <> ? AND t.warehouseFk = ?
ORDER BY t.shipped
LIMIT 3`;
LIMIT 10`;
return Self.rawSql(query, [id, ticketId, ticket.warehouseFk]);
};
};

View File

@ -20,34 +20,33 @@ module.exports = Self => {
});
Self.getComponentsSum = async id => {
const models = Self.app.models;
let salesComponents = [];
let componentsSum = [];
let sales = await models.Sale.find({where: {ticketFk: id}});
let components = await models.Component.find();
if (sales.length > 0) {
for (let sale of sales) {
let myComponents = await models.SaleComponent.find({where: {saleFk: sale.id}});
salesComponents = salesComponents.concat(myComponents);
}
salesComponents.reduce((acumulator, currentValue) => {
if (!acumulator[currentValue.componentFk]) {
let defaultValue = 0;
let tarjetComponent = components.find(component => component.id === currentValue.componentFk);
acumulator[currentValue.componentFk] = {
componentFk: currentValue.componentFk,
value: defaultValue,
name: tarjetComponent.name
};
componentsSum.push(acumulator[currentValue.componentFk]);
let sales = await models.Sale.find({
include: {
relation: 'components',
scope: {fields: ['value', 'componentFk'],
include: {
relation: 'component',
}
}
acumulator[currentValue.componentFk].value += currentValue.value;
return acumulator;
});
},
where: {ticketFk: id}
});
for (let sale of sales) {
for (let component of sale.components()) {
let componentId = componentsSum[component.componentFk];
if (!componentId) {
componentsSum[component.componentFk] = {
componentFk: component.componentFk,
value: 0,
name: component.component().name
};
}
componentsSum[component.componentFk].value += component.value * sale.quantity;
}
}
return componentsSum;
return componentsSum.filter(component => {
return component != null;
});
};
};

View File

@ -323,32 +323,31 @@
icon="info">
</vn-icon>
</vn-horizontal>
<table class="vn-table">
<thead>
<tr>
<th number>Id</th>
<th number translate>Shipped</th>
<th number translate>Agency</th>
<th number translate>Warehouse</th>
<th number translate>Address</th>
</tr>
</thead>
<tbody>
<tr ng-if="$ctrl.transfer.lastActiveTickets.length === 0" >
<td colspan="4" style="text-align: center" translate>No results</td>
</tr>
<tr
<vn-table class="destinationTable">
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
<vn-th number>Shipped</vn-th>
<vn-th number>Agency</vn-th>
<vn-th number>Warehouse</vn-th>
<vn-th number>Address</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-data-viewer data="$ctrl.transfer.lastActiveTickets">
</vn-data-viewer>
<vn-tr
class="clickable"
ng-repeat="ticket in $ctrl.transfer.lastActiveTickets track by ticket.id"
ng-click="$ctrl.transferSales(ticket.id)">
<td number>{{::ticket.id}}</td>
<td number>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</td>
<td number>{{::ticket.agencyName}}</td>
<td number>{{::ticket.warehouseName}}</td>
<td number>{{::ticket.address}}</td>
</tr>
</tbody>
</table>
<vn-td number>{{::ticket.id}}</vn-td>
<vn-td number>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</vn-td>
<vn-td number>{{::ticket.agencyName}}</vn-td>
<vn-td number>{{::ticket.warehouseName}}</vn-td>
<vn-td number>{{::ticket.address}}</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
<form name="form">
<vn-horizontal class="vn-py-md">
<vn-input-number vn-one

View File

@ -80,8 +80,8 @@ vn-ticket-sale {
max-height: 400px;
width: 480px;
}
table {
width: 400px
.destinationTable {
width: 700px
}
}
.vn-popover .edit-popover {