From 96f603a44b0fcb2d36b6dafa85bfca38fc2dbf4c Mon Sep 17 00:00:00 2001 From: bernat Date: Fri, 4 Dec 2020 13:40:58 +0100 Subject: [PATCH] refactor descriptors --- e2e/paths/04-item/12_descriptor.spec.js | 15 +++------------ .../05-ticket/01-sale/02_edit_sale.spec.js | 1 - e2e/paths/05-ticket/12_descriptor.spec.js | 6 +----- front/core/styles/icons/salixfont.css | 14 ++++++++++---- front/core/styles/icons/salixfont.svg | 6 ++++-- front/core/styles/icons/salixfont.ttf | Bin 32980 -> 34968 bytes front/core/styles/icons/salixfont.woff | Bin 33056 -> 35044 bytes front/salix/components/descriptor/style.scss | 8 ++------ modules/account/front/descriptor/index.html | 4 ++-- modules/client/front/descriptor/index.html | 10 +++++----- modules/entry/front/descriptor/index.html | 4 ++-- modules/item/front/descriptor/index.html | 2 +- modules/route/front/descriptor/index.html | 2 +- modules/supplier/front/descriptor/index.html | 4 ++-- modules/ticket/front/descriptor/index.html | 10 +++++----- 15 files changed, 38 insertions(+), 48 deletions(-) diff --git a/e2e/paths/04-item/12_descriptor.spec.js b/e2e/paths/04-item/12_descriptor.spec.js index 7c6fa074c8..eb9ed25732 100644 --- a/e2e/paths/04-item/12_descriptor.spec.js +++ b/e2e/paths/04-item/12_descriptor.spec.js @@ -16,14 +16,6 @@ describe('Item descriptor path', () => { await browser.close(); }); - it('should check the descriptor inactive icon is dark as the item is active', async() => { - await page.waitForSelector(selectors.itemDescriptor.inactiveIcon); - await page.waitForClassNotPresent(selectors.itemDescriptor.inactiveIcon, 'bright'); - const darkIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon); - - expect(darkIcon).toBeTruthy(); - }); - it('should set the item to inactive', async() => { await page.waitToClick(selectors.itemBasicData.isActiveCheckbox); await page.waitToClick(selectors.itemBasicData.submitBasicDataButton); @@ -32,12 +24,11 @@ describe('Item descriptor path', () => { expect(message.text).toContain('Data saved!'); }); - it('should reload the section and check the inactive icon is bright', async() => { + it('should reload the section and check the inactive icon is visible', async() => { await page.reloadSection('item.card.basicData'); - await page.waitForClassPresent(selectors.itemDescriptor.inactiveIcon, 'bright'); - const brightIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon); + const visibleIcon = await page.isVisible(selectors.itemDescriptor.inactiveIcon); - expect(brightIcon).toBeTruthy(); + expect(visibleIcon).toBeTruthy(); }); it('should set the item back to active', async() => { diff --git a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js index 248f38927a..d0c0cfeda8 100644 --- a/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js +++ b/e2e/paths/05-ticket/01-sale/02_edit_sale.spec.js @@ -397,6 +397,5 @@ describe('Ticket Edit sale path', () => { it(`should check the ticket is deleted`, async() => { await page.waitForSelector(selectors.ticketDescriptor.isDeletedIcon); - await page.waitForClassPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright'); }); }); diff --git a/e2e/paths/05-ticket/12_descriptor.spec.js b/e2e/paths/05-ticket/12_descriptor.spec.js index c426f7d7f3..1c78953824 100644 --- a/e2e/paths/05-ticket/12_descriptor.spec.js +++ b/e2e/paths/05-ticket/12_descriptor.spec.js @@ -56,7 +56,7 @@ describe('Ticket descriptor path', () => { await page.write(selectors.ticketsIndex.topbarSearch, '18'); await page.waitToClick(selectors.globalItems.searchButton); await page.waitForState('ticket.card.summary'); - await page.waitForClassPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright'); + await page.isVisible(selectors.ticketDescriptor.isDeletedIcon); const result = await page.waitToGetProperty(selectors.ticketsIndex.searchResultDate, 'innerText'); expect(result).toContain(2000); @@ -73,10 +73,6 @@ describe('Ticket descriptor path', () => { expect(message.text).toContain('Data saved!'); }); - - it('should make sure the ticketDeleted icon is no longer bright', async() => { - await page.waitForClassNotPresent(selectors.ticketDescriptor.isDeletedIcon, 'bright'); - }); }); describe('Add stowaway', () => { diff --git a/front/core/styles/icons/salixfont.css b/front/core/styles/icons/salixfont.css index aafc549a12..bdd37b2902 100644 --- a/front/core/styles/icons/salixfont.css +++ b/front/core/styles/icons/salixfont.css @@ -22,10 +22,18 @@ -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; } +.icon-invoiceIn:before { + content: "\e960"; + color: #5f5f5f; +} +.icon-invoiceOut:before { + content: "\e961"; + color: #5f5f5f; +} .icon-supplier:before { content: "\e936"; } -.icon-latestBuys:before { +.icon-latestBuy:before { content: "\e95f"; } .icon-zone:before { @@ -99,6 +107,7 @@ } .icon-invoices:before { content: "\e91c"; + color: #5f5f5f; } .icon-pets:before { content: "\e94e"; @@ -295,9 +304,6 @@ .icon-stowaway:before { content: "\e92c"; } -.icon-supplier:before { - content: "\e936"; -} .icon-tags:before { content: "\e937"; } diff --git a/front/core/styles/icons/salixfont.svg b/front/core/styles/icons/salixfont.svg index ee14609a40..ca547518dd 100644 --- a/front/core/styles/icons/salixfont.svg +++ b/front/core/styles/icons/salixfont.svg @@ -35,7 +35,7 @@ - + @@ -61,7 +61,7 @@ - + @@ -103,6 +103,8 @@ + + diff --git a/front/core/styles/icons/salixfont.ttf b/front/core/styles/icons/salixfont.ttf index 6958c0e3dd4cfaa662de976ebb1ce9e38a78daec..2d986be4172f153eeb1f7b6d537fcc0461635e00 100644 GIT binary patch delta 3014 zcmb_eZ){Ul6u+nU?Y_R(*KJ+@&2BAgyS|Q&j;`(ciYr}}MbWSbABMUJWD~{+f3~>A zO~QB+1m_14G9}7~eIUjUKr&(zLLxCl6B8pUDlv$OQKBCdqhB!b&sIJ6b(Mi*K-|lH z@7{avJ?EZ#?)m-hyY#&2^&_Ukem#8d3qqil5VCn|_uv55mDnG{+PrngbG>^9KQ&>0 zoRED_^=;|i?D=WaC?Wg5$MIAj3dHvXm5>*>etqB0p^-OUv@~HqhdOWW=zqHVl_yVM zBIE#{e`#m;$N<@IdX|ubXR%+mt9$2`>WzLf-u@k z#JCgTnA!-jWJ@gB%w<_9$+Dnj0S&r+fCVQvV@Vn+s9z3ZvEXXh;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QvvLNMibeqe zJgAsg6F@4FB`cayB+-mEsUT!Gdiy;3XPBNR2_?;BHCactU~+0M(S>JQgvSq-vrWlF*>>nuzi|vDwi#(WOyLO(P5O$T8wBryX;o1VTLf zR)A;=P;Zx`>l2Kpp39<#;Be$F3mq+)jWtzMEa;kWOoZEQ-{W2fsVqO+e^69JW~O66 zbMG~oQzc@mG%|Uh@(MT`(3(VjGKdi(M;3<3}+&yVV>l9Emj>@ z8(oDqCJfSsR>%qrkIRplwF1<5GbE6g~a0(b1yc;%2-7F8>29D#wXrwy->EX3?T!(%k`E79A}c=ia2ZhRZ@|Im%I@S{Sp` z;+3!AUkS-h^}l7V{51EoYja8J4`SiJpoDz))AP?1zT>a&(O~=d7%Q6rR~#dlP$YkFj^RcKkD&&Fp5K#7?r#u504f1Y=4#fU6{+s7+%*od_jO zP%ALBirW&>9(t%{kob*&A`S?NN=6(2p+F_nLj`FSA@L&wC88G&NR&gPG%ybEG~YbU z_rCXL=4ocL&b)P&k)C~|SOgGIJA;9{gU`S<`$lyx+S^~SZ~3)Gm)GxR~LH$sO2evcX5V!=2&_DDCMSU;%W<1kA3&x;==J0 z^z@*<{W?6-cm>AUZRt+)6S&Y}GhpiPHI8G~fCiohfT%;}K4||tD?^Hyh323n52ZC# z>2!+zpkyjZs5=_fvQ-n+2o&isMKuQH7*$#}oSZDN?d_F!!r88!-0+@k_BJ{~YJ9?{i8G-}Hdb{#I24!f`duPG-CS^^4mm9^bnFk)G~zZWE>7&7A$W_U^&+7O>27k zV#1S0E9^a9HJ*f)Qb9L*97S&>tsudX`|Y*wywMMpSrc~tHx5|j~?7J+q>2`()U#|mi#gG^?){T hXrMZXhMo#q6ZTSu+skEF@6F^6?*8YQrt94I@E_0--$wud diff --git a/front/salix/components/descriptor/style.scss b/front/salix/components/descriptor/style.scss index 814df2ca50..f7055c0fc1 100644 --- a/front/salix/components/descriptor/style.scss +++ b/front/salix/components/descriptor/style.scss @@ -71,13 +71,9 @@ vn-descriptor-content { & > vn-icon { padding: $spacing-xs $spacing-sm; - color: $color-marginal; font-size: 1.5rem; - - &.bright { - color: $color-main; - opacity: 1; - } + color: $color-main; + opacity: 1; } } & > .quicklinks { diff --git a/modules/account/front/descriptor/index.html b/modules/account/front/descriptor/index.html index 50e4d21773..a1ce252a63 100644 --- a/modules/account/front/descriptor/index.html +++ b/modules/account/front/descriptor/index.html @@ -78,12 +78,12 @@ + ng-if="!$ctrl.user.active"> + ng-if="$ctrl.hasAccount"> diff --git a/modules/client/front/descriptor/index.html b/modules/client/front/descriptor/index.html index 634436395e..dc79d224b0 100644 --- a/modules/client/front/descriptor/index.html +++ b/modules/client/front/descriptor/index.html @@ -47,27 +47,27 @@ + ng-if="$ctrl.client.isActive == false"> + ng-if="$ctrl.client.isFreezed == true"> + ng-if="$ctrl.client.account.active == false"> + ng-if="$ctrl.client.debt > $ctrl.client.credit"> + ng-if="$ctrl.client.isTaxDataChecked == false">