Merge branch 'develop'

This commit is contained in:
x.yumoto.k 2023-10-26 18:07:39 +09:00
commit b8c4fe009a
3 changed files with 45 additions and 19 deletions

View File

@ -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

View File

@ -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",
@ -98,4 +99,4 @@
}
]
}
}
}

View File

@ -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,
},
],
});
// 有効期限が現在日付からしきい値以内のライセンス数を取得する