From 3e40c651af429f07fe2e0319ad71fe298e3dff23 Mon Sep 17 00:00:00 2001 From: Juan Ferrer Toribio Date: Mon, 28 Jan 2019 16:24:45 +0100 Subject: [PATCH] #998 worker.index --- front/core/styles/salixfont.css | 37 +- front/core/styles/salixfont.eot | Bin 20504 -> 21860 bytes front/core/styles/salixfont.svg | 8 +- front/core/styles/salixfont.ttf | Bin 20332 -> 21688 bytes front/core/styles/salixfont.woff | Bin 20408 -> 21764 bytes front/module-import.js | 1 + front/salix/locale/es.yml | 1 + modules/agency/front/routes.json | 23 +- modules/claim/front/routes.json | 39 +- modules/client/front/routes.json | 602 ++++++++---------- modules/item/front/routes.json | 214 +++---- modules/order/front/routes.json | 36 +- modules/ticket/front/routes.json | 417 ++++++------ modules/travel/front/routes.json | 3 +- .../worker-mana/getCurrentWorkerMana.js | 0 .../specs/getCurrentWorkerMana.spec.js | 0 modules/worker/back/model-config.json | 1 + .../worker/back}/models/worker-mana.js | 0 .../worker/back}/models/worker-mana.json | 0 .../back}/models/worker-team-collegues.json | 0 .../worker/back}/models/worker-team.json | 0 .../worker/back}/models/worker.json | 0 modules/worker/front/basic-data/index.html | 32 + modules/worker/front/basic-data/index.js | 29 + modules/worker/front/card/index.html | 7 + modules/worker/front/card/index.js | 28 + modules/worker/front/descriptor/index.html | 21 + modules/worker/front/descriptor/index.js | 8 + modules/worker/front/index.js | 8 + modules/worker/front/index/index.html | 59 ++ modules/worker/front/index/index.js | 38 ++ modules/worker/front/locale/en.yml | 1 + modules/worker/front/locale/es.yml | 1 + modules/worker/front/module.js | 3 + modules/worker/front/routes.json | 46 ++ modules/worker/front/search-panel/index.html | 27 + modules/worker/front/search-panel/index.js | 7 + modules/worker/front/summary/index.html | 15 + modules/worker/front/summary/index.js | 34 + 39 files changed, 1017 insertions(+), 729 deletions(-) rename {back => modules/worker/back}/methods/worker-mana/getCurrentWorkerMana.js (100%) rename {back => modules/worker/back}/methods/worker-mana/specs/getCurrentWorkerMana.spec.js (100%) create mode 100644 modules/worker/back/model-config.json rename {back => modules/worker/back}/models/worker-mana.js (100%) rename {back => modules/worker/back}/models/worker-mana.json (100%) rename {back => modules/worker/back}/models/worker-team-collegues.json (100%) rename {back => modules/worker/back}/models/worker-team.json (100%) rename {back => modules/worker/back}/models/worker.json (100%) create mode 100644 modules/worker/front/basic-data/index.html create mode 100644 modules/worker/front/basic-data/index.js create mode 100644 modules/worker/front/card/index.html create mode 100644 modules/worker/front/card/index.js create mode 100644 modules/worker/front/descriptor/index.html create mode 100644 modules/worker/front/descriptor/index.js create mode 100644 modules/worker/front/index.js create mode 100644 modules/worker/front/index/index.html create mode 100644 modules/worker/front/index/index.js create mode 100644 modules/worker/front/locale/en.yml create mode 100644 modules/worker/front/locale/es.yml create mode 100644 modules/worker/front/module.js create mode 100644 modules/worker/front/routes.json create mode 100644 modules/worker/front/search-panel/index.html create mode 100644 modules/worker/front/search-panel/index.js create mode 100644 modules/worker/front/summary/index.html create mode 100644 modules/worker/front/summary/index.js diff --git a/front/core/styles/salixfont.css b/front/core/styles/salixfont.css index 24ff5f0ca3..bfd4b0f6e0 100644 --- a/front/core/styles/salixfont.css +++ b/front/core/styles/salixfont.css @@ -1,8 +1,8 @@ @font-face { font-family: 'salixfont'; - src: url('./salixfont.ttf?wiyr0v') format('truetype'), - url('./salixfont.woff?wiyr0v') format('woff'), - url('./salixfont.svg?wiyr0v#salixfont') format('svg'); + src: url('./salixfont.ttf?1qesj4') format('truetype'), + url('./salixfont.woff?1qesj4') format('woff'), + url('./salixfont.svg?1qesj4#salixfont') format('svg'); font-weight: normal; font-style: normal; } @@ -22,6 +22,27 @@ -moz-osx-font-smoothing: grayscale; } +.icon-columndelete:before { + content: "\e90f"; +} +.icon-columnadd:before { + content: "\e944"; +} +.icon-linesplit:before { + content: "\e945"; +} +.icon-linedelete:before { + content: "\e946"; +} +.icon-item:before { + content: "\e941"; +} +.icon-basket:before { + content: "\e942"; +} +.icon-worker:before { + content: "\e943"; +} .icon-reserve:before { content: "\e92f"; } @@ -76,9 +97,6 @@ .icon-credit:before { content: "\e90e"; } -.icon-deleteline:before { - content: "\e90f"; -} .icon-delivery:before { content: "\e910"; } @@ -163,7 +181,7 @@ .icon-plant:before { content: "\e92b"; } -.icon-polizon:before { +.icon-stowaway:before { content: "\e92c"; } .icon-recovery:before { @@ -172,9 +190,6 @@ .icon-regentry:before { content: "\e92e"; } -.icon-reserved:before { - content: "\e92f"; -} .icon-risk:before { content: "\e930"; } @@ -219,4 +234,4 @@ } .icon-web:before { content: "\e93e"; -} \ No newline at end of file +} diff --git a/front/core/styles/salixfont.eot b/front/core/styles/salixfont.eot index f0f829362e9d146488ca03dfb44b0c975ebd85ea..c816a300f8c5eb846a2d4a47a1b1e85788584243 100644 GIT binary patch delta 1811 zcmZ`(Z)jUp6u;-aB+sNTFL{0MCa%j%o4ow7)un%4^Rl_lWl~$$?oX@R6otBGYuDns zR#q@DB>~GAO2MqcO4Km?P-JctY|*(*h^_-aSQ&nrMXMjiJ_r@D>NaU#JuhL!f_u5= z=KQMDJK{a`{e14GFY`;^ zt}#L&P00S_Kws}s=`Lp_r0X*J=>w?X<}8n({5#5_fuYfK5V-dV>6UTL6UT>-^nU!! zmnR5$E{XQZq2BZe8HDR7-$J?OMDI{v&kH}aqkIqj3nRlPM+u7-a$wT56PAVh6USjE zv`t)uPH3CC2L~&AEQG8T*)74T4*q6n z{rwiw?`vND+36IWd4GCE)0l*FlU=j0$Bub5Wz6qXs%80^b&N7z!}F?ru4NALeH|uP z+n~{HVfU^~!y=qCGK=oVjBL%WP~_qI2gWDDsaFOqZQ140rko)b?e$u_Pb*l3Hyy-j*tY{p#Ks3?098>GNiXhelx zPHLv?C6|)Q$sTosFDA+MIIse!fnX%cVwQJ6v%Vc9%#=c?<_F3Jq=0lssuWz5byo@&UjEP}%PxV^caQ`m$W#cF!4H6<9)Lwoe$BL^C!D2% zl4K-dwT-7tQZdz+##xKC-lv4E)|fH^pN}Z@7HimtGwR1Lxjk>M$~u$P6==g1X5Ioe;Pue`ub3);YwZYjvcjiZ;CwccJsVwEV~_cx7+S;pLRPOZj+do zmZS`#E+MpWcQqT;^bnJcXgU>EvnDc=6{xNeQtm^!hxMT_RjC?R<62y!>pjTqM{I8X z%>4YB|8}6_*!(;W%zn8n83e7wMx)w6qg#Ngpi-^GGSg|}PvFzgZA|Bl#pPuP=1qPY z@LA?>%;k-Rtg(=vyMZ+}TPfC$f;DJus-0EMO36zeok90>4|Y_U?Z0KXG_Z0y<|V z_sH<5Y5hN%xVX1A)9MI0jynpD?;Lk3y7*T9G(YPk&Xn^bAtWpc_gqcx2KSizYq3Ub z72lIiNM~u97U{2^KfJd$O;rh1Z&dxb`RL|PeXYJ(-!1=WwXdcskP3Vo90;zc1@(65 hO4t*=5E+YxqWhww(etI)JK-y$n2{1@=GlEW;a`)~lY#&M delta 456 zcmaE|igCsQMmC8628JB}iEL&p#|>E?PIRajOk!YQ*aO4~$+?LI;$fGLPrM*gA7F8M zDFXvz1p|YZL`G_2itw{vfeZ}Z6M*W>GJpc?M_8DE{1ZUFN=9x;1s5axY#{#)P>)DX zesZF5k2_G_7bwlplbcvkz>v&%7|8Dd@)hzDb5rBOZ@L5dYk=zK733F}FffCZ`ul+7 z8JL+Fe@xC{v}bgfyoS-6(P8rs#!w+Ipm_|lSQwaQF|aZS0re@GDvGnKsrqPf@<5vO$#x - + @@ -72,4 +72,10 @@ + + + + + + \ No newline at end of file diff --git a/front/core/styles/salixfont.ttf b/front/core/styles/salixfont.ttf index 19ca515e4540de10c4a83a10000493ce44157d62..3bf8cbdda44bb89d9ed84908eec6494e51699c41 100644 GIT binary patch delta 1818 zcmZ`(U2Gdg5Z<|Se6@2v`*OEFHT5~M&p$L!$H~R#mL|nPAyJc-HnbE3QowHWCz>WG zkuWOAmWZkf6p5rrR0b@>L&cA(NF;(%TFKB<;(_qMQ;DGPQ1t;Cgb2_UB^TywH6jna z+ufUQcJ{m3nccZngbN=*jsPK~n&b&f;s*{jHoI%=!>GB0{rRIK=`rQV_ltyp5Aor_ z^!ONlJ&3LEmcipM5B$>KK8ZL>$br;QfBKkoo2w$^;02sFhETyR*tQ`41950*WFi{` z?j1sUWnA;n@zJC0=?}lTe1ecCQfP2?B%K{2!*B)hHN^EN(j)zSPyNt^_zo^8j*X5_ zpriO4K5NYrmc2V&dIUOWpa(kV_Q8`ieKtbYOYA6HLPHLBrVt_p#ElmePT`_lG#O1Q zxcBvq&We3gQ+?CZ<&iC|6B8$yJQ|EOwxpe6G=bl&B;BGG!iY*7(^plkQ0EjQ`xI<8mAA`7;IAlbWsCQ z6a4@&NVFJ9l=UQQX`8)@s7b*%Cu(u(11eLb%`v@>`Xli~EY=~(GVO@P^om@ky8NZq z(p-0cfA`)2cKCNw9~iKa0bk47&n}nfD)_Ujy3QnBTOGQM9UN42b<*!r>ty+{4UP(5 z{E+5YXkCCpf44=}Ic)aY*!`=sa2>|Y+;z_bX1=~X6nV5B7FTCqVwP5CnOw|ylVAqO`W!~;3K2;i*+II=)8uXPE+I)4_ldicWIGoRHrXQyrP)Y`Ef_01 z6=iR76AJ8vCR7-epyn!8ayh7+?A12eVvy_)0xN(P2u7kTM!5}IjNKq%Z1;fT2V53K zJ}zL5_DD2hBn_|PwR4j02g(JcfOJ!;5!{sZ)Ce|Se$Oq-Zh_J_unX8BS1nKm9{`Ga z02U?rMQau+HG+9b@G^|Vt5kq)i@^L$tYHy!l|k+cfy(@@ox7e@Rj{06BH@8VOMq84 zOwfW+4!Wt?z>6XeOS1bQda7}fqvC`bvfaIF3#n?Xsw%8HB+mSa@d{(+KA5+zmzB24 z0p|%N8XoaS$N@5rcM!89=e#;b9FstUb`=6Bg)!84aP>g>V6&T0bQ7v%=Uz^ly&&R6 zuq;GtISo{@k3^Nj5J(^;Gz4R@V4$%vu>B--on&%;^GbPJZM@)d-bXh7QKi=;6$fuE zylI41=R<}O0?AxwQX;BRpfb(hv!9e#p85% zJPxPll*j4xSeDHZct$@Z!t4@ff_m?l{z$izd97A8r2e7 zLQm*)qXt>^h@DD3-~Pb znzIG-`pOCf3zj?!cr6Q87YgQ5-drjyT*Vw)brf^Vln9S(SSG{eqL{1{NZ=Gbp;bjK z=1ito+-UGgs=f90iWy0*td=r`;y|&Gv04#YQ#-S%RMzs+>gVkA%jev!f0Jqq1wPka zNbkM(Ju}~vgr2!uJu;k$?^A%x?BAa2aE6@6okiz&&YRT-`40XRKkp*0jOzm-BwQEn zxSKt3&!p#Tv0m&D-;z#9Gc-#}^jGhn%8jk(YK7WYYJc2zY}=>44&S`*nt!6sS6>^* w1ilRp1y{AAb|Z8#>_k4Gn>@0b1Tfv<>Kc8@vJdqA3--G3SW1Db@D1poj5 delta 457 zcmdn7lJU(v#(D-u1_lOhh6V;^1_S?KeItG$wj`j)9w1Ig&P^;354&`nfq_v5$PYyn_7V5}-qYz~2WX&%n(5W8wjOMu$m^-i!{LeHcT9ynu!=%wl0+n#I7%AOzH; zXsRgAuBy(i&MwX_ZZ2-FZqB6k_ZE|yjSb_iq+37B`vpdY(SxcFP-Ps?(cKI20mRj0UgOCC(#oB5#LD`nSSPBM` zVyamZNzxUw(FSplcK-KFkJ|<TiXha*Lu4no$m{2-qtJP~mFenOO> zyzzox@Cz{^mW(C+7^L+L@N(zGMCasWuIIDs#Kxc87&;85CMHvp*d|hwvq|+rGVNk> zI0()WB5_hp5@Z)?CaoAx++ie<41iga+yhA~Q5%axENX-V2?QrqHNRj8{-jc)QPpXL zqKT-*S0})f4Ui2v01$^nt(8RCO!CZHqxoe+2~`QQQAJCDsuXF{T!*XdXjLK}Z&Xy3 zHpb&-UM|%=foy$twxzqfWq%Lf|Eq2G^f*XQN$uK?9*^wF1V&d)lS_KGx=aV(+v_*= z@qkA!Rn><#IP!c|hYiB53J6>5)9kvCExw_SlPaC^r13XSe-e= zEw0XR9l(QQoyZ{TdgrbO>(yd6!3>b~S&Y;*B9l_GgS3#x$?N1zLXtf06L+VmPN6DP z?TjY;HC95d#aKD1tZKC(1Y_I@>07(lw}bXRqr8OsUaw?{37(Q9`U`Toebk`#O$bP&BTaf5@^V&LlC71h8hp98O$AQev=m4 zq~)`7Hzze3$aoQ$hs=i4U_Sduls^o?1X4mpC>{?5D=UNLr=j^Ymk!w1a@*Q1NkO=YHgrZXwlrlG!}ZnU9cl&zBCf|Gvw zl(+s5Qi!3z=f*Q#`|p0wwI!i-wysTu``FL_!&KXW@^qs+>^|Y1c7N@@Rd`5j6wior z9^y%P-jl-8lJu9i##iMV_kAIk$&K=B%1PxM9i>_Ni}suU=GF_vQt|V}-)}pr5UM-DGUtWcYtclKv?+MufPnTAOnMs z2#~J=!t6&_m@;xpDu7}ZK>a{*MiDMX_Srf4$v|~}zCJ)jJs@n{4D}xYFyP~P0IJ>GkyE?l#ySTZyxw<)%+TUADYBn~Ex02?~gCoYM zavSTLNi*lA&zqSvcP@~z*;{0pxiTmqf%qYd;qiEWo39MqEIf3_dBoD}3+xH3ZZIsswfj ziV0c?b_u5lcZlYRZWDbV_CoxYfJKq!g$0 gNqLI$EtL(bJmC0sWjx3r3w902({QlaA@~R*02sP{-T(jq diff --git a/front/module-import.js b/front/module-import.js index 575787ee88..ec69401840 100755 --- a/front/module-import.js +++ b/front/module-import.js @@ -14,5 +14,6 @@ export default function moduleImport(moduleName) { case 'claim' : return import('claim/front'); case 'agency' : return import('agency/front'); case 'travel' : return import('travel/front'); + case 'worker' : return import('worker/front'); } } diff --git a/front/salix/locale/es.yml b/front/salix/locale/es.yml index 3caa41911a..7929ed9f17 100644 --- a/front/salix/locale/es.yml +++ b/front/salix/locale/es.yml @@ -12,6 +12,7 @@ Claims: Reclamaciones Data saved!: ¡Datos guardados! Home: Inicio Items: Artículos +Workers: Trabajadores Locator: Localizador Logout: Cerrar sesión Modules access : Acceso a módulos diff --git a/modules/agency/front/routes.json b/modules/agency/front/routes.json index a773c55526..708545fa66 100644 --- a/modules/agency/front/routes.json +++ b/modules/agency/front/routes.json @@ -3,6 +3,10 @@ "name": "Agencies", "icon" : "local_shipping", "validations" : true, + "menu": [ + {"state": "zone.card.basicData", "icon": "settings"}, + {"state": "zone.card.location", "icon": "my_location"} + ], "routes": [ { "url": "/zone", @@ -10,28 +14,24 @@ "abstract": true, "component": "ui-view", "description": "Zones" - }, - { + }, { "url": "/index?q", "state": "zone.index", "component": "vn-zone-index", "description": "Zones", "acl": ["developer"] - }, - { + }, { "url": "/create", "state": "zone.create", "component": "vn-zone-create", "description": "New zone" - }, - { + }, { "url": "/:id", "state": "zone.card", "component": "vn-zone-card", "abstract": true, "description": "Detail" - }, - { + }, { "url": "/location?q", "state": "zone.card.location", "component": "vn-zone-location", @@ -39,8 +39,7 @@ "params": { "zone": "$ctrl.zone" } - }, - { + }, { "url": "/basic-data", "state": "zone.card.basicData", "component": "vn-zone-basic-data", @@ -49,9 +48,5 @@ "zone": "$ctrl.zone" } } - ], - "menu": [ - {"state": "zone.card.basicData", "icon": "settings"}, - {"state": "zone.card.location", "icon": "my_location"} ] } \ No newline at end of file diff --git a/modules/claim/front/routes.json b/modules/claim/front/routes.json index b1ee4cc14c..eca447b903 100644 --- a/modules/claim/front/routes.json +++ b/modules/claim/front/routes.json @@ -4,6 +4,15 @@ "icon": "icon-claims", "validations": true, "dependencies": ["item", "client"], + "menu": [ + {"state": "claim.card.basicData", "icon": "settings"}, + {"state": "claim.card.detail", "icon": "icon-details"}, + {"state": "claim.card.development", "icon": "icon-traceability"}, + {"state": "claim.card.action", "icon": "icon-actions"} + ], + "keybindings": [ + {"key": "r", "state": "claim.index"} + ], "routes": [ { "url": "/claim", @@ -11,20 +20,17 @@ "abstract": true, "component": "ui-view", "description": "Claims" - }, - { + }, { "url": "/index?q", "state": "claim.index", "component": "vn-claim-index", "description": "Claims" - }, - { + }, { "url": "/:id", "state": "claim.card", "abstract": true, "component": "vn-claim-card" - }, - { + }, { "url": "/summary", "state": "claim.card.summary", "component": "vn-claim-summary", @@ -32,8 +38,7 @@ "params": { "claim": "$ctrl.claim" } - }, - { + }, { "url": "/basic-data", "state": "claim.card.basicData", "component": "vn-claim-basic-data", @@ -42,8 +47,7 @@ "claim": "$ctrl.claim" }, "acl": ["salesPerson"] - }, - { + }, { "url": "/detail", "state": "claim.card.detail", "component": "vn-claim-detail", @@ -52,8 +56,7 @@ "claim": "$ctrl.claim" }, "acl": ["salesPerson"] - }, - { + }, { "url": "/development", "state": "claim.card.development", "component": "vn-claim-development", @@ -62,8 +65,7 @@ "claim": "$ctrl.claim" }, "acl": ["salesAssistant"] - }, - { + }, { "url": "/action", "state": "claim.card.action", "component": "vn-claim-action", @@ -73,14 +75,5 @@ }, "acl": ["salesAssistant"] } - ], - "menu": [ - {"state": "claim.card.basicData", "icon": "settings"}, - {"state": "claim.card.detail", "icon": "icon-details"}, - {"state": "claim.card.development", "icon": "icon-traceability"}, - {"state": "claim.card.action", "icon": "icon-actions"} - ], - "keybindings": [ - {"key": "r", "state": "claim.index"} ] } \ No newline at end of file diff --git a/modules/client/front/routes.json b/modules/client/front/routes.json index db4feab0ee..1e7cf533c5 100644 --- a/modules/client/front/routes.json +++ b/modules/client/front/routes.json @@ -3,327 +3,6 @@ "name": "Clients", "icon": "person", "validations" : true, - "routes": [ - { - "url": "/client", - "state": "client", - "abstract": true, - "component": "ui-view", - "description": "Clients", - "acl": ["employee"] - }, - { - "url": "/index?q", - "state": "client.index", - "component": "vn-client-index", - "description": "Clients" - }, - { - "url": "/create", - "state": "client.create", - "component": "vn-client-create", - "description": "New client" - }, - { - "url": "/:id", - "state": "client.card", - "abstract": true, - "component": "vn-client-card" - }, - { - "url": "/summary", - "state": "client.card.summary", - "component": "vn-client-summary", - "description": "Summary", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/basic-data", - "state": "client.card.basicData", - "component": "vn-client-basic-data", - "description": "Basic data", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/fiscal-data", - "state": "client.card.fiscalData", - "component": "vn-client-fiscal-data", - "description": "Fiscal data", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/billing-data", - "state": "client.card.billingData", - "component": "vn-client-billing-data", - "description": "Pay method", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/address", - "state": "client.card.address", - "component": "ui-view", - "abstract": true - }, - { - "url": "/index", - "state": "client.card.address.index", - "component": "vn-client-address-index", - "description": "Addresses", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.address.create", - "component": "vn-client-address-create", - "description": "New address" - }, - { - "url": "/:addressId/edit", - "state": "client.card.address.edit", - "component": "vn-client-address-edit", - "description": "Edit address" - }, - { - "url": "/web-access", - "state": "client.card.webAccess", - "component": "vn-client-web-access", - "description": "Web access", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/note", - "state": "client.card.note", - "component": "ui-view", - "abstract": true - }, - { - "url": "/index", - "state": "client.card.note.index", - "component": "vn-client-note", - "description": "Notes", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.note.create", - "component": "vn-note-create", - "description": "New note" - }, - { - "url": "/credit", - "abstract": true, - "state": "client.card.credit", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.credit.index", - "component": "vn-client-credit-index", - "description": "Credits", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.credit.create", - "component": "vn-client-credit-create", - "description": "New credit", - "acl": ["teamBoss"], - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/greuge", - "abstract": true, - "state": "client.card.greuge", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.greuge.index", - "component": "vn-client-greuge-index", - "description": "Greuges", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.greuge.create", - "component": "vn-client-greuge-create", - "description": "New greuge", - "acl": ["salesAssistant"], - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/mandate", - "state": "client.card.mandate", - "component": "vn-client-mandate", - "description": "Mandates" - }, - { - "url": "/risk", - "abstract": true, - "state": "client.card.risk", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.risk.index", - "component": "vn-client-risk-index", - "description": "Balance", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create?payed&companyFk&bankFk&payedAmount", - "state": "client.card.risk.create", - "component": "vn-client-risk-create", - "description": "New payment", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/recovery", - "abstract": true, - "state": "client.card.recovery", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.recovery.index", - "component": "vn-client-recovery-index", - "description": "Recoveries", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.recovery.create", - "component": "vn-client-recovery-create", - "description": "New recovery", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/credit-insurance", - "abstract": true, - "state": "client.card.creditInsurance", - "component": "ui-view", - "acl": ["creditInsurance"] - }, - { - "url": "/index", - "state": "client.card.creditInsurance.index", - "component": "vn-client-credit-insurance-index", - "description": "Credit contracts", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.creditInsurance.create", - "component": "vn-client-credit-insurance-create", - "description": "New insurance", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/insurance", - "abstract": true, - "state": "client.card.creditInsurance.insurance", - "component": "ui-view", - "acl": ["creditInsurance"] - }, - { - "url": "/:classificationId/index", - "state": "client.card.creditInsurance.insurance.index", - "component": "vn-client-credit-insurance-insurance-index", - "description": "Requested credits", - "acl": ["creditInsurance"], - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/:classificationId/create", - "state": "client.card.creditInsurance.insurance.create", - "component": "vn-client-credit-insurance-insurance-create", - "description": "New credit", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/contact", - "state": "client.card.contact", - "component": "vn-client-contact", - "description": "Contacts", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/sample", - "abstract": true, - "state": "client.card.sample", - "component": "ui-view" - }, - { - "url": "/index", - "state": "client.card.sample.index", - "component": "vn-client-sample-index", - "description": "Samples", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/create", - "state": "client.card.sample.create", - "component": "vn-client-sample-create", - "description": "Send sample", - "params": { - "client": "$ctrl.client" - } - }, - { - "url": "/web-payment", - "state": "client.card.webPayment", - "component": "vn-client-web-payment", - "description": "Web Payment" - }, - { - "url" : "/log", - "state": "client.card.log", - "component": "vn-client-log", - "description": "Log" - } - ], "menu": [ {"state": "client.card.basicData", "icon": "settings"}, {"state": "client.card.fiscalData", "icon": "account_balance"}, @@ -350,5 +29,286 @@ ], "keybindings": [ {"key": "c", "state": "client.index"} + ], + "routes": [ + { + "url": "/client", + "state": "client", + "abstract": true, + "component": "ui-view", + "description": "Clients", + "acl": ["employee"] + }, { + "url": "/index?q", + "state": "client.index", + "component": "vn-client-index", + "description": "Clients" + }, { + "url": "/create", + "state": "client.create", + "component": "vn-client-create", + "description": "New client" + }, { + "url": "/:id", + "state": "client.card", + "abstract": true, + "component": "vn-client-card" + }, { + "url": "/summary", + "state": "client.card.summary", + "component": "vn-client-summary", + "description": "Summary", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/basic-data", + "state": "client.card.basicData", + "component": "vn-client-basic-data", + "description": "Basic data", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/fiscal-data", + "state": "client.card.fiscalData", + "component": "vn-client-fiscal-data", + "description": "Fiscal data", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/billing-data", + "state": "client.card.billingData", + "component": "vn-client-billing-data", + "description": "Pay method", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/address", + "state": "client.card.address", + "component": "ui-view", + "abstract": true + }, { + "url": "/index", + "state": "client.card.address.index", + "component": "vn-client-address-index", + "description": "Addresses", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.address.create", + "component": "vn-client-address-create", + "description": "New address" + }, { + "url": "/:addressId/edit", + "state": "client.card.address.edit", + "component": "vn-client-address-edit", + "description": "Edit address" + }, { + "url": "/web-access", + "state": "client.card.webAccess", + "component": "vn-client-web-access", + "description": "Web access", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/note", + "state": "client.card.note", + "component": "ui-view", + "abstract": true + }, { + "url": "/index", + "state": "client.card.note.index", + "component": "vn-client-note", + "description": "Notes", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.note.create", + "component": "vn-note-create", + "description": "New note" + }, { + "url": "/credit", + "abstract": true, + "state": "client.card.credit", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.credit.index", + "component": "vn-client-credit-index", + "description": "Credits", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.credit.create", + "component": "vn-client-credit-create", + "description": "New credit", + "acl": ["teamBoss"], + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/greuge", + "abstract": true, + "state": "client.card.greuge", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.greuge.index", + "component": "vn-client-greuge-index", + "description": "Greuges", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.greuge.create", + "component": "vn-client-greuge-create", + "description": "New greuge", + "acl": ["salesAssistant"], + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/mandate", + "state": "client.card.mandate", + "component": "vn-client-mandate", + "description": "Mandates" + }, { + "url": "/risk", + "abstract": true, + "state": "client.card.risk", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.risk.index", + "component": "vn-client-risk-index", + "description": "Balance", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create?payed&companyFk&bankFk&payedAmount", + "state": "client.card.risk.create", + "component": "vn-client-risk-create", + "description": "New payment", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/recovery", + "abstract": true, + "state": "client.card.recovery", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.recovery.index", + "component": "vn-client-recovery-index", + "description": "Recoveries", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.recovery.create", + "component": "vn-client-recovery-create", + "description": "New recovery", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/credit-insurance", + "abstract": true, + "state": "client.card.creditInsurance", + "component": "ui-view", + "acl": ["creditInsurance"] + }, { + "url": "/index", + "state": "client.card.creditInsurance.index", + "component": "vn-client-credit-insurance-index", + "description": "Credit contracts", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.creditInsurance.create", + "component": "vn-client-credit-insurance-create", + "description": "New insurance", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/insurance", + "abstract": true, + "state": "client.card.creditInsurance.insurance", + "component": "ui-view", + "acl": ["creditInsurance"] + }, { + "url": "/:classificationId/index", + "state": "client.card.creditInsurance.insurance.index", + "component": "vn-client-credit-insurance-insurance-index", + "description": "Requested credits", + "acl": ["creditInsurance"], + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/:classificationId/create", + "state": "client.card.creditInsurance.insurance.create", + "component": "vn-client-credit-insurance-insurance-create", + "description": "New credit", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/contact", + "state": "client.card.contact", + "component": "vn-client-contact", + "description": "Contacts", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/sample", + "abstract": true, + "state": "client.card.sample", + "component": "ui-view" + }, { + "url": "/index", + "state": "client.card.sample.index", + "component": "vn-client-sample-index", + "description": "Samples", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/create", + "state": "client.card.sample.create", + "component": "vn-client-sample-create", + "description": "Send sample", + "params": { + "client": "$ctrl.client" + } + }, { + "url": "/web-payment", + "state": "client.card.webPayment", + "component": "vn-client-web-payment", + "description": "Web Payment" + }, { + "url" : "/log", + "state": "client.card.log", + "component": "vn-client-log", + "description": "Log" + } ] } diff --git a/modules/item/front/routes.json b/modules/item/front/routes.json index 5fd5668967..b81625e061 100644 --- a/modules/item/front/routes.json +++ b/modules/item/front/routes.json @@ -4,119 +4,6 @@ "icon": "inbox", "validations" : true, "dependencies": ["client"], - "routes": [ - { - "url": "/item", - "state": "item", - "abstract": true, - "description": "Items", - "component": "ui-view" - }, - { - "url": "/index?q", - "state": "item.index", - "component": "vn-item-index", - "description": "Items" - }, - { - "url": "/create", - "state": "item.create", - "component": "vn-item-create", - "description": "New item" - }, - { - "url": "/:id", - "state": "item.card", - "abstract": true, - "component": "vn-item-card" - }, - { - "url" : "/data", - "state": "item.card.data", - "component": "vn-item-data", - "description": "Basic data", - "params": { - "item": "$ctrl.item" - }, - "acl": ["buyer"] - }, - { - "url" : "/tags", - "state": "item.card.tags", - "component": "vn-item-tags", - "description": "Tags", - "params": { - "item-tags": "$ctrl.itemTags" - }, - "acl": ["buyer"] - }, - { - "url" : "/tax", - "state": "item.card.tax", - "component": "vn-item-tax", - "description": "Tax", - "acl": ["administrative","buyer"] - }, - { - "url" : "/niche", - "state": "item.card.niche", - "component": "vn-item-niche", - "description": "Niches", - "params": { - "item": "$ctrl.item" - }, - "acl": ["buyer","replenisher"] - }, - { - "url" : "/botanical", - "state": "item.card.botanical", - "component": "vn-item-botanical", - "description": "Botanical", - "params": { - "item": "$ctrl.item" - }, - "acl": ["buyer"] - }, - { - "url" : "/barcode", - "state": "item.card.itemBarcode", - "component": "vn-item-barcode", - "description": "Barcodes", - "params": { - "item": "$ctrl.item" - }, - "acl": ["buyer","replenisher"] - }, - { - "url" : "/summary", - "state": "item.card.summary", - "component": "vn-item-summary", - "description": "Summary", - "params": { - "item": "$ctrl.item" - } - }, - { - "url" : "/diary?warehouseFk&ticketFk", - "state": "item.card.diary", - "component": "vn-item-diary", - "description": "Diary", - "params": { - "item": "$ctrl.item" - }, - "acl": ["employee"] - }, - { - "url" : "/last-entries", - "state": "item.card.last-entries", - "component": "vn-item-last-entries", - "description": "Last entries", - "params": { - "item": "$ctrl.item" - }, - "acl": ["employee"] - } - ], "menu": [ {"state": "item.card.data", "icon": "settings"}, {"state": "item.card.tags", "icon": "icon-tags"}, @@ -129,5 +16,106 @@ ], "keybindings": [ {"key": "a", "state": "item.index"} + ], + "routes": [ + { + "url": "/item", + "state": "item", + "abstract": true, + "description": "Items", + "component": "ui-view" + }, { + "url": "/index?q", + "state": "item.index", + "component": "vn-item-index", + "description": "Items" + }, { + "url": "/create", + "state": "item.create", + "component": "vn-item-create", + "description": "New item" + }, { + "url": "/:id", + "state": "item.card", + "abstract": true, + "component": "vn-item-card" + }, { + "url" : "/data", + "state": "item.card.data", + "component": "vn-item-data", + "description": "Basic data", + "params": { + "item": "$ctrl.item" + }, + "acl": ["buyer"] + }, { + "url" : "/tags", + "state": "item.card.tags", + "component": "vn-item-tags", + "description": "Tags", + "params": { + "item-tags": "$ctrl.itemTags" + }, + "acl": ["buyer"] + }, { + "url" : "/tax", + "state": "item.card.tax", + "component": "vn-item-tax", + "description": "Tax", + "acl": ["administrative","buyer"] + }, { + "url" : "/niche", + "state": "item.card.niche", + "component": "vn-item-niche", + "description": "Niches", + "params": { + "item": "$ctrl.item" + }, + "acl": ["buyer","replenisher"] + }, { + "url" : "/botanical", + "state": "item.card.botanical", + "component": "vn-item-botanical", + "description": "Botanical", + "params": { + "item": "$ctrl.item" + }, + "acl": ["buyer"] + }, { + "url" : "/barcode", + "state": "item.card.itemBarcode", + "component": "vn-item-barcode", + "description": "Barcodes", + "params": { + "item": "$ctrl.item" + }, + "acl": ["buyer","replenisher"] + }, { + "url" : "/summary", + "state": "item.card.summary", + "component": "vn-item-summary", + "description": "Summary", + "params": { + "item": "$ctrl.item" + } + }, { + "url" : "/diary?warehouseFk&ticketFk", + "state": "item.card.diary", + "component": "vn-item-diary", + "description": "Diary", + "params": { + "item": "$ctrl.item" + }, + "acl": ["employee"] + }, { + "url" : "/last-entries", + "state": "item.card.last-entries", + "component": "vn-item-last-entries", + "description": "Last entries", + "params": { + "item": "$ctrl.item" + }, + "acl": ["employee"] + } ] } \ No newline at end of file diff --git a/modules/order/front/routes.json b/modules/order/front/routes.json index 5431eda003..dda5ed6462 100644 --- a/modules/order/front/routes.json +++ b/modules/order/front/routes.json @@ -4,6 +4,12 @@ "icon": "shopping_cart", "validations": true, "dependencies": ["item", "ticket"], + "menu": [ + {"state": "order.card.basicData", "icon": "settings"}, + {"state": "order.card.catalog", "icon": "shopping_cart"}, + {"state": "order.card.volume", "icon": "icon-volume"}, + {"state": "order.card.line", "icon": "icon-lines"} + ], "routes": [ { "url": "/order", @@ -11,20 +17,17 @@ "abstract": true, "component": "ui-view", "description": "Orders" - }, - { + }, { "url": "/index?q", "state": "order.index", "component": "vn-order-index", "description": "Orders" - }, - { + }, { "url": "/:id", "state": "order.card", "abstract": true, "component": "vn-order-card" - }, - { + }, { "url": "/summary", "state": "order.card.summary", "component": "vn-order-summary", @@ -32,8 +35,7 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/catalog?category&type", "state": "order.card.catalog", "component": "vn-order-catalog", @@ -41,8 +43,7 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/volume", "state": "order.card.volume", "component": "vn-order-volume", @@ -50,8 +51,7 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/line", "state": "order.card.line", "component": "vn-order-line", @@ -59,14 +59,12 @@ "params": { "order": "$ctrl.order" } - }, - { + }, { "url": "/create?clientFk", "state": "order.create", "component": "vn-order-create", "description": "New order" - }, - { + }, { "url": "/basic-data", "state": "order.card.basicData", "component": "vn-order-basic-data", @@ -75,11 +73,5 @@ "order": "$ctrl.order" } } - ], - "menu": [ - {"state": "order.card.basicData", "icon": "settings"}, - {"state": "order.card.catalog", "icon": "shopping_cart"}, - {"state": "order.card.volume", "icon": "icon-volume"}, - {"state": "order.card.line", "icon": "icon-lines"} ] } \ No newline at end of file diff --git a/modules/ticket/front/routes.json b/modules/ticket/front/routes.json index 1d64252a64..091b84b2ec 100644 --- a/modules/ticket/front/routes.json +++ b/modules/ticket/front/routes.json @@ -4,228 +4,6 @@ "icon": "icon-ticket", "validations": true, "dependencies": ["item", "client"], - "routes": [ - { - "url": "/ticket", - "state": "ticket", - "abstract": true, - "component": "ui-view", - "description": "Tickets" - }, - { - "url": "/index?q", - "state": "ticket.index", - "component": "vn-ticket-index", - "description": "Tickets" - }, - { - "url": "/:id", - "state": "ticket.card", - "abstract": true, - "component": "vn-ticket-card" - }, - { - "url": "/summary", - "state": "ticket.card.summary", - "component": "vn-ticket-summary", - "description": "Summary", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/data", - "state": "ticket.card.data", - "component": "vn-ticket-data", - "abstract": true, - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/step-one", - "state": "ticket.card.data.stepOne", - "component": "vn-ticket-data-step-one", - "description": "Basic data", - "params": { - "ticket": "$ctrl.data" - } - }, - { - "url" : "/step-two", - "state": "ticket.card.data.stepTwo", - "component": "vn-ticket-data-step-two", - "description": "Price difference", - "params": { - "ticket": "$ctrl.data" - } - }, - { - "url" : "/step-three", - "state": "ticket.card.data.stepThree", - "component": "vn-ticket-data-step-three", - "description": "Charge", - "params": { - "ticket": "$ctrl.data" - } - }, - { - "url" : "/sale", - "state": "ticket.card.sale", - "component": "vn-ticket-sale", - "description": "Sale", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/observation", - "state": "ticket.card.observation", - "component": "vn-ticket-observation", - "description": "Notes", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/volume", - "state": "ticket.card.volume", - "component": "vn-ticket-volume", - "description": "Volume", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/expedition", - "state": "ticket.card.expedition", - "component": "vn-ticket-expedition", - "description": "Expedition", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/package", - "abstract": true, - "state": "ticket.card.package", - "component": "ui-view" - }, - { - "url" : "/index", - "state": "ticket.card.package.index", - "component": "vn-ticket-package-index", - "description": "Packages", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/tracking", - "state": "ticket.card.tracking", - "abstract": true, - "component": "ui-view" - }, - { - "url" : "/index", - "state": "ticket.card.tracking.index", - "component": "vn-ticket-tracking-index", - "description": "Tracking", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url": "/edit", - "state": "ticket.card.tracking.edit", - "component": "vn-ticket-tracking-edit", - "description": "New state", - "params": { - "ticket": "$ctrl.ticket" - }, - "acl": ["production", "administrative", "salesPerson"] - }, - { - "url" : "/sale-checked", - "state": "ticket.card.saleChecked", - "component": "vn-ticket-sale-checked", - "description": "Sale checked", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/components", - "state": "ticket.card.components", - "component": "vn-ticket-components", - "description": "Components", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/sale-tracking", - "state": "ticket.card.saleTracking", - "component": "vn-ticket-sale-tracking", - "description": "Sale tracking", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/picture", - "state": "ticket.card.picture", - "component": "vn-ticket-picture", - "description": "Pictures", - "params": { - "ticket": "$ctrl.ticket" - } - }, - { - "url" : "/log", - "state": "ticket.card.log", - "component": "vn-ticket-log", - "description": "Log" - }, - { - "url" : "/weekly", - "state": "ticket.weekly", - "component": "vn-ticket-weekly", - "description": "Weekly" - }, - { - "url": "/request", - "state": "ticket.card.request", - "abstract": true, - "component": "ui-view" - }, - { - "url": "/service", - "state": "ticket.card.service", - "component": "vn-ticket-service", - "description": "Service" - }, - { - "url" : "/index", - "state": "ticket.card.request.index", - "component": "vn-ticket-request-index", - "description": "Purchase request", - "acl": ["salesPerson"] - }, - { - "url" : "/create", - "state": "ticket.card.request.create", - "component": "vn-ticket-request-create", - "description": "Purchase request", - "acl": ["salesPerson"] - }, - { - "url": "/create?clientFk", - "state": "ticket.create", - "component": "vn-ticket-create", - "description": "New ticket" - } - ], "menu": [ {"state": "ticket.card.data.stepOne", "icon": "settings"}, {"state": "ticket.card.sale", "icon": "icon-lines"}, @@ -244,5 +22,200 @@ ], "keybindings": [ {"key": "t", "state": "ticket.index"} + ], + "routes": [ + { + "url": "/ticket", + "state": "ticket", + "abstract": true, + "component": "ui-view", + "description": "Tickets" + }, { + "url": "/index?q", + "state": "ticket.index", + "component": "vn-ticket-index", + "description": "Tickets" + }, { + "url": "/:id", + "state": "ticket.card", + "abstract": true, + "component": "vn-ticket-card" + }, { + "url": "/summary", + "state": "ticket.card.summary", + "component": "vn-ticket-summary", + "description": "Summary", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/data", + "state": "ticket.card.data", + "component": "vn-ticket-data", + "abstract": true, + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/step-one", + "state": "ticket.card.data.stepOne", + "component": "vn-ticket-data-step-one", + "description": "Basic data", + "params": { + "ticket": "$ctrl.data" + } + }, { + "url" : "/step-two", + "state": "ticket.card.data.stepTwo", + "component": "vn-ticket-data-step-two", + "description": "Price difference", + "params": { + "ticket": "$ctrl.data" + } + }, { + "url" : "/step-three", + "state": "ticket.card.data.stepThree", + "component": "vn-ticket-data-step-three", + "description": "Charge", + "params": { + "ticket": "$ctrl.data" + } + }, { + "url" : "/sale", + "state": "ticket.card.sale", + "component": "vn-ticket-sale", + "description": "Sale", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/observation", + "state": "ticket.card.observation", + "component": "vn-ticket-observation", + "description": "Notes", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/volume", + "state": "ticket.card.volume", + "component": "vn-ticket-volume", + "description": "Volume", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/expedition", + "state": "ticket.card.expedition", + "component": "vn-ticket-expedition", + "description": "Expedition", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/package", + "abstract": true, + "state": "ticket.card.package", + "component": "ui-view" + }, { + "url" : "/index", + "state": "ticket.card.package.index", + "component": "vn-ticket-package-index", + "description": "Packages", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/tracking", + "state": "ticket.card.tracking", + "abstract": true, + "component": "ui-view" + }, { + "url" : "/index", + "state": "ticket.card.tracking.index", + "component": "vn-ticket-tracking-index", + "description": "Tracking", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url": "/edit", + "state": "ticket.card.tracking.edit", + "component": "vn-ticket-tracking-edit", + "description": "New state", + "params": { + "ticket": "$ctrl.ticket" + }, + "acl": ["production", "administrative", "salesPerson"] + }, { + "url" : "/sale-checked", + "state": "ticket.card.saleChecked", + "component": "vn-ticket-sale-checked", + "description": "Sale checked", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/components", + "state": "ticket.card.components", + "component": "vn-ticket-components", + "description": "Components", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/sale-tracking", + "state": "ticket.card.saleTracking", + "component": "vn-ticket-sale-tracking", + "description": "Sale tracking", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/picture", + "state": "ticket.card.picture", + "component": "vn-ticket-picture", + "description": "Pictures", + "params": { + "ticket": "$ctrl.ticket" + } + }, { + "url" : "/log", + "state": "ticket.card.log", + "component": "vn-ticket-log", + "description": "Log" + }, { + "url" : "/weekly", + "state": "ticket.weekly", + "component": "vn-ticket-weekly", + "description": "Weekly" + }, { + "url": "/request", + "state": "ticket.card.request", + "abstract": true, + "component": "ui-view" + }, { + "url": "/service", + "state": "ticket.card.service", + "component": "vn-ticket-service", + "description": "Service" + }, { + "url" : "/index", + "state": "ticket.card.request.index", + "component": "vn-ticket-request-index", + "description": "Purchase request", + "acl": ["salesPerson"] + }, { + "url" : "/create", + "state": "ticket.card.request.create", + "component": "vn-ticket-request-create", + "description": "Purchase request", + "acl": ["salesPerson"] + }, { + "url": "/create?clientFk", + "state": "ticket.create", + "component": "vn-ticket-create", + "description": "New ticket" + } ] } \ No newline at end of file diff --git a/modules/travel/front/routes.json b/modules/travel/front/routes.json index 0271c6486a..979ae361a1 100644 --- a/modules/travel/front/routes.json +++ b/modules/travel/front/routes.json @@ -9,8 +9,7 @@ "abstract": true, "component": "ui-view", "description": "Travels" - }, - { + }, { "url": "/index?q", "state": "travel.index", "component": "vn-travel-index", diff --git a/back/methods/worker-mana/getCurrentWorkerMana.js b/modules/worker/back/methods/worker-mana/getCurrentWorkerMana.js similarity index 100% rename from back/methods/worker-mana/getCurrentWorkerMana.js rename to modules/worker/back/methods/worker-mana/getCurrentWorkerMana.js diff --git a/back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js b/modules/worker/back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js similarity index 100% rename from back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js rename to modules/worker/back/methods/worker-mana/specs/getCurrentWorkerMana.spec.js diff --git a/modules/worker/back/model-config.json b/modules/worker/back/model-config.json new file mode 100644 index 0000000000..0967ef424b --- /dev/null +++ b/modules/worker/back/model-config.json @@ -0,0 +1 @@ +{} diff --git a/back/models/worker-mana.js b/modules/worker/back/models/worker-mana.js similarity index 100% rename from back/models/worker-mana.js rename to modules/worker/back/models/worker-mana.js diff --git a/back/models/worker-mana.json b/modules/worker/back/models/worker-mana.json similarity index 100% rename from back/models/worker-mana.json rename to modules/worker/back/models/worker-mana.json diff --git a/back/models/worker-team-collegues.json b/modules/worker/back/models/worker-team-collegues.json similarity index 100% rename from back/models/worker-team-collegues.json rename to modules/worker/back/models/worker-team-collegues.json diff --git a/back/models/worker-team.json b/modules/worker/back/models/worker-team.json similarity index 100% rename from back/models/worker-team.json rename to modules/worker/back/models/worker-team.json diff --git a/back/models/worker.json b/modules/worker/back/models/worker.json similarity index 100% rename from back/models/worker.json rename to modules/worker/back/models/worker.json diff --git a/modules/worker/front/basic-data/index.html b/modules/worker/front/basic-data/index.html new file mode 100644 index 0000000000..391628ecf9 --- /dev/null +++ b/modules/worker/front/basic-data/index.html @@ -0,0 +1,32 @@ + + + +
+ + + + + + + + + + + +
diff --git a/modules/worker/front/basic-data/index.js b/modules/worker/front/basic-data/index.js new file mode 100644 index 0000000000..3b324a17c7 --- /dev/null +++ b/modules/worker/front/basic-data/index.js @@ -0,0 +1,29 @@ +import ngModule from '../module'; + +class Controller { + constructor($, $state) { + Object.assign(this, { + $, + $state + }); + } + + onSubmit() { + this.$.watcher.submit().then(() => { + this.card.reload(); + }); + } +} + +Controller.$inject = ['$scope', '$state']; + +ngModule.component('vnWorkerBasicData', { + template: require('./index.html'), + controller: Controller, + bindings: { + worker: '<' + }, + require: { + card: '^vnWorkerCard' + } +}); diff --git a/modules/worker/front/card/index.html b/modules/worker/front/card/index.html new file mode 100644 index 0000000000..c7c2f5b413 --- /dev/null +++ b/modules/worker/front/card/index.html @@ -0,0 +1,7 @@ + +
+ + +
+
+
diff --git a/modules/worker/front/card/index.js b/modules/worker/front/card/index.js new file mode 100644 index 0000000000..1e574aa1c2 --- /dev/null +++ b/modules/worker/front/card/index.js @@ -0,0 +1,28 @@ +import ngModule from '../module'; + +class Controller { + constructor($http, $stateParams) { + Object.assign(this, { + $http, + $stateParams, + }); + } + + $onInit() { + this.reload(); + } + + reload() { + let query = `api/Workers/${this.$stateParams.id}`; + this.$http.get(query).then(res => { + this.worker = res.data; + }); + } +} + +Controller.$inject = ['$http', '$stateParams']; + +ngModule.component('vnWorkerCard', { + template: require('./index.html'), + controller: Controller +}); diff --git a/modules/worker/front/descriptor/index.html b/modules/worker/front/descriptor/index.html new file mode 100644 index 0000000000..9fdb87c1d2 --- /dev/null +++ b/modules/worker/front/descriptor/index.html @@ -0,0 +1,21 @@ +
+ + + + + + + + + +
+ + + + + + +
+
\ No newline at end of file diff --git a/modules/worker/front/descriptor/index.js b/modules/worker/front/descriptor/index.js new file mode 100644 index 0000000000..c8c2cb5e6b --- /dev/null +++ b/modules/worker/front/descriptor/index.js @@ -0,0 +1,8 @@ +import ngModule from '../module'; + +ngModule.component('vnWorkerDescriptor', { + template: require('./index.html'), + bindings: { + worker: '<' + } +}); diff --git a/modules/worker/front/index.js b/modules/worker/front/index.js new file mode 100644 index 0000000000..8b0bf8c6d9 --- /dev/null +++ b/modules/worker/front/index.js @@ -0,0 +1,8 @@ +export * from './module'; + +import './index/'; +import './summary'; +import './card'; +import './descriptor'; +import './search-panel'; +import './basic-data'; diff --git a/modules/worker/front/index/index.html b/modules/worker/front/index/index.html new file mode 100644 index 0000000000..137543771d --- /dev/null +++ b/modules/worker/front/index/index.html @@ -0,0 +1,59 @@ + + +
+
+ + + + + + + + +
{{::$ctrl.worker.name}}
+ + + + +
+ + + + +
+
+ + No results + + + Enter a new search + +
+ +
+
+ + + + + \ No newline at end of file diff --git a/modules/worker/front/index/index.js b/modules/worker/front/index/index.js new file mode 100644 index 0000000000..6619250afa --- /dev/null +++ b/modules/worker/front/index/index.js @@ -0,0 +1,38 @@ +import ngModule from '../module'; + +export default class Controller { + constructor($) { + Object.assign(this, { + $, + selectedWorker: null + }); + } + + exprBuilder(param, value) { + switch (param) { + case 'search': + return /^\d+$/.test(value) + ? {id: value} + : {name: {like: `%${value}%`}}; + case 'name': + return {[param]: {like: `%${value}%`}}; + case 'id': + return {[param]: value}; + } + } + + preview(event, worker) { + if (event.defaultPrevented) return; + event.preventDefault(); + this.selectedWorker = worker; + this.$.preview.show(); + event.stopImmediatePropagation(); + } +} + +Controller.$inject = ['$scope']; + +ngModule.component('vnWorkerIndex', { + template: require('./index.html'), + controller: Controller +}); diff --git a/modules/worker/front/locale/en.yml b/modules/worker/front/locale/en.yml new file mode 100644 index 0000000000..0d0641a66c --- /dev/null +++ b/modules/worker/front/locale/en.yml @@ -0,0 +1 @@ +Workers: Workers \ No newline at end of file diff --git a/modules/worker/front/locale/es.yml b/modules/worker/front/locale/es.yml new file mode 100644 index 0000000000..32af56e169 --- /dev/null +++ b/modules/worker/front/locale/es.yml @@ -0,0 +1 @@ +Workers: Trabajadores \ No newline at end of file diff --git a/modules/worker/front/module.js b/modules/worker/front/module.js new file mode 100644 index 0000000000..938d468920 --- /dev/null +++ b/modules/worker/front/module.js @@ -0,0 +1,3 @@ +import {ng} from 'core/vendor'; + +export default ng.module('worker', ['vnCore']); diff --git a/modules/worker/front/routes.json b/modules/worker/front/routes.json new file mode 100644 index 0000000000..e13413d0fe --- /dev/null +++ b/modules/worker/front/routes.json @@ -0,0 +1,46 @@ +{ + "module": "worker", + "name": "Workers", + "icon" : "icon-worker", + "validations" : true, + "menu": [ + {"state": "worker.card.basicData", "icon": "settings"} + ], + "routes": [ + { + "url": "/worker", + "state": "worker", + "abstract": true, + "component": "ui-view", + "description": "Workers" + }, { + "url": "/index?q", + "state": "worker.index", + "component": "vn-worker-index", + "description": "Workers", + "acl": ["developer"] + }, { + "url" : "/summary", + "state": "worker.card.summary", + "component": "vn-worker-summary", + "description": "Summary", + "params": { + "worker": "$ctrl.worker" + } + }, { + "url": "/:id", + "state": "worker.card", + "component": "vn-worker-card", + "abstract": true, + "description": "Detail" + }, { + "url": "/basic-data", + "state": "worker.card.basicData", + "component": "vn-worker-basic-data", + "description": "Basic data", + "params": { + "worker": "$ctrl.worker" + } + } + ] +} \ No newline at end of file diff --git a/modules/worker/front/search-panel/index.html b/modules/worker/front/search-panel/index.html new file mode 100644 index 0000000000..02b8bcb368 --- /dev/null +++ b/modules/worker/front/search-panel/index.html @@ -0,0 +1,27 @@ +
+
+ + + + + + + + + + + + + +
+
\ No newline at end of file diff --git a/modules/worker/front/search-panel/index.js b/modules/worker/front/search-panel/index.js new file mode 100644 index 0000000000..ef85c998b5 --- /dev/null +++ b/modules/worker/front/search-panel/index.js @@ -0,0 +1,7 @@ +import ngModule from '../module'; +import SearchPanel from 'core/components/searchbar/search-panel'; + +ngModule.component('vnWorkerSearchPanel', { + template: require('./index.html'), + controller: SearchPanel +}); diff --git a/modules/worker/front/summary/index.html b/modules/worker/front/summary/index.html new file mode 100644 index 0000000000..63dae45d41 --- /dev/null +++ b/modules/worker/front/summary/index.html @@ -0,0 +1,15 @@ + +
{{worker.name}}
+ + + + + + + + + + +
\ No newline at end of file diff --git a/modules/worker/front/summary/index.js b/modules/worker/front/summary/index.js new file mode 100644 index 0000000000..20b08c7abe --- /dev/null +++ b/modules/worker/front/summary/index.js @@ -0,0 +1,34 @@ +import ngModule from '../module'; + +class Controller { + constructor($, $http) { + Object.assign(this, { + $, + $http + }); + } + + get worker() { + return this._worker; + } + + set worker(value) { + this._worker = value; + this.$.worker = null; + if (value) { + this.$http.get(`api/Workers/${value.id}`).then(res => { + this.$.worker = res.data; + }); + } + } +} + +Controller.$inject = ['$scope', '$http']; + +ngModule.component('vnWorkerSummary', { + template: require('./index.html'), + controller: Controller, + bindings: { + worker: '<' + } +});