diff --git a/CHANGELOG.md b/CHANGELOG.md index eebd9f5..8c53bcd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ > All notable changes to this project will be documented in this file. +## [0.7.1] - 2022-11-06 + +- Use select instead of inputs in transportation problem tabs +- Fix assignment problem page styles +- Fix spelling on the home page & and add new example +- Fix white background at the top in Safari browsers + ## [0.7.0] - 2022-10-30 - Add second phase support for transportation problem on API and UI side diff --git a/apps/frontend/src/app/pages/assignment-problem/assignment-problem.style.scss b/apps/frontend/src/app/pages/assignment-problem/assignment-problem.style.scss index d31c4bc..69a4e01 100644 --- a/apps/frontend/src/app/pages/assignment-problem/assignment-problem.style.scss +++ b/apps/frontend/src/app/pages/assignment-problem/assignment-problem.style.scss @@ -1,7 +1,31 @@ @import 'libs/shared/styles/colors'; -form { - padding: 16px env(safe-area-inset-right) 16px 16px; +:host { + .content-wrapper { + padding: 8px calc(env(safe-area-inset-right) + 8px) 8px 8px; + } + + section { + display: flex; + flex-wrap: wrap; + align-items: center; + justify-content: center; + + article { + display: flex; + flex-direction: column; + } + + article.assignment-table-wrapper { + display: grid; + padding: 8px; + overflow-x: auto; + } + } + + mat-form-field { + margin: 8px; + } mat-hint { display: block; @@ -13,20 +37,17 @@ form { } } - .assignment-table-wrapper { - padding: 8px 0; - overflow-y: auto; + button[type='submit'] { + margin: 8px; } -} - -button[type='submit'] { - margin: 8px 16px 0 0; -} -.wrapper { - padding-bottom: 16px; -} + .wrapper { + display: flex; + justify-content: center; + padding: 8px; + } -.result-table { - padding: 8px; + .result-table { + padding: 8px 0; + } } diff --git a/apps/frontend/src/app/pages/assignment-problem/assignment-problem.template.html b/apps/frontend/src/app/pages/assignment-problem/assignment-problem.template.html index e80a8d4..04ab75a 100644 --- a/apps/frontend/src/app/pages/assignment-problem/assignment-problem.template.html +++ b/apps/frontend/src/app/pages/assignment-problem/assignment-problem.template.html @@ -1,4 +1,4 @@ -
+
- - {{ 'ASSIGNMENT_PROBLEM.TABLE_SIZE_SELECT' | translate }} - - 3 - 4 - 5 - 6 - - -
- + +
+ + {{ 'ASSIGNMENT_PROBLEM.TABLE_SIZE_SELECT' | translate }} + + 3 + 4 + 5 + 6 + + +
+ +
+
+
+ + +
+ +
+

+ {{'ASSIGNMENT_PROBLEM.RESULT_INFO' | translate}} +

+
- - - -
-

- {{'ASSIGNMENT_PROBLEM.RESULT_INFO' | translate}} -

-
diff --git a/apps/frontend/src/app/pages/home/home.template.html b/apps/frontend/src/app/pages/home/home.template.html index 18a46ef..8be5a48 100644 --- a/apps/frontend/src/app/pages/home/home.template.html +++ b/apps/frontend/src/app/pages/home/home.template.html @@ -30,7 +30,17 @@

{{'HOME.HELPERS_LIST.TRANSPORTATION_PR.ALL' | translate}}

Transportation page example + +
+

+ {{'HOME.HELPERS_LIST.TRANSPORTATION_PR.SECOND_PHASE' | translate}} +

+ Transportation page second phase tab example
@@ -38,7 +48,7 @@

{{'HOME.HELPERS_LIST.TRANSPORTATION_PR.EPSILON' | translate}}

Transportation page example
diff --git a/apps/frontend/src/app/pages/transport-problem/+first-phase-result-input/first-phase-result-input.template.html b/apps/frontend/src/app/pages/transport-problem/+first-phase-result-input/first-phase-result-input.template.html index 11d2842..cc2e658 100644 --- a/apps/frontend/src/app/pages/transport-problem/+first-phase-result-input/first-phase-result-input.template.html +++ b/apps/frontend/src/app/pages/transport-problem/+first-phase-result-input/first-phase-result-input.template.html @@ -12,29 +12,37 @@ >{{'TRANSPORTATION_PROBLEM.COLUMNS_SELECT' | translate}} - + formControlName="shops" + > + 3 + 4 + 5 + 6 + 7 + 8 + {{'TRANSPORTATION_PROBLEM.ROWS_SELECT' | translate}} - + formControlName="storages" + > + 3 + 4 + 5 + 6 + 7 + 8 + { }); it('should change number of shops', async () => { - const input = await loader.getHarness( - MatInputHarness.with({ + const shopSelect = await loader.getHarness( + MatSelectHarness.with({ selector: '[data-test-id="number-of-shops-input"]', }), ); - await input.setValue('3'); - expect(component.formGroup.get('shops')?.value).toEqual(3); + await shopSelect.open(); + const storageSizes = await shopSelect.getOptions(); + expect(storageSizes.length).toEqual(6); + expect(await storageSizes[0].getText()).toEqual('3'); + expect(await storageSizes[5].getText()).toEqual('8'); }); it('should change number of storages', async () => { - const input = await loader.getHarness( - MatInputHarness.with({ + const storageSelect = await loader.getHarness( + MatSelectHarness.with({ selector: '[data-test-id="number-of-storages-input"]', }), ); - await input.setValue('3'); - expect(component.formGroup.get('storages')?.value).toEqual(3); + await storageSelect.open(); + const storageSizes = await storageSelect.getOptions(); + expect(storageSizes.length).toEqual(6); + expect(await storageSizes[0].getText()).toEqual('3'); + expect(await storageSizes[5].getText()).toEqual('8'); }); it('should check method options', async () => { diff --git a/apps/frontend/src/app/pages/transport-problem/+tabs/all-tab/all.tab.template.html b/apps/frontend/src/app/pages/transport-problem/+tabs/all-tab/all.tab.template.html index 888c709..ca17496 100644 --- a/apps/frontend/src/app/pages/transport-problem/+tabs/all-tab/all.tab.template.html +++ b/apps/frontend/src/app/pages/transport-problem/+tabs/all-tab/all.tab.template.html @@ -15,29 +15,37 @@ {{'TRANSPORTATION_PROBLEM.COLUMNS_SELECT' | translate}} - + formControlName="shops" + > + 3 + 4 + 5 + 6 + 7 + 8 + {{'TRANSPORTATION_PROBLEM.ROWS_SELECT' | translate}} - + formControlName="storages" + > + 3 + 4 + 5 + 6 + 7 + 8 +