Merge branch 'test' into dev
gitea/salix/dev This commit looks good
Details
gitea/salix/dev This commit looks good
Details
This commit is contained in:
commit
a3dab9013c
|
@ -269,7 +269,7 @@ export default {
|
||||||
sale: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr',
|
sale: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr',
|
||||||
firstSaleItemId: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > span',
|
firstSaleItemId: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(2) > span',
|
||||||
popoverDiaryButton: 'vn-ticket-summary vn-item-descriptor-popover vn-item-descriptor vn-icon[icon="icon-transaction"]',
|
popoverDiaryButton: 'vn-ticket-summary vn-item-descriptor-popover 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(4)',
|
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)'
|
firstSaleDiscount: 'vn-ticket-summary [name="sales"] vn-table > div > vn-tbody > vn-tr > vn-td:nth-child(6)'
|
||||||
},
|
},
|
||||||
ticketsIndex: {
|
ticketsIndex: {
|
||||||
|
@ -337,18 +337,18 @@ export default {
|
||||||
firstSaleQuantity: `vn-textfield[model="sale.quantity"]:nth-child(1) input`,
|
firstSaleQuantity: `vn-textfield[model="sale.quantity"]:nth-child(1) input`,
|
||||||
firstSaleQuantityClearInput: `vn-textfield[model="sale.quantity"] div.suffix > i`,
|
firstSaleQuantityClearInput: `vn-textfield[model="sale.quantity"] div.suffix > i`,
|
||||||
firstSaleID: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(4) > span',
|
firstSaleID: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(4) > span',
|
||||||
firstSalePrice: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(7)',
|
firstSalePrice: 'vn-ticket-sale:nth-child(1) vn-tr:nth-child(1) > vn-td:nth-child(7) > span',
|
||||||
firstSalePriceInput: 'vn-ticket-sale:nth-child(1) > vn-vertical > vn-popover.edit.dialog-summary.ng-isolate-scope.vn-popover.shown > div > div.content > div > vn-textfield',
|
firstSalePriceInput: 'vn-ticket-sale:nth-child(1) > vn-vertical > vn-popover.edit.dialog-summary.ng-isolate-scope.vn-popover.shown > div > div.content > div > vn-textfield',
|
||||||
firstSaleDiscount: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(8)',
|
firstSaleDiscount: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(8) > span',
|
||||||
firstSaleDiscountInput: 'vn-ticket-sale:nth-child(1) vn-ticket-sale-edit-discount > div > vn-textfield > div > div > div.infix > input.ng-not-empty',
|
firstSaleDiscountInput: 'vn-ticket-sale:nth-child(1) vn-ticket-sale-edit-discount > div > vn-textfield > div > div > div.infix > input.ng-not-empty',
|
||||||
firstSaleImport: 'vn-ticket-sale:nth-child(1) vn-td:nth-child(9)',
|
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)',
|
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-td:nth-child(5) section:nth-child(1)`,
|
firstSaleColour: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(6) section:nth-child(1)`,
|
||||||
firstSaleLength: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(5) section:nth-child(3)`,
|
firstSaleLength: `vn-ticket-sale vn-tr:nth-child(1) vn-td:nth-child(6) section:nth-child(3)`,
|
||||||
firstSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"] md-checkbox`,
|
firstSaleCheckbox: `vn-ticket-sale vn-tr:nth-child(1) vn-check[field="sale.checked"] md-checkbox`,
|
||||||
secondSaleClaimIcon: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(2) > a > vn-icon',
|
secondSaleClaimIcon: 'vn-ticket-sale > vn-vertical > vn-card > div > vn-vertical > vn-table > div > vn-tbody > vn-tr:nth-child(2) > vn-td:nth-child(2) > a > vn-icon',
|
||||||
secondSaleColour: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(5) section:nth-child(5)`,
|
secondSaleColour: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(6) section:nth-child(5)`,
|
||||||
secondSalePrice: `vn-ticket-sale vn-tr:nth-child(2) vn-td:nth-child(7)`,
|
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)`,
|
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)`,
|
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)`,
|
secondSaleText: `vn-table div > vn-tbody > vn-tr:nth-child(2)`,
|
||||||
|
|
|
@ -538,16 +538,16 @@ xdescribe('Ticket Edit sale path', () => {
|
||||||
describe('when state is preparation and loged as Production', () => {
|
describe('when state is preparation and loged as Production', () => {
|
||||||
it(`should not be able to edit the sale price`, async() => {
|
it(`should not be able to edit the sale price`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketSales.firstSalePrice)
|
.wait(selectors.ticketSales.firstSaleID)
|
||||||
.exists(selectors.ticketSales.firstSalePriceInput);
|
.exists(selectors.ticketSales.firstSalePrice);
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
||||||
it(`should not be able to edit the sale discount`, async() => {
|
it(`should not be able to edit the sale discount`, async() => {
|
||||||
const result = await nightmare
|
const result = await nightmare
|
||||||
.waitToClick(selectors.ticketSales.firstSaleDiscount)
|
.waitToClick(selectors.ticketSales.firstSaleID)
|
||||||
.exists(selectors.ticketSales.firstSaleDiscountInput);
|
.exists(selectors.ticketSales.firstSaleDiscount);
|
||||||
|
|
||||||
expect(result).toBeFalsy();
|
expect(result).toBeFalsy();
|
||||||
});
|
});
|
||||||
|
|
|
@ -62,8 +62,8 @@
|
||||||
<vn-th shrink></vn-th>
|
<vn-th shrink></vn-th>
|
||||||
<vn-th shrink></vn-th>
|
<vn-th shrink></vn-th>
|
||||||
<vn-th number>Id</vn-th>
|
<vn-th number>Id</vn-th>
|
||||||
|
<vn-th>Quantity</vn-th>
|
||||||
<vn-th>Item</vn-th>
|
<vn-th>Item</vn-th>
|
||||||
<vn-th number>Quantity</vn-th>
|
|
||||||
<vn-th number>Price</vn-th>
|
<vn-th number>Price</vn-th>
|
||||||
<vn-th number>Disc</vn-th>
|
<vn-th number>Disc</vn-th>
|
||||||
<vn-th number>Amount</vn-th>
|
<vn-th number>Amount</vn-th>
|
||||||
|
@ -107,13 +107,6 @@
|
||||||
{{::sale.itemFk | zeroFill:6}}
|
{{::sale.itemFk | zeroFill:6}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td expand>
|
|
||||||
<vn-fetched-tags
|
|
||||||
max-length="6"
|
|
||||||
item="::sale.tags"
|
|
||||||
title="::sale.concept">
|
|
||||||
</vn-fetched-tags>
|
|
||||||
</vn-td>
|
|
||||||
<vn-td ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</vn-td>
|
<vn-td ng-if="!$ctrl.isEditable" number>{{sale.quantity}}</vn-td>
|
||||||
<vn-td ng-if="$ctrl.isEditable" number>
|
<vn-td ng-if="$ctrl.isEditable" number>
|
||||||
<vn-textfield
|
<vn-textfield
|
||||||
|
@ -122,22 +115,29 @@
|
||||||
type="text">
|
type="text">
|
||||||
</vn-textfield>
|
</vn-textfield>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number
|
<vn-td expand>
|
||||||
ng-if="$ctrl.isEditable"
|
<vn-fetched-tags
|
||||||
class="link"
|
max-length="6"
|
||||||
ng-click="$ctrl.showEditPricePopover($event, sale)"
|
item="::sale.tags"
|
||||||
vn-tooltip="Edit price">
|
title="::sale.concept">
|
||||||
|
</vn-fetched-tags>
|
||||||
|
</vn-td>
|
||||||
|
<vn-td number ng-if="$ctrl.isEditable">
|
||||||
|
<span class="link"
|
||||||
|
vn-tooltip="Edit price"
|
||||||
|
ng-click="$ctrl.showEditPricePopover($event, sale)">
|
||||||
{{sale.price | currency: 'EUR':2}}
|
{{sale.price | currency: 'EUR':2}}
|
||||||
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number ng-if="!$ctrl.isEditable">
|
<vn-td number ng-if="!$ctrl.isEditable">
|
||||||
{{sale.price | currency: 'EUR':2}}
|
{{sale.price | currency: 'EUR':2}}
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number
|
<vn-td number ng-if="$ctrl.isEditable">
|
||||||
ng-if="$ctrl.isEditable"
|
<span class="link"
|
||||||
class="link"
|
vn-tooltip="Edit discount"
|
||||||
ng-click="$ctrl.showEditPopover($event, sale)"
|
ng-click="$ctrl.showEditPopover($event, sale)">
|
||||||
vn-tooltip="Edit discount">
|
|
||||||
{{sale.discount}} %
|
{{sale.discount}} %
|
||||||
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td number
|
<vn-td number
|
||||||
ng-if="!$ctrl.isEditable">
|
ng-if="!$ctrl.isEditable">
|
||||||
|
@ -158,7 +158,7 @@
|
||||||
<!-- Edit Price Popover -->
|
<!-- Edit Price Popover -->
|
||||||
<vn-popover
|
<vn-popover
|
||||||
class="edit dialog-summary"
|
class="edit dialog-summary"
|
||||||
vn-id="editPricePopover"
|
vn-id="edit-price-popover"
|
||||||
on-open="$ctrl.getManaSalespersonMana()">
|
on-open="$ctrl.getManaSalespersonMana()">
|
||||||
<vn-horizontal pad-medium class="header">
|
<vn-horizontal pad-medium class="header">
|
||||||
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
|
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
|
||||||
|
@ -185,7 +185,7 @@
|
||||||
<!-- Edit Popover -->
|
<!-- Edit Popover -->
|
||||||
<vn-popover
|
<vn-popover
|
||||||
class="edit dialog-summary"
|
class="edit dialog-summary"
|
||||||
vn-id="editPopover"
|
vn-id="edit-popover"
|
||||||
on-open="$ctrl.getManaSalespersonMana()">
|
on-open="$ctrl.getManaSalespersonMana()">
|
||||||
<vn-ticket-sale-edit-discount
|
<vn-ticket-sale-edit-discount
|
||||||
mana="$ctrl.mana"
|
mana="$ctrl.mana"
|
||||||
|
|
|
@ -57,8 +57,8 @@
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th shrink></vn-th>
|
<vn-th shrink></vn-th>
|
||||||
<vn-th number>Item</vn-th>
|
<vn-th number>Item</vn-th>
|
||||||
<vn-th>Description</vn-th>
|
|
||||||
<vn-th number>Quantity</vn-th>
|
<vn-th number>Quantity</vn-th>
|
||||||
|
<vn-th>Description</vn-th>
|
||||||
<vn-th number>Price</vn-th>
|
<vn-th number>Price</vn-th>
|
||||||
<vn-th number>Discount</vn-th>
|
<vn-th number>Discount</vn-th>
|
||||||
<vn-th number>Amount</vn-th>
|
<vn-th number>Amount</vn-th>
|
||||||
|
@ -89,8 +89,8 @@
|
||||||
{{sale.itemFk | zeroFill:6}}
|
{{sale.itemFk | zeroFill:6}}
|
||||||
</span>
|
</span>
|
||||||
</vn-td>
|
</vn-td>
|
||||||
<vn-td expand><vn-fetched-tags max-length="6" item="sale.item" title="sale.concept"/></vn-td>
|
|
||||||
<vn-td number>{{::sale.quantity}}</vn-td>
|
<vn-td number>{{::sale.quantity}}</vn-td>
|
||||||
|
<vn-td expand><vn-fetched-tags max-length="6" item="sale.item" title="sale.concept"/></vn-td>
|
||||||
<vn-td number>{{::sale.price | currency: 'EUR':2}}</vn-td>
|
<vn-td number>{{::sale.price | currency: 'EUR':2}}</vn-td>
|
||||||
<vn-td number>{{::sale.discount}} %</vn-td>
|
<vn-td number>{{::sale.discount}} %</vn-td>
|
||||||
<vn-td number>{{::sale.quantity * sale.price | currency: 'EUR':2}}</vn-td>
|
<vn-td number>{{::sale.quantity * sale.price | currency: 'EUR':2}}</vn-td>
|
||||||
|
@ -123,8 +123,8 @@
|
||||||
<vn-thead>
|
<vn-thead>
|
||||||
<vn-tr>
|
<vn-tr>
|
||||||
<vn-th number>Id</vn-th>
|
<vn-th number>Id</vn-th>
|
||||||
<vn-th>Description</vn-th>
|
|
||||||
<vn-th number>Quantity</vn-th>
|
<vn-th number>Quantity</vn-th>
|
||||||
|
<vn-th>Description</vn-th>
|
||||||
<vn-th number>Price</vn-th>
|
<vn-th number>Price</vn-th>
|
||||||
<vn-th>Tax class</vn-th>
|
<vn-th>Tax class</vn-th>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
|
@ -132,8 +132,8 @@
|
||||||
<vn-tbody>
|
<vn-tbody>
|
||||||
<vn-tr ng-repeat="service in $ctrl.summary.services">
|
<vn-tr ng-repeat="service in $ctrl.summary.services">
|
||||||
<vn-td number>{{::service.id}}</vn-td>
|
<vn-td number>{{::service.id}}</vn-td>
|
||||||
<vn-td expand>{{::service.description}}</vn-td>
|
|
||||||
<vn-td number>{{::service.quantity}}</vn-td>
|
<vn-td number>{{::service.quantity}}</vn-td>
|
||||||
|
<vn-td expand>{{::service.description}}</vn-td>
|
||||||
<vn-td number>{{::service.price}}</vn-td>
|
<vn-td number>{{::service.price}}</vn-td>
|
||||||
<vn-td>{{::service.taxClass.description}}</vn-td>
|
<vn-td>{{::service.taxClass.description}}</vn-td>
|
||||||
</vn-tr>
|
</vn-tr>
|
||||||
|
|
Loading…
Reference in New Issue