diff --git a/.github/workflows/CI-time-tracker-ui.yml b/.github/workflows/CI-time-tracker-ui.yml index da410589a..f63625e00 100644 --- a/.github/workflows/CI-time-tracker-ui.yml +++ b/.github/workflows/CI-time-tracker-ui.yml @@ -48,8 +48,8 @@ jobs: STACK_EXCHANGE_ACCESS_TOKEN: ${{ secrets.STACK_EXCHANGE_ACCESS_TOKEN }} AZURE_APP_CONFIGURATION_CONNECTION_STRING: ${{ secrets.AZURE_APP_CONFIGURATION_CONNECTION_STRING }} run: | - chmod +x ./scripts/populate-keys.sh - sh ./scripts/populate-keys.sh + chmod +x ./scripts/populate-var-file.sh + sh ./scripts/populate-var-file.sh - name: Running tests run: npm run ci-test --if-present diff --git a/Makefile b/Makefile index f465cfed1..98d231b11 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ cleanup: ## Delete image timetracker_ui .PHONY: run run: ## Execute timetracker_ui docker containe. - docker-compose --env-file ./.env up -d + docker-compose up -d .PHONY: logs logs: ## Show logs of timetracker_ui. @@ -40,12 +40,12 @@ remove: ## Delete container timetracker_ui. .PHONY: test test: ## Run all tests on docker container timetracker_ui at the CLI. - docker-compose -f docker-compose.yml --env-file ./.env up -d + docker-compose -f docker-compose.yml up -d docker exec timetracker_ui bash -c "npm run ci-test" .PHONY: testdev testdev: ## Run all tests on docker container timetracker_ui at the Dev - docker-compose -f docker-compose.yml -f docker-compose.dev.yml --env-file ./.env up -d + docker-compose -f docker-compose.yml -f docker-compose.dev.yml up -d docker exec timetracker_ui bash -c "npm run ci-test" .PHONY: publish diff --git a/scripts/populate-var-file.sh b/scripts/populate-var-file.sh new file mode 100644 index 000000000..f395689af --- /dev/null +++ b/scripts/populate-var-file.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +> src/environments/keys.ts +echo 'export const AUTHORITY = "'$AUTHORITY'";' >> src/environments/keys.ts +echo 'export const CLIENT_ID = "'$CLIENT_ID'";' >> src/environments/keys.ts +echo 'export const SCOPES = ["'$SCOPES'"];' >> src/environments/keys.ts +echo 'export const STACK_EXCHANGE_ID = "'$STACK_EXCHANGE_ID'";' >> src/environments/keys.ts +echo 'export const STACK_EXCHANGE_ACCESS_TOKEN = "'$STACK_EXCHANGE_ACCESS_TOKEN'";' >> src/environments/keys.ts +echo 'export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = "'$AZURE_APP_CONFIGURATION_CONNECTION_STRING'";' >> src/environments/keys.ts +cat src/environments/keys.ts diff --git a/scripts/setenv.ts b/scripts/setenv.ts index 0c07a1b30..659a587b2 100644 --- a/scripts/setenv.ts +++ b/scripts/setenv.ts @@ -1,14 +1,13 @@ const { writeFile } = require('fs'); -require('dotenv').config(); const pathJs = `./src/environments/keys.ts` -const contentKeys = -`export const AUTHORITY = '${process.env.AUTHORITY}'; -export const CLIENT_ID = '${process.env.CLIENT_ID}'; -export const SCOPES = ['${process.env.SCOPES}']; -export const STACK_EXCHANGE_ID = '${process.env.STACK_EXCHANGE_ID}'; -export const STACK_EXCHANGE_ACCESS_TOKEN = '${process.env.STACK_EXCHANGE_ACCESS_TOKEN}'; -export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = '${process.env.AZURE_APP_CONFIGURATION_CONNECTION_STRING}'; +const contentKeys = +`export const AUTHORITY = '${process.env["AUTHORITY"]}'; +export const CLIENT_ID = '${process.env["CLIENT_ID"]}'; +export const SCOPES = ['${process.env["SCOPES"]}']; +export const STACK_EXCHANGE_ID = '${process.env["STACK_EXCHANGE_ID"]}'; +export const STACK_EXCHANGE_ACCESS_TOKEN = '${process.env["STACK_EXCHANGE_ACCESS_TOKEN"]}'; +export const AZURE_APP_CONFIGURATION_CONNECTION_STRING = '${process.env["AZURE_APP_CONFIGURATION_CONNECTION_STRING"]}'; `; writeFile(pathJs, contentKeys, function (err) { @@ -19,7 +18,7 @@ writeFile(pathJs, contentKeys, function (err) { }); const pathJson = `./src/environments/.keys.json` -const contentKeysJson = +const contentKeysJson = `{ "authority": "${process.env.AUTHORITY_JSON}", "client_id": "${process.env.CLIENT_ID_JSON}", diff --git a/src/app/modules/reports/components/time-entries-table/time-entries-table.component.html b/src/app/modules/reports/components/time-entries-table/time-entries-table.component.html index 9b4880904..c473ee890 100644 --- a/src/app/modules/reports/components/time-entries-table/time-entries-table.component.html +++ b/src/app/modules/reports/components/time-entries-table/time-entries-table.component.html @@ -1,9 +1,5 @@
- @@ -25,7 +21,7 @@ - + - - + +
{{ entry.id }} {{ entry.owner_email }} @@ -48,14 +44,14 @@ {{ entry.description }} + {{ entry.description }} -
- {{ technology }} -
+
+ {{ technology }} +
-
diff --git a/src/app/modules/reports/components/time-entries-table/time-entries-table.component.scss b/src/app/modules/reports/components/time-entries-table/time-entries-table.component.scss index 0708ffecd..06fbd51b5 100644 --- a/src/app/modules/reports/components/time-entries-table/time-entries-table.component.scss +++ b/src/app/modules/reports/components/time-entries-table/time-entries-table.component.scss @@ -1,30 +1,68 @@ @import '../../../../../styles/colors.scss'; -.col{ + +.col { white-space: nowrap; overflow: hidden; - text-overflow: ellipsis; font-size: small; } -.x-sm-col{ + +.col-height { + min-height: auto; + max-height: 8rem; +} + +.x-sm-col { width: 5em; max-width: 7em; } -.sm-col{ +.sm-col { width: 6em; max-width: 8em; } -.md-col{ +.md-col { width: 9em; } -.lg-col{ +.lg-col { width: 12em; overflow: hidden; white-space: normal; + border: none; +} + +@mixin scroll-style { + width: 40em; + overflow: hidden; + white-space: normal; + display: -webkit-box; + -webkit-box-orient: vertical; + margin: 8px 10px 0px 10px; + border: none; + overflow-y: auto; + overflow-wrap: break-word; + + &::-webkit-scrollbar { + width: 0.5em; + } + + &::-webkit-scrollbar-track { + box-shadow: inset 0 0 6px rgba(0, 0, 0, 0.3); + } + + &::-webkit-scrollbar-thumb { + background-color: #7a8486; + outline: 1px solid #7a8486; + border-radius: 0.5em; + } } -.hidden-col{ + +.lg-scroll { + @include scroll-style; +} + +.hidden-col { display: none; } @@ -94,4 +132,4 @@ table.dataTable thead .sorting_desc { text-transform: capitalize; font-style: italic; cursor: pointer; -} +} \ No newline at end of file