feat(descriptor): button open summary popup
gitea/salix/pipeline/head This commit looks good
Details
gitea/salix/pipeline/head This commit looks good
Details
This commit is contained in:
parent
c7b8b61a08
commit
786b7fa84f
|
@ -181,12 +181,12 @@ let actions = {
|
||||||
},
|
},
|
||||||
|
|
||||||
reloadSection: async function(state) {
|
reloadSection: async function(state) {
|
||||||
await this.click('vn-icon[icon="preview"]');
|
await this.click('vn-icon[icon="launch"]');
|
||||||
await this.accessToSection(state);
|
await this.accessToSection(state);
|
||||||
},
|
},
|
||||||
|
|
||||||
forceReloadSection: async function(sectionRoute) {
|
forceReloadSection: async function(sectionRoute) {
|
||||||
await this.waitToClick('vn-icon[icon="preview"]');
|
await this.waitToClick('vn-icon[icon="launch"]');
|
||||||
await this.waitToClick('button[response="accept"]');
|
await this.waitToClick('button[response="accept"]');
|
||||||
await this.waitForSelector('vn-card.summary');
|
await this.waitForSelector('vn-card.summary');
|
||||||
await this.waitToClick(`vn-left-menu li > a[ui-sref="${sectionRoute}"]`);
|
await this.waitToClick(`vn-left-menu li > a[ui-sref="${sectionRoute}"]`);
|
||||||
|
|
|
@ -957,7 +957,7 @@ export default {
|
||||||
supplierRef: 'vn-invoice-in-summary vn-label-value:nth-child(2) > section > span'
|
supplierRef: 'vn-invoice-in-summary vn-label-value:nth-child(2) > section > span'
|
||||||
},
|
},
|
||||||
invoiceInDescriptor: {
|
invoiceInDescriptor: {
|
||||||
summaryIcon: 'vn-invoice-in-descriptor a[title="Preview"]',
|
summaryIcon: 'vn-invoice-in-descriptor a[title="Go to module summary"]',
|
||||||
moreMenu: 'vn-invoice-in-descriptor vn-icon-button[icon=more_vert]',
|
moreMenu: 'vn-invoice-in-descriptor vn-icon-button[icon=more_vert]',
|
||||||
moreMenuDeleteInvoiceIn: '.vn-menu [name="deleteInvoice"]',
|
moreMenuDeleteInvoiceIn: '.vn-menu [name="deleteInvoice"]',
|
||||||
moreMenuCloneInvoiceIn: '.vn-menu [name="cloneInvoice"]',
|
moreMenuCloneInvoiceIn: '.vn-menu [name="cloneInvoice"]',
|
||||||
|
|
|
@ -134,7 +134,7 @@ describe('Travel descriptor path', () => {
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should navigate to the summary and then clone the travel and its entries using the descriptor menu to get redirected to the cloned travel basic data', async() => {
|
it('should navigate to the summary and then clone the travel and its entries using the descriptor menu to get redirected to the cloned travel basic data', async() => {
|
||||||
await page.waitToClick('vn-icon[icon="preview"]'); // summary icon
|
await page.waitToClick('vn-icon[icon="launch"]');
|
||||||
await page.waitForState('travel.card.summary');
|
await page.waitForState('travel.card.summary');
|
||||||
await page.waitForTimeout(1000);
|
await page.waitForTimeout(1000);
|
||||||
await page.waitToClick(selectors.travelDescriptor.dotMenu);
|
await page.waitToClick(selectors.travelDescriptor.dotMenu);
|
||||||
|
|
|
@ -4,8 +4,14 @@
|
||||||
vn-descriptor-content > .descriptor {
|
vn-descriptor-content > .descriptor {
|
||||||
width: 256px;
|
width: 256px;
|
||||||
|
|
||||||
& > .header > a:first-child {
|
& > .header {
|
||||||
visibility: hidden;
|
a:first-child {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
vn-icon-button:nth-child(2) {
|
||||||
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,10 +12,15 @@
|
||||||
name="goToModuleIndex">
|
name="goToModuleIndex">
|
||||||
<vn-icon icon="{{$ctrl.moduleMap[$ctrl.module].icon}}"></vn-icon>
|
<vn-icon icon="{{$ctrl.moduleMap[$ctrl.module].icon}}"></vn-icon>
|
||||||
</a>
|
</a>
|
||||||
|
<vn-icon-button
|
||||||
|
translate-attr="{title: 'Show summary'}"
|
||||||
|
icon="preview"
|
||||||
|
vn-click-stop="$ctrl.summary.show()">
|
||||||
|
</vn-icon-button>
|
||||||
<a
|
<a
|
||||||
translate-attr="{title: 'Preview'}"
|
translate-attr="{title: 'Go to module summary'}"
|
||||||
ui-sref="{{::$ctrl.summaryState}}({id: $ctrl.descriptor.id})">
|
ui-sref="{{::$ctrl.summaryState}}({id: $ctrl.descriptor.id})">
|
||||||
<vn-icon icon="preview"></vn-icon>
|
<vn-icon icon="launch"></vn-icon>
|
||||||
</a>
|
</a>
|
||||||
<vn-icon-button ng-if="!$ctrl.$transclude.isSlotFilled('dotMenu')"
|
<vn-icon-button ng-if="!$ctrl.$transclude.isSlotFilled('dotMenu')"
|
||||||
ng-class="::{invisible: !$ctrl.$transclude.isSlotFilled('menu')}"
|
ng-class="::{invisible: !$ctrl.$transclude.isSlotFilled('menu')}"
|
||||||
|
|
|
@ -125,7 +125,8 @@ ngModule.vnComponent('vnDescriptorContent', {
|
||||||
module: '@',
|
module: '@',
|
||||||
baseState: '@?',
|
baseState: '@?',
|
||||||
description: '<',
|
description: '<',
|
||||||
descriptor: '<?'
|
descriptor: '<?',
|
||||||
|
summary: '<?'
|
||||||
},
|
},
|
||||||
transclude: {
|
transclude: {
|
||||||
body: 'slotBody',
|
body: 'slotBody',
|
||||||
|
|
|
@ -60,6 +60,9 @@ vn-descriptor-content {
|
||||||
font-size: 1.75rem;
|
font-size: 1.75rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
& > vn-icon-button:nth-child(2) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
& > .body {
|
& > .body {
|
||||||
display: block;
|
display: block;
|
||||||
|
|
|
@ -13,6 +13,8 @@ Preview: Vista previa
|
||||||
Profile: Perfil
|
Profile: Perfil
|
||||||
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones
|
Push on applications menu: Para abrir un módulo pulsa en el menú de aplicaciones
|
||||||
Go to module index: Ir al índice del módulo
|
Go to module index: Ir al índice del módulo
|
||||||
|
Go to module summary: Ir a la vista previa del módulo
|
||||||
|
Show summary: Mostrar vista previa
|
||||||
What is new: Novedades de la versión
|
What is new: Novedades de la versión
|
||||||
Settings: Ajustes
|
Settings: Ajustes
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="account"
|
module="account"
|
||||||
description="$ctrl.user.nickname">
|
description="$ctrl.user.nickname"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="deleteUser.show()"
|
ng-click="deleteUser.show()"
|
||||||
|
@ -173,3 +174,6 @@
|
||||||
<button response="accept" translate>Change password</button>
|
<button response="accept" translate>Change password</button>
|
||||||
</tpl-buttons>
|
</tpl-buttons>
|
||||||
</vn-dialog>
|
</vn-dialog>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-user-summary user="$ctrl.user"></vn-user-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="claim"
|
module="claim"
|
||||||
description="$ctrl.claim.client.name">
|
description="$ctrl.claim.client.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="$ctrl.showPickupOrder()"
|
ng-click="$ctrl.showPickupOrder()"
|
||||||
|
@ -97,3 +98,6 @@
|
||||||
<vn-ticket-descriptor-popover
|
<vn-ticket-descriptor-popover
|
||||||
vn-id="ticketDescriptor">
|
vn-id="ticketDescriptor">
|
||||||
</vn-ticket-descriptor-popover>
|
</vn-ticket-descriptor-popover>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-claim-summary claim="$ctrl.claim"></vn-claim-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="client"
|
module="client"
|
||||||
description="$ctrl.client.name">
|
description="$ctrl.client.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<a class="vn-item"
|
<a class="vn-item"
|
||||||
ui-sref="ticket.create({clientFk: $ctrl.client.id})"
|
ui-sref="ticket.create({clientFk: $ctrl.client.id})"
|
||||||
|
@ -119,3 +120,6 @@
|
||||||
<vn-worker-descriptor-popover
|
<vn-worker-descriptor-popover
|
||||||
vn-id="workerDescriptor">
|
vn-id="workerDescriptor">
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-client-summary client="$ctrl.client"></vn-client-summary>
|
||||||
|
</vn-popup>
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="entry"
|
module="entry"
|
||||||
description="$ctrl.entry.supplier.nickname">
|
description="$ctrl.entry.supplier.nickname"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="$ctrl.showEntryReport()"
|
ng-click="$ctrl.showEntryReport()"
|
||||||
|
@ -59,3 +60,6 @@
|
||||||
</div>
|
</div>
|
||||||
</slot-body>
|
</slot-body>
|
||||||
</vn-descriptor-content>
|
</vn-descriptor-content>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-entry-summary entry="$ctrl.entry"></vn-entry-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,4 +1,7 @@
|
||||||
<vn-descriptor-content module="invoiceIn" description="$ctrl.invoiceIn.supplierRef">
|
<vn-descriptor-content
|
||||||
|
module="invoiceIn"
|
||||||
|
description="$ctrl.invoiceIn.supplierRef"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="$ctrl.checkToBook()"
|
ng-click="$ctrl.checkToBook()"
|
||||||
|
@ -77,3 +80,6 @@
|
||||||
message="Are you sure you want to book this invoice?"
|
message="Are you sure you want to book this invoice?"
|
||||||
on-accept="$ctrl.onAcceptToBook()">
|
on-accept="$ctrl.onAcceptToBook()">
|
||||||
</vn-confirm>
|
</vn-confirm>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-invoice-in-summary invoice-in="$ctrl.invoiceIn"></vn-invoice-in-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="invoiceOut"
|
module="invoiceOut"
|
||||||
description="$ctrl.invoiceOut.ref">
|
description="$ctrl.invoiceOut.ref"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-dot-menu>
|
<slot-dot-menu>
|
||||||
<vn-invoice-out-descriptor-menu
|
<vn-invoice-out-descriptor-menu
|
||||||
invoice-out="$ctrl.invoiceOut"
|
invoice-out="$ctrl.invoiceOut"
|
||||||
|
@ -50,3 +51,6 @@
|
||||||
</div>
|
</div>
|
||||||
</slot-body>
|
</slot-body>
|
||||||
</vn-descriptor-content>
|
</vn-descriptor-content>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-invoice-out-summary invoice-out="$ctrl.invoiceOut"></vn-invoice-out-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="item"
|
module="item"
|
||||||
description="$ctrl.item.name">
|
description="$ctrl.item.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="regularize.show()"
|
ng-click="regularize.show()"
|
||||||
|
@ -114,6 +115,9 @@
|
||||||
<vn-worker-descriptor-popover
|
<vn-worker-descriptor-popover
|
||||||
vn-id="workerDescriptor">
|
vn-id="workerDescriptor">
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-item-summary item="$ctrl.item"></vn-item-summary>
|
||||||
|
</vn-popup>
|
||||||
|
|
||||||
<!-- Upload photo dialog -->
|
<!-- Upload photo dialog -->
|
||||||
<vn-upload-photo
|
<vn-upload-photo
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="order"
|
module="order"
|
||||||
description="$ctrl.order.client.name">
|
description="$ctrl.order.client.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="deleteOrderConfirmation.show()"
|
ng-click="deleteOrderConfirmation.show()"
|
||||||
|
@ -72,3 +73,6 @@
|
||||||
<vn-worker-descriptor-popover
|
<vn-worker-descriptor-popover
|
||||||
vn-id="workerDescriptor">
|
vn-id="workerDescriptor">
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-order-summary order="$ctrl.order"></vn-order-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="route"
|
module="route"
|
||||||
description="$ctrl.route.name">
|
description="$ctrl.route.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item
|
<vn-item
|
||||||
ng-click="$ctrl.showRouteReport()"
|
ng-click="$ctrl.showRouteReport()"
|
||||||
|
@ -62,3 +63,6 @@
|
||||||
on-accept="$ctrl.updateVolume()"
|
on-accept="$ctrl.updateVolume()"
|
||||||
question="Are you sure you want to update the volume?">
|
question="Are you sure you want to update the volume?">
|
||||||
</vn-confirm>
|
</vn-confirm>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-route-summary route="$ctrl.route"></vn-route-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="supplier"
|
module="supplier"
|
||||||
description="$ctrl.supplier.name">
|
description="$ctrl.supplier.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-body>
|
<slot-body>
|
||||||
<div class="attributes">
|
<div class="attributes">
|
||||||
<vn-label-value label="Tax number"
|
<vn-label-value label="Tax number"
|
||||||
|
@ -60,3 +61,6 @@
|
||||||
</div>
|
</div>
|
||||||
</slot-body>
|
</slot-body>
|
||||||
</vn-descriptor-content>
|
</vn-descriptor-content>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-supplier-summary supplier="$ctrl.supplier"></vn-supplier-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="ticket"
|
module="ticket"
|
||||||
description="$ctrl.ticket.client.name">
|
description="$ctrl.ticket.client.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-dot-menu>
|
<slot-dot-menu>
|
||||||
<vn-ticket-descriptor-menu
|
<vn-ticket-descriptor-menu
|
||||||
vn-id="descriptorMenu"
|
vn-id="descriptorMenu"
|
||||||
|
@ -128,3 +129,6 @@
|
||||||
<vn-worker-descriptor-popover
|
<vn-worker-descriptor-popover
|
||||||
vn-id="workerDescriptor">
|
vn-id="workerDescriptor">
|
||||||
</vn-worker-descriptor-popover>
|
</vn-worker-descriptor-popover>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-ticket-summary ticket="$ctrl.ticket"></vn-ticket-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="travel"
|
module="travel"
|
||||||
description="$ctrl.travel.ref">
|
description="$ctrl.travel.ref"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-dot-menu>
|
<slot-dot-menu>
|
||||||
<vn-travel-descriptor-menu travel-id="$ctrl.travel.id"/>
|
<vn-travel-descriptor-menu travel-id="$ctrl.travel.id"/>
|
||||||
</slot-dot-menu>
|
</slot-dot-menu>
|
||||||
|
@ -42,3 +43,6 @@
|
||||||
</div>
|
</div>
|
||||||
</slot-body>
|
</slot-body>
|
||||||
</vn-descriptor-content>
|
</vn-descriptor-content>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-travel-summary travel="$ctrl.travel"></vn-travel-summary>
|
||||||
|
</vn-popup>
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="worker"
|
module="worker"
|
||||||
description="$ctrl.worker.firstName +' '+ $ctrl.worker.lastName">
|
description="$ctrl.worker.firstName +' '+ $ctrl.worker.lastName"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-before>
|
<slot-before>
|
||||||
<div class="photo" text-center>
|
<div class="photo" text-center>
|
||||||
<img vn-id="photo"
|
<img vn-id="photo"
|
||||||
|
@ -57,6 +58,9 @@
|
||||||
</div>
|
</div>
|
||||||
</slot-body>
|
</slot-body>
|
||||||
</vn-descriptor-content>
|
</vn-descriptor-content>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-worker-summary worker="$ctrl.worker"></vn-worker-summary>
|
||||||
|
</vn-popup>
|
||||||
|
|
||||||
<!-- Upload photo dialog -->
|
<!-- Upload photo dialog -->
|
||||||
<vn-upload-photo
|
<vn-upload-photo
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
<vn-descriptor-content
|
<vn-descriptor-content
|
||||||
module="zone"
|
module="zone"
|
||||||
description="$ctrl.zone.name">
|
description="$ctrl.zone.name"
|
||||||
|
summary="$ctrl.$.summary">
|
||||||
<slot-menu>
|
<slot-menu>
|
||||||
<vn-item class="vn-item"
|
<vn-item class="vn-item"
|
||||||
ng-click="$ctrl.onDelete()"
|
ng-click="$ctrl.onDelete()"
|
||||||
|
@ -39,6 +40,10 @@
|
||||||
</div>
|
</div>
|
||||||
</slot-body>
|
</slot-body>
|
||||||
</vn-descriptor-content>
|
</vn-descriptor-content>
|
||||||
|
<vn-popup vn-id="summary">
|
||||||
|
<vn-zone-summary zone="$ctrl.zone"></vn-zone-summary>
|
||||||
|
</vn-popup>
|
||||||
|
|
||||||
<vn-confirm
|
<vn-confirm
|
||||||
vn-id="deleteZone"
|
vn-id="deleteZone"
|
||||||
on-accept="$ctrl.deleteZone()"
|
on-accept="$ctrl.deleteZone()"
|
||||||
|
|
Loading…
Reference in New Issue