5660-changeRolDeliveryAssistant #1607
|
@ -3,11 +3,11 @@ INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `pri
|
|||
('Ticket', 'editDiscount', 'WRITE', 'ALLOW', 'ROLE', 'claimManager'),
|
||||
('Ticket', 'editDiscount', 'WRITE', 'ALLOW', 'ROLE', 'salesPerson'),
|
||||
('Ticket', 'isRoleAdvanced', '*', 'ALLOW', 'ROLE', 'salesAssistant'),
|
||||
('Ticket', 'isRoleAdvanced', '*', 'ALLOW', 'ROLE', 'deliveryBoss'),
|
||||
('Ticket', 'isRoleAdvanced', '*', 'ALLOW', 'ROLE', 'deliveryAssistant'),
|
||||
('Ticket', 'isRoleAdvanced', '*', 'ALLOW', 'ROLE', 'buyer'),
|
||||
('Ticket', 'isRoleAdvanced', '*', 'ALLOW', 'ROLE', 'claimManager'),
|
||||
('Ticket', 'deleteTicketWithPartPrepared', 'WRITE', 'ALLOW', 'ROLE', 'salesAssistant'),
|
||||
('Ticket', 'editZone', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss'),
|
||||
('Ticket', 'editZone', 'WRITE', 'ALLOW', 'ROLE', 'deliveryAssistant'),
|
||||
('State', 'editableStates', 'READ', 'ALLOW', 'ROLE', 'employee'),
|
||||
('State', 'seeEditableStates', 'READ', 'ALLOW', 'ROLE', 'administrative'),
|
||||
('State', 'seeEditableStates', 'READ', 'ALLOW', 'ROLE', 'production'),
|
|
@ -0,0 +1,16 @@
|
|||
-- Auto-generated SQL script. Actual values for binary/complex data types may differ - what you see is the default string representation of values.
|
||||
INSERT INTO `account`.`role` (name,description)
|
||||
VALUES ('deliveryAssistant','Jefe auxiliar repartos');
|
||||
|
||||
INSERT INTO `account`.`roleInherit` (role, inheritsFrom)
|
||||
SELECT (SELECT id FROM account.role r1 WHERE r1.name = 'deliveryAssistant'), ri.inheritsFrom
|
||||
FROM account.roleInherit ri
|
||||
JOIN account.role r2 ON r2.id = ri.`role`
|
||||
WHERE r2.name = 'deliveryBoss';
|
||||
|
||||
INSERT INTO `account`.`roleInherit` (role, inheritsFrom)
|
||||
SELECT (SELECT id FROM account.role WHERE name = 'deliveryBoss') role,
|
||||
(SELECT id FROM account.role WHERE name = 'deliveryAssistant') roleInherit;
|
||||
|
||||
|
||||
CALL `account`.`role_syncPrivileges`();
|
File diff suppressed because one or more lines are too long
10282
db/dump/structure.sql
10282
db/dump/structure.sql
File diff suppressed because it is too large
Load Diff
|
@ -8,7 +8,7 @@ describe('Client create path', () => {
|
|||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule(' deliveryBoss', 'client');
|
||||
await page.loginAndModule('deliveryAssistant', 'client');
|
||||
});
|
||||
|
||||
afterAll(async() => {
|
||||
|
|
|
@ -45,7 +45,7 @@ describe('Worker create path', () => {
|
|||
|
||||
// should create a new worker and go to worker basic data'
|
||||
await page.pickDate(selectors.workerCreate.birth, new Date(1962, 8, 5));
|
||||
await page.autocompleteSearch(selectors.workerCreate.boss, 'deliveryBoss');
|
||||
await page.autocompleteSearch(selectors.workerCreate.boss, 'deliveryAssistant');
|
||||
await page.waitToClick(selectors.workerCreate.createButton);
|
||||
message = await page.waitForSnackbar();
|
||||
await page.waitForState('worker.card.basicData');
|
||||
|
|
|
@ -8,7 +8,9 @@ describe('Zone basic data path', () => {
|
|||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('deliveryBoss', 'zone'); // turns up the zone module name and route aint the same lol
|
||||
|
||||
await page.loginAndModule('deliveryAssistant',
|
||||
'zone'); // turns up the zone module name and route aint the same lol
|
||||
await page.accessToSearchResult('10');
|
||||
await page.accessToSection('zone.card.basicData');
|
||||
});
|
||||
|
|
|
@ -8,7 +8,7 @@ describe('Zone descriptor path', () => {
|
|||
beforeAll(async() => {
|
||||
browser = await getBrowser();
|
||||
page = browser.page;
|
||||
await page.loginAndModule('deliveryBoss', 'zone');
|
||||
await page.loginAndModule('deliveryAssistant', 'zone');
|
||||
await page.accessToSearchResult('13');
|
||||
});
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
<vn-check
|
||||
vn-one
|
||||
label="Default" ng-model="$ctrl.address.isDefaultAddress">
|
||||
</vn-check>
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
|
@ -60,7 +60,7 @@
|
|||
show-field="code"
|
||||
rule>
|
||||
<tpl-item>
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{town.province.country.country}})
|
||||
</tpl-item>
|
||||
<append>
|
||||
|
@ -68,12 +68,12 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
</vn-datalist>
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
label="City"
|
||||
ng-model="$ctrl.address.city"
|
||||
selection="$ctrl.town"
|
||||
|
@ -158,7 +158,7 @@
|
|||
</vn-geo-postcode>
|
||||
|
||||
<!-- Create custom agent dialog -->
|
||||
<vn-dialog class="edit"
|
||||
<vn-dialog class="edit"
|
||||
vn-id="customAgent"
|
||||
on-accept="$ctrl.onCustomAgentAccept()"
|
||||
message="New customs agent">
|
||||
|
@ -190,4 +190,4 @@
|
|||
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
||||
<button response="accept" translate>Create</button>
|
||||
</tpl-buttons>
|
||||
</vn-dialog>
|
||||
</vn-dialog>
|
||||
|
|
|
@ -73,20 +73,20 @@
|
|||
show-field="code"
|
||||
rule>
|
||||
<tpl-item>
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{town.province.country.country}})
|
||||
</tpl-item>
|
||||
<append>
|
||||
<vn-icon-button
|
||||
<vn-icon-button
|
||||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
</vn-datalist>
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
label="City"
|
||||
ng-model="$ctrl.address.city"
|
||||
selection="$ctrl.town"
|
||||
|
@ -178,14 +178,14 @@
|
|||
icon="delete"
|
||||
ng-click="$ctrl.removeObservation($index)"
|
||||
tabindex="-1">
|
||||
</vn-icon-button>
|
||||
</vn-icon-button>
|
||||
</vn-none>
|
||||
</vn-horizontal>
|
||||
<vn-icon-button
|
||||
vn-bind="+"
|
||||
vn-tooltip="Add note"
|
||||
icon="add_circle"
|
||||
ng-if="types.length > observations.length"
|
||||
ng-if="types.length > observations.length"
|
||||
ng-click="model.insert()">
|
||||
</vn-icon-button>
|
||||
</div>
|
||||
|
@ -197,12 +197,12 @@
|
|||
</form>
|
||||
|
||||
<!-- New postcode dialog -->
|
||||
<vn-geo-postcode vn-id="postcode"
|
||||
<vn-geo-postcode vn-id="postcode"
|
||||
on-response="$ctrl.onResponse($response)">
|
||||
</vn-geo-postcode>
|
||||
|
||||
<!-- Create custom agent dialog -->
|
||||
<vn-dialog class="edit"
|
||||
<vn-dialog class="edit"
|
||||
vn-id="customAgent"
|
||||
on-accept="$ctrl.onCustomAgentAccept()"
|
||||
message="New customs agent">
|
||||
|
@ -234,4 +234,4 @@
|
|||
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
||||
<button response="accept" translate>Create</button>
|
||||
</tpl-buttons>
|
||||
</vn-dialog>
|
||||
</vn-dialog>
|
||||
|
|
|
@ -73,7 +73,7 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New city"
|
||||
ng-click="city.open($event)"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
|
@ -45,7 +45,7 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New province"
|
||||
ng-click="province.open($event)"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
|
@ -73,4 +73,4 @@
|
|||
<vn-geo-city
|
||||
vn-id="city"
|
||||
on-response="$ctrl.onCityResponse($response)">
|
||||
</vn-geo-city>
|
||||
</vn-geo-city>
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="updateVolumeConfirmation.show()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove"
|
||||
translate>
|
||||
Update volume
|
||||
</vn-item>
|
||||
<vn-item
|
||||
ng-click="$ctrl.deleteCurrentRoute()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove"
|
||||
translate>
|
||||
Delete route
|
||||
|
@ -31,23 +31,23 @@
|
|||
<slot-body>
|
||||
<div class="attributes">
|
||||
<vn-label-value
|
||||
label="Date"
|
||||
label="Date"
|
||||
value="{{$ctrl.route.created | date: 'dd/MM/yyyy'}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Agency"
|
||||
label="Agency"
|
||||
value="{{$ctrl.route.agencyMode.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Zone"
|
||||
label="Zone"
|
||||
value="{{$ctrl.route.zone.name}}">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Volume"
|
||||
label="Volume"
|
||||
value="{{$ctrl.route.m3 | dashIfEmpty}} / {{$ctrl.route.vehicle.m3 | dashIfEmpty}} m³">
|
||||
</vn-label-value>
|
||||
<vn-label-value
|
||||
label="Description"
|
||||
label="Description"
|
||||
value="{{$ctrl.route.description}}">
|
||||
</vn-label-value>
|
||||
</div>
|
||||
|
@ -72,4 +72,4 @@
|
|||
</vn-confirm>
|
||||
<vn-popup vn-id="summary">
|
||||
<vn-route-summary route="$ctrl.route"></vn-route-summary>
|
||||
</vn-popup>
|
||||
</vn-popup>
|
||||
|
|
|
@ -37,7 +37,7 @@
|
|||
icon="format_list_numbered">
|
||||
</vn-button>
|
||||
<vn-button
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove"
|
||||
disabled="!$ctrl.isChecked"
|
||||
icon="sms"
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
show-field="code"
|
||||
rule>
|
||||
<tpl-item>
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{town.province.country.country}})
|
||||
</tpl-item>
|
||||
<append>
|
||||
|
@ -50,12 +50,12 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
</vn-datalist>
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
label="City"
|
||||
ng-model="$ctrl.address.city"
|
||||
selection="$ctrl.town"
|
||||
|
@ -106,4 +106,4 @@
|
|||
<!-- New postcode dialog -->
|
||||
<vn-geo-postcode vn-id="postcode"
|
||||
on-response="$ctrl.onResponse($response)">
|
||||
</vn-geo-postcode>
|
||||
</vn-geo-postcode>
|
||||
|
|
|
@ -40,20 +40,20 @@
|
|||
show-field="code"
|
||||
rule>
|
||||
<tpl-item>
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{code}} - {{town.name}} ({{town.province.name}},
|
||||
{{town.province.country.country}})
|
||||
</tpl-item>
|
||||
<append>
|
||||
<vn-icon-button
|
||||
<vn-icon-button
|
||||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
</vn-datalist>
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
<vn-datalist vn-id="town" vn-one
|
||||
label="City"
|
||||
ng-model="$ctrl.address.city"
|
||||
selection="$ctrl.town"
|
||||
|
@ -99,6 +99,6 @@
|
|||
</form>
|
||||
|
||||
<!-- New postcode dialog -->
|
||||
<vn-geo-postcode vn-id="postcode"
|
||||
<vn-geo-postcode vn-id="postcode"
|
||||
on-response="$ctrl.onResponse($response)">
|
||||
</vn-geo-postcode>
|
||||
</vn-geo-postcode>
|
||||
|
|
|
@ -150,7 +150,7 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
|
|
|
@ -72,7 +72,7 @@
|
|||
icon="add_circle"
|
||||
vn-tooltip="New postcode"
|
||||
ng-click="postcode.open()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
</append>
|
||||
|
|
|
@ -12,9 +12,9 @@
|
|||
<vn-card class="vn-pa-lg">
|
||||
<vn-horizontal>
|
||||
<vn-textfield
|
||||
label="Name"
|
||||
label="Name"
|
||||
ng-model="$ctrl.zone.name"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-textfield>
|
||||
</vn-horizontal>
|
||||
|
@ -26,7 +26,7 @@
|
|||
show-field="name"
|
||||
value-field="id"
|
||||
label="Agency"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-autocomplete>
|
||||
<vn-input-number
|
||||
|
@ -34,7 +34,7 @@
|
|||
label="Max m³"
|
||||
ng-model="$ctrl.zone.itemMaxSize"
|
||||
min="0"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
|
@ -42,7 +42,7 @@
|
|||
label="Maximum m³"
|
||||
ng-model="$ctrl.zone.m3Max"
|
||||
min="0"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
|
@ -52,13 +52,13 @@
|
|||
ng-model="$ctrl.zone.travelingDays"
|
||||
min="0"
|
||||
step="1"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-time
|
||||
label="Closing"
|
||||
ng-model="$ctrl.zone.hour"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-input-time>
|
||||
</vn-horizontal>
|
||||
|
@ -68,16 +68,16 @@
|
|||
ng-model="$ctrl.zone.price"
|
||||
min="0"
|
||||
step="0.01"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-input-number
|
||||
label="Bonus"
|
||||
ng-model="$ctrl.zone.bonus"
|
||||
step="0.01"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
<vn-input-number
|
||||
|
@ -86,14 +86,14 @@
|
|||
ng-model="$ctrl.zone.inflation"
|
||||
min="0"
|
||||
step="0.01"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-input-number>
|
||||
<vn-check
|
||||
vn-one
|
||||
label="Volumetric"
|
||||
ng-model="$ctrl.zone.isVolumetric"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
rule>
|
||||
</vn-check>
|
||||
</vn-horizontal>
|
||||
|
@ -101,7 +101,7 @@
|
|||
<vn-button-bar>
|
||||
<vn-submit
|
||||
disabled="!watcher.dataChanged()"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
label="Save">
|
||||
</vn-submit>
|
||||
<vn-button
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
vn-click-stop="clone.show(zone)"
|
||||
vn-tooltip="Clone"
|
||||
icon="icon-clone"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-icon-button>
|
||||
<vn-icon-button
|
||||
|
@ -50,7 +50,7 @@
|
|||
<vn-popup vn-id="summary">
|
||||
<vn-zone-summary zone="$ctrl.selectedZone"></vn-zone-summary>
|
||||
</vn-popup>
|
||||
<vn-confirm
|
||||
<vn-confirm
|
||||
vn-id="clone"
|
||||
on-accept="$ctrl.onCloneAccept($data)"
|
||||
question="Do you want to clone this zone?"
|
||||
|
@ -62,7 +62,7 @@
|
|||
fixed-bottom-right>
|
||||
<vn-float-button
|
||||
icon="add"
|
||||
vn-acl="deliveryBoss"
|
||||
vn-acl="deliveryAssistant"
|
||||
vn-acl-action="remove">
|
||||
</vn-float-button>
|
||||
</a>
|
||||
|
|
|
@ -16,12 +16,12 @@
|
|||
root-label="Locations"
|
||||
fetch-func="$ctrl.onFetch($item)"
|
||||
sort-func="$ctrl.onSort($a, $b)">
|
||||
<vn-check acl-role="deliveryBoss"
|
||||
<vn-check acl-role="deliveryAssistant"
|
||||
ng-model="item.selected"
|
||||
on-change="$ctrl.onSelection(value, item)"
|
||||
on-change="$ctrl.onSelection(value, item)"
|
||||
triple-state="true"
|
||||
ng-click="$event.preventDefault()"
|
||||
label="{{::item.name}}">
|
||||
label="{{::item.name}}">
|
||||
</vn-check>
|
||||
</vn-treeview>
|
||||
</vn-card>
|
||||
|
|
Loading…
Reference in New Issue