diff --git a/client/client/src/web-payment/style.scss b/client/client/src/web-payment/style.scss index dbbd120c9..b010ca444 100644 --- a/client/client/src/web-payment/style.scss +++ b/client/client/src/web-payment/style.scss @@ -2,7 +2,7 @@ vn-client-web-payment { vn-icon[icon=clear] { - color: $alert01; + color: $alert-01; } vn-icon[icon=check] { color: $main-02; diff --git a/client/core/src/components/table/style.scss b/client/core/src/components/table/style.scss index c8facf5ea..59753f001 100644 --- a/client/core/src/components/table/style.scss +++ b/client/core/src/components/table/style.scss @@ -99,21 +99,21 @@ vn-table { vn-thead, vn-tbody, vn-empty-rows { border-bottom: 3px solid $lines; } - vn-tbody > vn-tr, vn-tbody > a.vn-tr { + vn-tbody > vn-tr, vn-tbody > a.vn-tr{ border-bottom: 1px solid $lines; transition: background-color 200ms ease-in-out; &.clickable { @extend %clickable; } - &.success { + &.success, & > vn-td.success { background-color: rgba(163, 209, 49, 0.3); &:hover { background-color: rgba(163, 209, 49, 0.5); } } - &.warning { + &.warning, & > vn-td.warning { background-color: rgba(247, 147, 30, 0.3); &:hover { diff --git a/client/salix/src/styles/colors.scss b/client/salix/src/styles/colors.scss index e7d29c2d9..d610b4919 100644 --- a/client/salix/src/styles/colors.scss +++ b/client/salix/src/styles/colors.scss @@ -14,7 +14,9 @@ $main-03: #32b1ce; $main-03-05: rgba($main-03, 0.5); $main-03-03: rgba($main-03, 0.3); $lines: #9b9b9b; -$alert01: #f42121; +$alert-01: #f42121; +$alert-01-03: rgba($alert-01, 0.5); +$alert-01-05: rgba($alert-01, 0.5); $color-green: #a3d131; $color-orange: #f7931e; diff --git a/client/salix/src/styles/font-style.scss b/client/salix/src/styles/font-style.scss index 462023eca..609f98696 100644 --- a/client/salix/src/styles/font-style.scss +++ b/client/salix/src/styles/font-style.scss @@ -9,8 +9,10 @@ html [uppercase], .uppercase { text-transform: uppercase; } -html [green], .green{color: $color-green} html [orange], .orange{color: $main-01} +html [green], .green{color: $main-02} +html [blue], .blue{color: $main-03} +html [red], html [alert], .red, .alert {color: $alert-01} html [white], .white{color: $color-white} html [dark], .dark{color: $color-dark} html [dark-grey], .dark-grey{color: $color-dark-grey} diff --git a/client/ticket/src/index/index.html b/client/ticket/src/index/index.html index 68660380d..0aab6e4e5 100644 --- a/client/ticket/src/index/index.html +++ b/client/ticket/src/index/index.html @@ -50,10 +50,8 @@ - + {{::ticket.id}} {{::ticket.salesPerson | dashIfEmpty}} - {{::ticket.shipped | dateTime: 'dd/MM/yyyy'}} + + {{::ticket.shipped | dateTime: 'dd/MM/yyyy'}} + {{::ticket.shipped | dateTime: 'HH:mm'}} {{::ticket.province}} - {{::ticket.state}} + {{::ticket.state}} {{::ticket.agencyMode}} {{::ticket.warehouse}} {{::ticket.refFk | dashIfEmpty}} diff --git a/client/ticket/src/index/index.js b/client/ticket/src/index/index.js index 37cc9d1e7..ba0b6dc6c 100644 --- a/client/ticket/src/index/index.js +++ b/client/ticket/src/index/index.js @@ -58,6 +58,17 @@ export default class Controller { return 'success'; } + stateColor(ticket) { + if (ticket.alertLevelCode === 'OK') + return 'alertOk'; + else if (ticket.alertLevelCode === 'FREE') + return 'alertFree'; + else if (ticket.alertLevel === 1) + return 'alert1'; + else if (ticket.alertLevel === 0) + return 'alert0'; + } + showDescriptor(event, clientFk) { event.preventDefault(); event.stopImmediatePropagation(); diff --git a/client/ticket/src/index/style.scss b/client/ticket/src/index/style.scss index bc06b4f20..4583a1378 100644 --- a/client/ticket/src/index/style.scss +++ b/client/ticket/src/index/style.scss @@ -9,4 +9,32 @@ vn-ticket-index{ color: initial; } } + + .alert1 { + background-color: $main-01-03; + &:hover { + background-color: $main-01-05; + } + } + + .alertOk { + background-color: $main-02-03; + &:hover { + background-color: $main-02-05; + } + } + + .alertFree { + background-color: $main-03-03; + &:hover { + background-color: $main-03-05; + } + } + + .alert0 { + background-color: $alert-01-03; + &:hover { + background-color: $alert-01-05; + } + } } \ No newline at end of file diff --git a/client/ticket/src/request/index/index.html b/client/ticket/src/request/index/index.html index 85b7e89a6..894aaccde 100644 --- a/client/ticket/src/request/index/index.html +++ b/client/ticket/src/request/index/index.html @@ -35,10 +35,10 @@ {{::request.id}} {{::request.description}} {{::request.created | dateTime: 'dd/MM/yyyy'}} - {{::request.requester.firstName}} {{::request.requester.name}} - {{::request.atender.firstName}} {{::request.atender.name}} + {{::request.requester.user.name}} + {{::request.atender.user.name}} {{::request.quantity}} - {{::request.price}} + {{::request.price | currency: '€': 2}} + + { arg: 'orderFk', type: 'Number', description: `The order id filter` + }, { + arg: 'alertLevel', + type: 'Number', + description: `The alert level of the tickets` } ], returns: { @@ -132,6 +136,8 @@ module.exports = Self => { return {'ts.stateFk': value}; case 'myTeam': return {'c.salesPersonFk': {inq: teamIds}}; + case 'alertLevel': + return {'ts.alertLevel': value}; case 'id': case 'clientFk': case 'agencyModeFk': @@ -164,7 +170,10 @@ module.exports = Self => { w.name AS warehouse, am.name AS agencyMode, st.name AS state, - wk.name AS salesPerson + wk.name AS salesPerson, + ts.stateFk as stateFk, + ts.alertLevel as alertLevel, + ts.code as alertLevelCode FROM ticket t LEFT JOIN address a ON a.id = t.addressFk LEFT JOIN province p ON p.id = a.provinceFk diff --git a/services/loopback/common/models/alert-level.json b/services/loopback/common/models/alert-level.json new file mode 100644 index 000000000..75b5a9c46 --- /dev/null +++ b/services/loopback/common/models/alert-level.json @@ -0,0 +1,29 @@ +{ + "name": "AlertLevel", + "description": "Alert levels of a ticket", + "base": "VnModel", + "options": { + "mysql": { + "table": "alertLevel" + } + }, + "properties": { + "code": { + "type": "String", + "id": true, + "description": "Identifier" + }, + "alertLevel": { + "type": "Number", + "id": true + } + }, + "acls": [ + { + "accessType": "READ", + "principalType": "ROLE", + "principalId": "$everyone", + "permission": "ALLOW" + } + ] + } \ No newline at end of file