From 935860247107819ad4e91680d20677876b3b9fc4 Mon Sep 17 00:00:00 2001 From: Joan Sanchez Date: Tue, 8 Oct 2019 13:03:19 +0200 Subject: [PATCH] #15 Updated changes width dev --- back/models/account.js | 24 +- .../core/components/crud-model/crud-model.js | 4 +- front/core/components/data-viewer/index.html | 2 +- front/core/components/date-picker/style.scss | 2 +- front/core/components/index.js | 1 + front/core/components/label-value/style.scss | 3 - front/core/components/list/index.js | 1 + .../components/list/style.scss} | 2 +- front/core/components/searchbar/style.scss | 2 +- front/core/components/step-control/style.scss | 9 - front/core/components/subtitle/subtitle.html | 2 +- front/core/components/title/title.html | 2 +- front/core/directives/uvc.html | 4 +- front/core/directives/zoom-image.js | 8 +- .../{styles => directives}/zoom-image.scss | 6 +- front/{salix => core}/styles/background.scss | 2 +- front/core/styles/border.scss | 23 ++ front/{salix => core}/styles/effects.scss | 1 - front/{salix => core}/styles/font-family.scss | 6 + .../styles/fonts/Roboto-Bold.ttf | Bin .../styles/fonts/Roboto-Medium.ttf | Bin .../styles/fonts/Roboto-Regular.ttf | Bin .../{ => icons}/Material-Design-Icons.woff2 | Bin front/core/styles/{ => icons}/salixfont.css | 0 front/core/styles/{ => icons}/salixfont.svg | 0 front/core/styles/{ => icons}/salixfont.ttf | Bin front/core/styles/{ => icons}/salixfont.woff | Bin front/core/styles/index.js | 13 +- front/{salix => core}/styles/layout.scss | 5 - front/core/styles/mdi-override.css | 6 - front/core/styles/mdl-override.scss | 67 ++-- front/{salix => core}/styles/responsive.scss | 0 front/core/styles/spacing.scss | 355 ++++++++++++++++++ front/core/styles/text.scss | 72 ++++ front/{salix => core}/styles/variables.scss | 22 +- front/{salix => core}/styles/width.scss | 0 front/salix/components/app/style.scss | 6 +- front/salix/components/descriptor/index.js | 1 + .../descriptor/style.scss} | 10 +- front/salix/components/index.js | 2 + .../salix/components/left-menu/left-menu.html | 2 +- .../salix/components/main-menu/main-menu.html | 4 +- front/salix/components/main-menu/main-menu.js | 9 +- .../components/main-menu/main-menu.spec.js | 4 +- front/salix/components/summary/index.js | 1 + .../summary/style.scss} | 8 +- .../user-configuration-popover/index.html | 18 +- .../user-configuration-popover/locale/es.yml | 1 + .../user-configuration-popover/style.scss | 27 +- front/salix/styles/border.scss | 23 -- front/salix/styles/display.scss | 35 -- front/salix/styles/font-style.scss | 16 - front/salix/styles/index.js | 16 +- front/salix/styles/margin.scss | 138 ------- front/salix/styles/misc.scss | 71 ++-- front/salix/styles/modal-form.scss | 27 +- front/salix/styles/order-product.scss | 10 +- front/salix/styles/padding.scss | 85 ----- front/salix/styles/photo-list.scss | 4 +- front/salix/styles/title.scss | 28 -- loopback/locale/en.json | 3 +- modules/agency/front/basic-data/index.html | 2 +- modules/agency/front/calendar/index.html | 4 +- modules/agency/front/create/index.html | 2 +- modules/agency/front/delivery-days/index.html | 4 +- modules/agency/front/edit/index.html | 2 +- modules/agency/front/events/index.html | 6 +- modules/agency/front/events/style.scss | 4 +- modules/agency/front/index/index.html | 6 +- .../front/location-search-panel/index.html | 2 +- modules/agency/front/location/index.html | 4 +- modules/agency/front/main/style.scss | 2 +- modules/agency/front/search-panel/index.html | 2 +- modules/agency/front/summary/index.html | 2 +- modules/claim/front/action/index.html | 6 +- modules/claim/front/basic-data/index.html | 6 +- modules/claim/front/detail/index.html | 10 +- modules/claim/front/development/index.html | 6 +- modules/claim/front/dms/index/style.scss | 4 +- modules/claim/front/index/index.html | 5 +- modules/claim/front/search-panel/index.html | 2 +- .../client/front/address/create/index.html | 12 +- modules/client/front/address/edit/index.html | 12 +- modules/client/front/address/index/index.html | 15 +- modules/client/front/address/index/style.scss | 2 +- .../client/front/balance/create/index.html | 4 +- modules/client/front/balance/index/index.html | 2 +- modules/client/front/basic-data/index.html | 2 +- modules/client/front/billing-data/index.html | 10 +- modules/client/front/contact/index.html | 4 +- modules/client/front/create/index.html | 16 +- .../front/credit-insurance/create/index.html | 2 +- .../front/credit-insurance/index/index.html | 13 +- .../insurance/create/index.html | 2 +- .../insurance/index/index.html | 2 +- modules/client/front/credit/create/index.html | 2 +- modules/client/front/dms/create/index.html | 8 +- modules/client/front/dms/edit/index.html | 8 +- modules/client/front/fiscal-data/index.html | 10 +- modules/client/front/greuge/create/index.html | 2 +- modules/client/front/greuge/index/index.html | 2 +- modules/client/front/index/index.html | 4 +- modules/client/front/note/create/index.html | 2 +- modules/client/front/note/index/index.html | 11 +- modules/client/front/postcode/index.html | 2 +- .../client/front/recovery/create/index.html | 2 +- modules/client/front/sample/create/index.html | 2 +- modules/client/front/search-panel/index.html | 2 +- modules/client/front/sms/index.html | 2 +- modules/client/front/web-access/index.html | 4 +- modules/invoiceOut/front/index/index.html | 5 +- .../invoiceOut/front/search-panel/index.html | 2 +- modules/item/front/barcode/index.html | 2 +- modules/item/front/basic-data/index.html | 2 +- modules/item/front/botanical/index.html | 2 +- modules/item/front/create/index.html | 2 +- modules/item/front/diary/index.html | 2 +- modules/item/front/index/index.html | 5 +- modules/item/front/last-entries/index.html | 2 +- modules/item/front/last-entries/style.scss | 2 +- modules/item/front/niche/index.html | 2 +- .../front/request-search-panel/index.html | 4 +- modules/item/front/request/index.html | 10 +- modules/item/front/search-panel/index.html | 4 +- modules/item/front/tags/index.html | 2 +- modules/item/front/tax/index.html | 2 +- modules/order/front/basic-data/index.html | 2 +- .../front/catalog-search-panel/index.html | 4 +- modules/order/front/catalog/index.html | 6 +- modules/order/front/catalog/style.scss | 6 +- modules/order/front/create/index.html | 2 +- modules/order/front/filter/style.scss | 12 +- modules/order/front/index/index.html | 5 +- modules/order/front/line/index.html | 2 +- modules/order/front/prices-popover/index.html | 2 +- modules/order/front/search-panel/index.html | 2 +- modules/order/front/summary/index.html | 6 +- modules/order/front/volume/index.html | 2 +- modules/route/front/basic-data/index.html | 2 +- modules/route/front/create/index.html | 2 +- modules/route/front/index/index.html | 6 +- modules/route/front/search-panel/index.html | 2 +- modules/route/front/tickets/index.html | 4 +- .../front/basic-data/step-one/index.html | 2 +- .../front/basic-data/step-three/index.html | 2 +- .../front/basic-data/step-two/index.html | 2 +- modules/ticket/front/component/index.html | 2 +- modules/ticket/front/create/index.html | 2 +- .../ticket/front/descriptor/addStowaway.html | 51 +-- modules/ticket/front/descriptor/index.html | 2 +- .../front/descriptor/removeStowaway.html | 4 +- modules/ticket/front/dms/create/index.html | 8 +- modules/ticket/front/dms/edit/index.html | 8 +- modules/ticket/front/dms/index/index.html | 2 +- modules/ticket/front/expedition/index.html | 4 +- modules/ticket/front/index/index.html | 17 +- modules/ticket/front/index/style.scss | 6 + modules/ticket/front/note/index.html | 8 +- modules/ticket/front/package/index.html | 4 +- modules/ticket/front/picture/index.html | 2 +- .../ticket/front/request/create/index.html | 4 +- modules/ticket/front/request/index/index.html | 2 +- modules/ticket/front/sale-checked/index.html | 2 +- modules/ticket/front/sale-tracking/index.html | 2 +- modules/ticket/front/sale/editDiscount.html | 4 +- modules/ticket/front/sale/index.html | 14 +- modules/ticket/front/search-panel/index.html | 2 +- modules/ticket/front/services/index.html | 10 +- modules/ticket/front/tracking/edit/index.html | 2 +- .../ticket/front/tracking/index/index.html | 2 +- modules/ticket/front/volume/index.html | 2 +- modules/ticket/front/weekly/create/index.html | 2 +- modules/ticket/front/weekly/index/index.html | 6 +- modules/travel/front/index/index.html | 5 +- modules/travel/front/search-panel/index.html | 2 +- modules/worker/front/account/index.html | 33 ++ modules/worker/front/basic-data/index.html | 2 +- modules/worker/front/calendar/index.html | 4 +- modules/worker/front/calendar/style.scss | 2 +- modules/worker/front/department/index.html | 4 +- modules/worker/front/index/index.html | 4 +- modules/worker/front/pbx/index.html | 2 +- modules/worker/front/search-panel/index.html | 2 +- modules/worker/front/summary/index.html | 2 +- modules/worker/front/time-control/index.html | 8 +- webpack.config.js | 2 +- 186 files changed, 1003 insertions(+), 801 deletions(-) create mode 100644 front/core/components/list/index.js rename front/{salix/styles/list.scss => core/components/list/style.scss} (96%) rename front/core/{styles => directives}/zoom-image.scss (100%) rename front/{salix => core}/styles/background.scss (98%) create mode 100644 front/core/styles/border.scss rename front/{salix => core}/styles/effects.scss (99%) rename front/{salix => core}/styles/font-family.scss (58%) rename front/{salix => core}/styles/fonts/Roboto-Bold.ttf (100%) rename front/{salix => core}/styles/fonts/Roboto-Medium.ttf (100%) rename front/{salix => core}/styles/fonts/Roboto-Regular.ttf (100%) rename front/core/styles/{ => icons}/Material-Design-Icons.woff2 (100%) rename front/core/styles/{ => icons}/salixfont.css (100%) rename front/core/styles/{ => icons}/salixfont.svg (100%) rename front/core/styles/{ => icons}/salixfont.ttf (100%) rename front/core/styles/{ => icons}/salixfont.woff (100%) rename front/{salix => core}/styles/layout.scss (89%) delete mode 100644 front/core/styles/mdi-override.css rename front/{salix => core}/styles/responsive.scss (100%) create mode 100644 front/core/styles/spacing.scss create mode 100644 front/core/styles/text.scss rename front/{salix => core}/styles/variables.scss (92%) rename front/{salix => core}/styles/width.scss (100%) create mode 100644 front/salix/components/descriptor/index.js rename front/salix/{styles/descriptor.scss => components/descriptor/style.scss} (90%) create mode 100644 front/salix/components/summary/index.js rename front/salix/{styles/summary.scss => components/summary/style.scss} (91%) delete mode 100644 front/salix/styles/border.scss delete mode 100644 front/salix/styles/display.scss delete mode 100644 front/salix/styles/font-style.scss delete mode 100644 front/salix/styles/margin.scss delete mode 100644 front/salix/styles/padding.scss delete mode 100644 front/salix/styles/title.scss create mode 100644 modules/worker/front/account/index.html diff --git a/back/models/account.js b/back/models/account.js index 40b7e9c12..9e6ecba45 100644 --- a/back/models/account.js +++ b/back/models/account.js @@ -23,15 +23,13 @@ module.exports = Self => { description: 'Gets the current user data', accepts: [ { - arg: 'context', - type: 'object', - http: function(ctx) { - return ctx; - } + arg: 'ctx', + type: 'Object', + http: {source: 'context'} } ], returns: { - type: 'object', + type: 'Object', root: true }, http: { @@ -41,12 +39,18 @@ module.exports = Self => { }); Self.getCurrentUserData = async function(ctx) { - let filter = {fields: ['name']}; let userId = ctx.req.accessToken.userId; - let account = await Self.findById(userId, filter); - let worker = await Self.app.models.Worker.findOne({where: {userFk: userId}, fields: ['id']}); - return {accountName: account.name, workerId: worker.id}; + let account = await Self.findById(userId, { + fields: ['id', 'name', 'nickname'] + }); + + let worker = await Self.app.models.Worker.findOne({ + fields: ['id'], + where: {userFk: userId} + }); + + return Object.assign(account, {workerId: worker.id}); }; /** diff --git a/front/core/components/crud-model/crud-model.js b/front/core/components/crud-model/crud-model.js index 0839881ab..41b5390a7 100644 --- a/front/core/components/crud-model/crud-model.js +++ b/front/core/components/crud-model/crud-model.js @@ -208,7 +208,9 @@ export default class CrudModel extends ModelProxy { this.cancelRequest(); this.canceler = this.$q.defer(); this.isPaging = append; - if (!append) this.status = 'loading'; + + if (!append && this.status != 'ready') + this.status = 'loading'; let params = Object.assign( {filter}, diff --git a/front/core/components/data-viewer/index.html b/front/core/components/data-viewer/index.html index dd696fda3..8c843d869 100644 --- a/front/core/components/data-viewer/index.html +++ b/front/core/components/data-viewer/index.html @@ -2,7 +2,7 @@
+ class="vn-pt-md">
section { content: ':'; } } - & > span { - color: $color-font; - } & > vn-icon { vertical-align: middle; color: $color-font-secondary; diff --git a/front/core/components/list/index.js b/front/core/components/list/index.js new file mode 100644 index 000000000..423b033ce --- /dev/null +++ b/front/core/components/list/index.js @@ -0,0 +1 @@ +import './style.scss'; diff --git a/front/salix/styles/list.scss b/front/core/components/list/style.scss similarity index 96% rename from front/salix/styles/list.scss rename to front/core/components/list/style.scss index 3a6d0d6d9..7560d3288 100644 --- a/front/salix/styles/list.scss +++ b/front/core/components/list/style.scss @@ -14,7 +14,7 @@ color: inherit; & > vn-horizontal { - padding: $pad-medium; + padding: $spacing-md; & > vn-one { overflow: hidden; diff --git a/front/core/components/searchbar/style.scss b/front/core/components/searchbar/style.scss index e663f7cb9..3915c2089 100644 --- a/front/core/components/searchbar/style.scss +++ b/front/core/components/searchbar/style.scss @@ -13,6 +13,6 @@ vn-searchbar { max-height: 48em; & > form { - padding: $pad-large; + padding: $spacing-lg; } } \ No newline at end of file diff --git a/front/core/components/step-control/style.scss b/front/core/components/step-control/style.scss index f020a31f6..e1c29c9a2 100644 --- a/front/core/components/step-control/style.scss +++ b/front/core/components/step-control/style.scss @@ -12,31 +12,25 @@ vn-step-control { display: flex; flex-direction: row } - & > .steps > .step { justify-content: center; min-width: 125px; display: flex; flex: auto } - & > .steps > .step .circle { border: 2px solid $color-main; background-color: white; align-content: center; margin-top: -9.5px; - -moz-border-radius: 50%; - -webkit-border-radius: 50%; border-radius: 50%; cursor: pointer; height: 15px; width: 15px } - & > .steps > .step .circle.active { background-color: $color-main; } - & > .buttons { display: flex; flex: auto; @@ -44,11 +38,9 @@ vn-step-control { justify-content: space-between; margin-top: 10px } - & > .buttons > .step { display: flex } - & > .buttons > .step > .mdl-button { line-height: 32px; font-size: 12px; @@ -56,5 +48,4 @@ vn-step-control { height: 32px } } - } \ No newline at end of file diff --git a/front/core/components/subtitle/subtitle.html b/front/core/components/subtitle/subtitle.html index ac00ac0c2..40c244006 100644 --- a/front/core/components/subtitle/subtitle.html +++ b/front/core/components/subtitle/subtitle.html @@ -1,2 +1,2 @@ -
+
\ No newline at end of file diff --git a/front/core/components/title/title.html b/front/core/components/title/title.html index 773b40040..cfdad746f 100644 --- a/front/core/components/title/title.html +++ b/front/core/components/title/title.html @@ -1,3 +1,3 @@ -

+

\ No newline at end of file diff --git a/front/core/directives/uvc.html b/front/core/directives/uvc.html index 0248aefc1..907ea6f2a 100644 --- a/front/core/directives/uvc.html +++ b/front/core/directives/uvc.html @@ -8,10 +8,10 @@ class="modal-form" vn-id="uvc"> - +
Fields to show
-
+
.body { - padding: $pad-small; + padding: $spacing-sm; & > * { - padding: $pad-small; + padding: $spacing-sm; } & > .attributes > h5 { - padding-bottom: $pad-small; + padding-bottom: $spacing-sm; text-overflow: ellipsis; white-space: nowrap; overflow: hidden; @@ -45,7 +45,7 @@ padding: 0; & > vn-icon { - padding: $pad-small; + padding: $spacing-sm; color: $color-secondary; font-size: 1.5em; @@ -62,7 +62,7 @@ padding: 0; & > a { - padding: $pad-small; + padding: $spacing-sm; & > vn-icon { font-size: 1.8em; diff --git a/front/salix/components/index.js b/front/salix/components/index.js index a5ce18e4c..a61b037b0 100644 --- a/front/salix/components/index.js +++ b/front/salix/components/index.js @@ -7,3 +7,5 @@ import './side-menu/side-menu'; import './left-menu/left-menu'; import './topbar/topbar'; import './user-configuration-popover'; +import './descriptor'; +import './summary'; diff --git a/front/salix/components/left-menu/left-menu.html b/front/salix/components/left-menu/left-menu.html index 31dcb7903..12cea49a3 100644 --- a/front/salix/components/left-menu/left-menu.html +++ b/front/salix/components/left-menu/left-menu.html @@ -1,4 +1,4 @@ -
-