From 507bc8c2ced77615b3e6fa62f435c0941617c1f9 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Thu, 27 Jun 2019 11:48:33 +0200 Subject: [PATCH] updated fonts & calendar acls --- db/changes/10060-summer/00-ACL.sql | 2 + .../00-zoneCalendar.sql | 0 front/core/components/calendar/index.js | 5 + front/core/components/calendar/style.scss | 4 + front/core/directives/acl.js | 23 +- front/core/styles/salixfont.css | 261 ++++++++++++++++++ front/core/styles/salixfont.svg | 1 + front/core/styles/salixfont.ttf | Bin 25668 -> 26156 bytes front/core/styles/salixfont.woff | Bin 25744 -> 26232 bytes modules/agency/front/calendar/index.html | 6 +- modules/agency/front/calendar/style.scss | 4 + modules/agency/front/location/calendar.html | 6 +- modules/agency/front/routes.json | 2 +- 13 files changed, 299 insertions(+), 15 deletions(-) create mode 100644 db/changes/10060-summer/00-ACL.sql rename db/changes/{10060-verano => 10060-summer}/00-zoneCalendar.sql (100%) diff --git a/db/changes/10060-summer/00-ACL.sql b/db/changes/10060-summer/00-ACL.sql new file mode 100644 index 0000000000..dd9a24d633 --- /dev/null +++ b/db/changes/10060-summer/00-ACL.sql @@ -0,0 +1,2 @@ +INSERT INTO `salix`.`ACL` (`model`, `property`, `accessType`, `permission`, `principalType`, `principalId`) + VALUES ('Zone', 'editPrices', 'WRITE', 'ALLOW', 'ROLE', 'deliveryBoss'); diff --git a/db/changes/10060-verano/00-zoneCalendar.sql b/db/changes/10060-summer/00-zoneCalendar.sql similarity index 100% rename from db/changes/10060-verano/00-zoneCalendar.sql rename to db/changes/10060-summer/00-zoneCalendar.sql diff --git a/front/core/components/calendar/index.js b/front/core/components/calendar/index.js index 9e920eea2e..5289d1d8db 100644 --- a/front/core/components/calendar/index.js +++ b/front/core/components/calendar/index.js @@ -12,6 +12,7 @@ export default class Calendar extends Component { this.events = []; this.defaultDate = new Date(); this.displayControls = true; + this.disabled = false; this.skip = 1; this.window.addEventListener('resize', () => { @@ -278,6 +279,7 @@ export default class Calendar extends Component { * @param {Integer} index - Index from days array */ select(index) { + if (this.disabled) return; let day = this.days[index]; day.index = index; @@ -290,6 +292,8 @@ export default class Calendar extends Component { * @param {Integer} weekday - weekday index */ selectAll(weekday) { + if (this.disabled) return; + let selected = []; for (let i in this.days) { const day = this.days[i]; @@ -325,6 +329,7 @@ ngModule.component('vnCalendar', { onMoveNext: '&?', onMovePrevious: '&?', displayControls: ' { - input.setAttribute('disabled', 'true'); - updateMaterial(input); + element.setAttribute('disabled', 'true'); + updateMaterial(element); }); $element[0].querySelectorAll('vn-drop-down').forEach(element => { element.parentNode.removeChild(element); @@ -78,7 +83,7 @@ function vnAcl(aclService, $timeout) { let action = $attrs.vnAclAction || 'disabled'; let conditions = getDynamicConditions($attrs); - permissionElement($scope, $element, action); + permissionElement($element, action); if (Object.keys(conditions).length) { let watchConditions = $scope.$watch(() => { @@ -86,7 +91,7 @@ function vnAcl(aclService, $timeout) { let hasPermission = $scope.$eval($attrs[attrName]); if (!hasPermission) { updateAcls(conditions[attrName].role, hasPermission); - permissionElement($scope, $element, action); + permissionElement($element, action); delete conditions[attrName]; } }); diff --git a/front/core/styles/salixfont.css b/front/core/styles/salixfont.css index 7f2ca142f8..5bea56e137 100644 --- a/front/core/styles/salixfont.css +++ b/front/core/styles/salixfont.css @@ -281,3 +281,264 @@ .icon-worker:before { content: "\e943"; } +.icon-deliveryprices:before { + content: "\e956"; +} +.icon-basketadd:before { + content: "\e955"; +} +.icon-catalog:before { + content: "\e952"; +} +.icon-agency:before { + content: "\e910"; +} +.icon-delivery:before { + content: "\e94a"; +} +.icon-wand:before { + content: "\e954"; +} +.icon-unavailable:before { + content: "\e953"; +} +.icon-buscaman:before { + content: "\e951"; +} +.icon-pbx:before { + content: "\e950"; +} +.icon-calendar:before { + content: "\e94f"; +} +.icon-linesplit:before { + content: "\e945"; +} +.icon-invoices:before { + content: "\e91c"; +} +.icon-pets:before { + content: "\e94e"; +} +.icon-100:before { + content: "\e940"; +} +.icon-accessory:before { + content: "\e90a"; +} +.icon-actions:before { + content: "\e900"; +} +.icon-addperson:before { + content: "\e901"; +} +.icon-albaran:before { + content: "\e902"; +} +.icon-apps:before { + content: "\e948"; +} +.icon-artificial:before { + content: "\e903"; +} +.icon-barcode:before { + content: "\e904"; +} +.icon-basket:before { + content: "\e942"; +} +.icon-bin:before { + content: "\e905"; +} +.icon-botanical:before { + content: "\e906"; +} +.icon-bucket:before { + content: "\e907"; +} +.icon-claims:before { + content: "\e908"; +} +.icon-clone:before { + content: "\e909"; +} +.icon-columnadd:before { + content: "\e944"; +} +.icon-columndelete:before { + content: "\e90f"; +} +.icon-components:before { + content: "\e90b"; +} +.icon-consignatarios:before { + content: "\e90d"; +} +.icon-control:before { + content: "\e93f"; +} +.icon-credit:before { + content: "\e90e"; +} +.icon-details:before { + content: "\e911"; +} +.icon-disabled:before { + content: "\e91b"; +} +.icon-doc:before { + content: "\e913"; +} +.icon-entry:before { + content: "\e914"; +} +.icon-exit:before { + content: "\e947"; +} +.icon-eye:before { + content: "\e915"; +} +.icon-fiscal:before { + content: "\e912"; +} +.icon-flower:before { + content: "\e916"; +} +.icon-frozen:before { + content: "\e917"; +} +.icon-greenery:before { + content: "\e93c"; +} +.icon-greuge:before { + content: "\e918"; +} +.icon-grid:before { + content: "\e919"; +} +.icon-handmade:before { + content: "\e90c"; +} +.icon-history:before { + content: "\e91a"; +} +.icon-info:before { + content: "\e949"; +} +.icon-item:before { + content: "\e941"; +} +.icon-languaje:before { + content: "\e91d"; +} +.icon-linedelete:before { + content: "\e946"; +} +.icon-lines:before { + content: "\e91e"; +} +.icon-linesprepaired:before { + content: "\e94b"; +} +.icon-logout:before { + content: "\e91f"; +} +.icon-mana:before { + content: "\e920"; +} +.icon-mandatory:before { + content: "\e921"; +} +.icon-niche:before { + content: "\e922"; +} +.icon-no036:before { + content: "\e923"; +} +.icon-notes:before { + content: "\e924"; +} +.icon-noweb:before { + content: "\e925"; +} +.icon-onlinepayment:before { + content: "\e926"; +} +.icon-package:before { + content: "\e927"; +} +.icon-payment:before { + content: "\e928"; +} +.icon-person:before { + content: "\e929"; +} +.icon-photo:before { + content: "\e92a"; +} +.icon-plant:before { + content: "\e92b"; +} +.icon-recovery:before { + content: "\e92d"; +} +.icon-regentry:before { + content: "\e92e"; +} +.icon-reserve:before { + content: "\e92f"; +} +.icon-revision:before { + content: "\e94c"; +} +.icon-risk:before { + content: "\e930"; +} +.icon-services:before { + content: "\e94d"; +} +.icon-settings:before { + content: "\e931"; +} +.icon-sms:before { + content: "\e932"; +} +.icon-solclaim:before { + content: "\e933"; +} +.icon-solunion:before { + content: "\e934"; +} +.icon-splur:before { + content: "\e935"; +} +.icon-stowaway:before { + content: "\e92c"; +} +.icon-supplier:before { + content: "\e936"; +} +.icon-tags:before { + content: "\e937"; +} +.icon-tax:before { + content: "\e938"; +} +.icon-ticket:before { + content: "\e939"; +} +.icon-traceability:before { + content: "\e93a"; +} +.icon-transaction:before { + content: "\e93b"; +} +.icon-volume:before { + content: "\e93d"; +} +.icon-web:before { + content: "\e93e"; +} +.icon-worker:before { + content: "\e943"; +} \ No newline at end of file diff --git a/front/core/styles/salixfont.svg b/front/core/styles/salixfont.svg index 9145bac4fb..04dd47f6f3 100644 --- a/front/core/styles/salixfont.svg +++ b/front/core/styles/salixfont.svg @@ -93,4 +93,5 @@ + \ No newline at end of file diff --git a/front/core/styles/salixfont.ttf b/front/core/styles/salixfont.ttf index 52b9c0f5c97ff0ff6210d5ae5fd0d7cf3c47f78b..b11c6f64c37915d53e3f50ca5f682de420164cee 100644 GIT binary patch delta 494 zcmX?df^p3m#(D-u1_lOhh6V;^1_S?KeItG$wkn{=9w1Ig&P^;354&`ifq_v5$PYu8pU`RXzlsC%&3a}qxkzim*Vgd41 zGIC2Qk{CHR0Qnj~Jvlk~$(D(4Kd|>PFeFa_D%g>mSW&=G$#|H7A;kyCSIA4uO^pk` z2{bSz2dH6QL4I)w(4jz(#xrq;J7d@+MsLQj%|48CiKup>ecf&#f1gb#1)K%^?4P=gmtAPb%jM#czK1{9L&uf*o1j`RYb(}B*k^bgcW%8 z#Y|+x)dYm4*yb?_?qO$QV^(6B#mvGy*+RrA(?y+)orRf;MN34Qmy26MTw6erjfjnb5rBO zZ@L5dEkF(P3i69ffDQ$M6qSiP+!;eBF?utGZuViE8>bBN2M|9iD9ViIxB1Gz%>q)# yaO3M!K^Q&xL!voj)MkyO493Y*lD7!~#X-8F7!NYYg48fDO%_ZO-khJZmk|Iu8%fvz diff --git a/front/core/styles/salixfont.woff b/front/core/styles/salixfont.woff index 31320a8d649deedb2ca89306fa8d5f18100ddaa6..f88e6bfbfb773cf76feb69b2da2ad11cfe47df4b 100644 GIT binary patch delta 547 zcmbPmlJUnGMv-!VH#Y`G1|UeQVBiMRIuk{->#LG;6AKs^7&CxEAs{RscIj?8+ZtAH^3 z5f+Jz+>#2QSP4*n4hSbPa&E}UPX?;9OMU=Uv;&0Seqis*O{@S~oH7H*R{-Nm#>07u zxv4-gpc=+`ARHHd)4d?S7-(2p#Kb@TjA4^~7`++8HqT(38z;^V)MdlM!0ZC_qd3q3 z1`H7liy5{|UKbD}BC0IIC<;WzqRMiN;&P0}MrP)dS!B!vS(TO4Y#B|=tQif&M8%ER zlqdTHx_bVdwR-hDPH|xYHE{)FVSQdjF=1UPNnK$P6<%IpHV1Qa2R30|UKJ5BJxOt0 zF<}K>eK8XmaWw&9DYkh`f_vDR*qD`AW-+rcPi_%$s&`RmV`pLJV$l+j=H=p+5Z4xv zWaDCI=i-tS5Kt0VW9DFEXJ^(HQx*{x<6>jy;AEE&&=!;A;pCMO_GM+6$jr*fJdqb1 zfxt)%R=jX9p5Nvx12+rMzYGjFtxU6E^#8yAH?y!X9|rO{7??n!K)^UTFF}zpdh>*Y W493Y{5_fSJXo1a&-n=d879#*Q;%*%P delta 308 zcmexyhH=74MzL~#H#Y`G1|Ue8z`zZrT^JZAC#H!_)Df<)OwLU#U|?X(07`^_uz1*| zJL!qVAhA6_J_i&Fq~}zo0mY6mFvJ1n;tKXY*?2x9H8F*OA;AQw#tei-dHAMg00n_! zIY7P&2(uqy5zojisQ`*ifY`&B5y!~6Atyf>sLn3&2T;*A5PtjqdP;6$1<>%M4M4sE z7*{YJ&P&Wq1&Un&YMuweap5=J3-XIgfc`0%_{X0ybg~blH)H7L8H{t|ltKOk;%5a# xneqHKUm3VrfC3B*H@-d - + @@ -27,14 +27,14 @@ data="$ctrl.events" display-controls="false" on-selection="$ctrl.onSelection(values)" - skip="2"> + skip="2" vn-acl="deliveryBoss"> + skip="2" vn-acl="deliveryBoss"> diff --git a/modules/agency/front/calendar/style.scss b/modules/agency/front/calendar/style.scss index 783bad77d5..7ff3897991 100644 --- a/modules/agency/front/calendar/style.scss +++ b/modules/agency/front/calendar/style.scss @@ -1,3 +1,7 @@ vn-calendar:nth-child(2n + 1) { border-right:1px solid #ddd +} + +.calendarControlsHeader { + justify-content: space-between; } \ No newline at end of file diff --git a/modules/agency/front/location/calendar.html b/modules/agency/front/location/calendar.html index a1db6f08a2..ad58aee1a9 100644 --- a/modules/agency/front/location/calendar.html +++ b/modules/agency/front/location/calendar.html @@ -11,11 +11,13 @@ data="$ctrl.events" on-selection="$ctrl.onSelection(values, stMonth)" on-move-next="$ctrl.onMoveNext(ndMonth)" - on-move-previous="$ctrl.onMovePrevious(ndMonth)"> + on-move-previous="$ctrl.onMovePrevious(ndMonth)" + vn-acl="deliveryBoss"> + default-date="$ctrl.ndMonthDate" + vn-acl="deliveryBoss"> \ No newline at end of file diff --git a/modules/agency/front/routes.json b/modules/agency/front/routes.json index 2125b11727..9f0930b771 100644 --- a/modules/agency/front/routes.json +++ b/modules/agency/front/routes.json @@ -7,7 +7,7 @@ "menu": [ {"state": "zone.card.basicData", "icon": "settings"}, {"state": "zone.card.location", "icon": "my_location"}, - {"state": "zone.card.calendar"} + {"state": "zone.card.calendar", "icon": "icon-deliveryprices"} ], "routes": [ {