From 2a867f2a71bac49285a7143bc88f4fdd8f1588d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=AF=E6=9C=AC=20=E9=96=8B?= Date: Thu, 26 Oct 2023 08:20:32 +0000 Subject: [PATCH 1/3] =?UTF-8?q?Merged=20PR=20533:=20STG=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=AE=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E3=81=8C?= =?UTF-8?q?=E9=96=93=E9=81=95=E3=81=A3=E3=81=9F=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=82=92=E8=AA=AD=E3=81=BE=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2956: STGビルドの環境変数が間違ったファイルを読まないよう修正する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2956) - .envを上書きする方法から、VITEが本来想定しているビルド指定方法へ修正 - STGパイプラインでも `npm run build:stg` を使用するよう修正 ## レビューポイント - 修正方針に問題はないか ## 動作確認状況 - ローカルで動作する所まで確認 --- azure-pipelines-staging.yml | 4 ++-- dictation_client/package.json | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/azure-pipelines-staging.yml b/azure-pipelines-staging.yml index b8e341e..faef499 100644 --- a/azure-pipelines-staging.yml +++ b/azure-pipelines-staging.yml @@ -122,7 +122,7 @@ jobs: displayName: Bash Script inputs: targetType: inline - script: cd dictation_client && cp -f .env.$(environment) .env && npm run build + script: cd dictation_client && npm run build:stg - task: ArchiveFiles@2 inputs: rootFolderOrFile: dictation_client/build @@ -167,7 +167,7 @@ jobs: displayName: Bash Script inputs: targetType: inline - script: cd dictation_client && cp -f .env.$(environment) .env && npm run build + script: cd dictation_client && npm run build:prod - task: ArchiveFiles@2 inputs: rootFolderOrFile: dictation_client/build diff --git a/dictation_client/package.json b/dictation_client/package.json index b2283f6..8da7f1a 100644 --- a/dictation_client/package.json +++ b/dictation_client/package.json @@ -7,9 +7,10 @@ }, "scripts": { "start": "vite", - "build": "tsc && vite build", - "build:prod": "tsc && vite build", - "build:local": "tsc && vite build && sh localdeploy.sh", + "build": "tsc && vite build -- --mode development", + "build:stg": "tsc && vite build -- --mode staging", + "build:prod": "tsc && vite build -- --mode production", + "build:local": "tsc && vite build -- --mode development && sh localdeploy.sh", "preview": "vite preview", "typecheck": "tsc --noEmit", "codegen": "sh codegen.sh", From 9c9404367bbbee0d8dea45f9c86921e1e440cac6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B9=AF=E6=9C=AC=20=E9=96=8B?= Date: Thu, 26 Oct 2023 08:46:30 +0000 Subject: [PATCH 2/3] =?UTF-8?q?Merged=20PR=20535:=20STG=E3=83=93=E3=83=AB?= =?UTF-8?q?=E3=83=89=E3=81=AE=E7=92=B0=E5=A2=83=E5=A4=89=E6=95=B0=E3=81=8C?= =?UTF-8?q?=E9=96=93=E9=81=95=E3=81=A3=E3=81=9F=E3=83=95=E3=82=A1=E3=82=A4?= =?UTF-8?q?=E3=83=AB=E3=82=92=E8=AA=AD=E3=81=BE=E3=81=AA=E3=81=84=E3=82=88?= =?UTF-8?q?=E3=81=86=E4=BF=AE=E6=AD=A3=E3=81=99=E3=82=8B(2)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2956: STGビルドの環境変数が間違ったファイルを読まないよう修正する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2956) - ビルドコマンドでの引数の渡し方に問題があった部分を修正 ## レビューポイント - 情報共有 ## 動作確認状況 - ローカルで確認 --- dictation_client/package.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dictation_client/package.json b/dictation_client/package.json index 8da7f1a..a445672 100644 --- a/dictation_client/package.json +++ b/dictation_client/package.json @@ -7,10 +7,10 @@ }, "scripts": { "start": "vite", - "build": "tsc && vite build -- --mode development", - "build:stg": "tsc && vite build -- --mode staging", - "build:prod": "tsc && vite build -- --mode production", - "build:local": "tsc && vite build -- --mode development && sh localdeploy.sh", + "build": "tsc && vite build --mode development", + "build:stg": "tsc && vite build --mode staging", + "build:prod": "tsc && vite build --mode production", + "build:local": "tsc && vite build --mode development && sh localdeploy.sh", "preview": "vite preview", "typecheck": "tsc --noEmit", "codegen": "sh codegen.sh", @@ -99,4 +99,4 @@ } ] } -} +} \ No newline at end of file From f4347ff5c02a72e54ef30b375d70261dbbef9cbd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B0=B4=E6=9C=AC=20=E7=A5=90=E5=B8=8C?= Date: Thu, 26 Oct 2023 08:52:52 +0000 Subject: [PATCH 3/3] =?UTF-8?q?Merged=20PR=20528:=20=E7=AC=AC=E4=BA=94?= =?UTF-8?q?=E9=9A=8E=E5=B1=A4=E3=83=A9=E3=82=A4=E3=82=BB=E3=83=B3=E3=82=B9?= =?UTF-8?q?=E7=94=BB=E9=9D=A2=E3=81=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## 概要 [Task2937: 第五階層ライセンス画面の修正](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2937) - 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず) - 何をどう変更したか、追加したライブラリなど allocatedLicense(Number of licenses acclocated) reusableLicense(number of licenses available for reuse) freeLicense(Number of unused licenses) の3つに、「有効な総ライセンス数のうち」という条件を追加する - このPull Requestでの対象/対象外 - 影響範囲(他の機能にも影響があるか) ## レビューポイント - 特にレビューしてほしい箇所 - 軽微なものや自明なものは記載不要 - 修正範囲が大きい場合などに記載 - 全体的にや仕様を満たしているか等は本当に必要な時のみ記載 ## UIの変更 - Before/Afterのスクショなど - スクショ置き場 ## 動作確認状況 - ローカルで確認 ## 補足 - 相談、参考資料などがあれば --- .../accounts/accounts.repository.service.ts | 51 ++++++++++++++----- 1 file changed, 38 insertions(+), 13 deletions(-) diff --git a/dictation_server/src/repositories/accounts/accounts.repository.service.ts b/dictation_server/src/repositories/accounts/accounts.repository.service.ts index 8c582f0..65fe99d 100644 --- a/dictation_server/src/repositories/accounts/accounts.repository.service.ts +++ b/dictation_server/src/repositories/accounts/accounts.repository.service.ts @@ -327,27 +327,52 @@ export class AccountsRepositoryService { // 有効な総ライセンス数のうち、ユーザーに割り当て済みのライセンス数を取得する const allocatedLicense = await license.count({ - where: { - account_id: id, - allocated_user_id: Not(IsNull()), - status: LICENSE_ALLOCATED_STATUS.ALLOCATED, - }, + where: [ + { + account_id: id, + allocated_user_id: Not(IsNull()), + expiry_date: MoreThanOrEqual(currentDate), + status: LICENSE_ALLOCATED_STATUS.ALLOCATED, + }, + { + account_id: id, + allocated_user_id: Not(IsNull()), + expiry_date: IsNull(), + status: LICENSE_ALLOCATED_STATUS.ALLOCATED, + }, + ], }); // 総ライセンス数のうち、ユーザーに割り当てたことがあるが、現在は割り当て解除され誰にも割り当たっていないライセンス数を取得する const reusableLicense = await license.count({ - where: { - account_id: id, - status: LICENSE_ALLOCATED_STATUS.REUSABLE, - }, + where: [ + { + account_id: id, + expiry_date: MoreThanOrEqual(currentDate), + status: LICENSE_ALLOCATED_STATUS.REUSABLE, + }, + { + account_id: id, + expiry_date: IsNull(), + status: LICENSE_ALLOCATED_STATUS.REUSABLE, + }, + ], }); // 総ライセンス数のうち、一度もユーザーに割り当てたことのないライセンス数を取得する const freeLicense = await license.count({ - where: { - account_id: id, - status: LICENSE_ALLOCATED_STATUS.UNALLOCATED, - }, + where: [ + { + account_id: id, + expiry_date: MoreThanOrEqual(currentDate), + status: LICENSE_ALLOCATED_STATUS.UNALLOCATED, + }, + { + account_id: id, + expiry_date: IsNull(), + status: LICENSE_ALLOCATED_STATUS.UNALLOCATED, + }, + ], }); // 有効期限が現在日付からしきい値以内のライセンス数を取得する