Merged PR 214: 第五階層の画面レイアウトを最新の状況にする

## 概要
[Task2034: 第五階層の画面レイアウトを最新の状況にする](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2034)

- 元PBI or タスクへのリンク(内容・目的などはそちらにあるはず)
- 何をどう変更したか、追加したライブラリなど
クライアント側の画面表示内容の修正。
AccountLock→StorageAvailable
サーバ側の処理でAccountLockと定義している変数名を適切な名称に修正。
- 影響範囲(他の機能にも影響があるか)
openapi.json変更に伴い、api.tsがdev環境の最新版になっています。

- 本PBIの対象外
第五階層用ライセンス情報画面以外の機能
scssファイルの修正箇所は、次回デザイナさんの修正時に正式に展開される想定です。

## レビューポイント
- 特にレビューしてほしい箇所

## UIの変更
https://ndstokyo.sharepoint.com/:f:/r/sites/Piranha/Shared%20Documents/General/OMDS/%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%B3%E3%82%B7%E3%83%A7%E3%83%83%E3%83%88/Task2034?csf=1&web=1&e=gfSwl3
## 動作確認状況
ローカル環境で画面の表示内容が変更されていることを確認

## 補足
- 相談、参考資料などがあれば
This commit is contained in:
maruyama.t 2023-07-10 04:03:03 +00:00
parent 365e4266e6
commit 4bbd9b371d
16 changed files with 129 additions and 32 deletions

View File

@ -49,6 +49,19 @@ export interface Account {
*/
'accountId': number;
}
/**
*
* @export
* @interface ActivateCardLicensesRequest
*/
export interface ActivateCardLicensesRequest {
/**
*
* @type {string}
* @memberof ActivateCardLicensesRequest
*/
'cardLicenseKey': string;
}
/**
*
* @export
@ -426,7 +439,7 @@ export interface GetLicenseSummaryResponse {
* @type {boolean}
* @memberof GetLicenseSummaryResponse
*/
'isAccountLock': boolean;
'isStorageAvailable': boolean;
}
/**
*
@ -2034,6 +2047,46 @@ export class FilesApi extends BaseAPI {
*/
export const LicensesApiAxiosParamCreator = function (configuration?: Configuration) {
return {
/**
*
* @summary
* @param {ActivateCardLicensesRequest} activateCardLicensesRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
activateCardLicenses: async (activateCardLicensesRequest: ActivateCardLicensesRequest, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
// verify required parameter 'activateCardLicensesRequest' is not null or undefined
assertParamExists('activateCardLicenses', 'activateCardLicensesRequest', activateCardLicensesRequest)
const localVarPath = `/licenses/cards/activate`;
// use dummy base URL string because the URL constructor only accepts absolute URLs.
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
let baseOptions;
if (configuration) {
baseOptions = configuration.baseOptions;
}
const localVarRequestOptions = { method: 'POST', ...baseOptions, ...options};
const localVarHeaderParameter = {} as any;
const localVarQueryParameter = {} as any;
// authentication bearer required
// http bearer authentication required
await setBearerAuthToObject(localVarHeaderParameter, configuration)
localVarHeaderParameter['Content-Type'] = 'application/json';
setSearchParams(localVarUrlObj, localVarQueryParameter);
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
localVarRequestOptions.data = serializeDataIfNeeded(activateCardLicensesRequest, localVarRequestOptions, configuration)
return {
url: toPathString(localVarUrlObj),
options: localVarRequestOptions,
};
},
/**
*
* @summary
@ -2124,6 +2177,17 @@ export const LicensesApiAxiosParamCreator = function (configuration?: Configurat
export const LicensesApiFp = function(configuration?: Configuration) {
const localVarAxiosParamCreator = LicensesApiAxiosParamCreator(configuration)
return {
/**
*
* @summary
* @param {ActivateCardLicensesRequest} activateCardLicensesRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
async activateCardLicenses(activateCardLicensesRequest: ActivateCardLicensesRequest, options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>> {
const localVarAxiosArgs = await localVarAxiosParamCreator.activateCardLicenses(activateCardLicensesRequest, options);
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
},
/**
*
* @summary
@ -2156,6 +2220,16 @@ export const LicensesApiFp = function(configuration?: Configuration) {
export const LicensesApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
const localVarFp = LicensesApiFp(configuration)
return {
/**
*
* @summary
* @param {ActivateCardLicensesRequest} activateCardLicensesRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
*/
activateCardLicenses(activateCardLicensesRequest: ActivateCardLicensesRequest, options?: any): AxiosPromise<object> {
return localVarFp.activateCardLicenses(activateCardLicensesRequest, options).then((request) => request(axios, basePath));
},
/**
*
* @summary
@ -2186,6 +2260,18 @@ export const LicensesApiFactory = function (configuration?: Configuration, baseP
* @extends {BaseAPI}
*/
export class LicensesApi extends BaseAPI {
/**
*
* @summary
* @param {ActivateCardLicensesRequest} activateCardLicensesRequest
* @param {*} [options] Override http request option.
* @throws {RequiredError}
* @memberof LicensesApi
*/
public activateCardLicenses(activateCardLicensesRequest: ActivateCardLicensesRequest, options?: AxiosRequestConfig) {
return LicensesApiFp(this.configuration).activateCardLicenses(activateCardLicensesRequest, options).then((request) => request(this.axios, this.basePath));
}
/**
*
* @summary

View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 27.6.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="レイヤー_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px"
y="0px" viewBox="0 0 48 48" style="enable-background:new 0 0 48 48;" xml:space="preserve">
<style type="text/css">
.st0{fill:#282828;}
</style>
<path class="st0" d="M24,44c-2.8,0-5.4-0.5-7.8-1.6c-2.4-1-4.6-2.5-6.4-4.3s-3.2-3.9-4.3-6.4S4,26.8,4,24s0.5-5.4,1.6-7.8
s2.5-4.6,4.3-6.4s3.9-3.2,6.4-4.3S21.2,4,24,4s5.4,0.5,7.8,1.6s4.6,2.5,6.4,4.3s3.2,3.9,4.3,6.4c1.1,2.4,1.6,5,1.6,7.8
s-0.5,5.4-1.6,7.8c-1,2.4-2.5,4.6-4.3,6.4s-3.9,3.2-6.4,4.3C29.4,43.5,26.8,44,24,44z M24,41c4.7,0,8.8-1.6,12.1-4.9
C39.4,32.8,41,28.7,41,24c0-2-0.3-4-1-5.8c-0.7-1.9-1.7-3.6-3-5.1l-24,24c1.5,1.3,3.2,2.3,5.1,3C20,40.7,22,41,24,41z M11.1,34.9
L35,11c-1.5-1.3-3.2-2.3-5.1-3S26,7,24,7c-4.7,0-8.8,1.6-12.1,4.9S7,19.3,7,24c0,2,0.4,4,1.1,5.9S9.8,33.4,11.1,34.9z"/>
</svg>

After

Width:  |  Height:  |  Size: 1006 B

View File

@ -14,7 +14,7 @@ const initialState: LicenseSummaryState = {
shortage: 0,
storageSize: 0,
usedSize: 0,
isAccountLock: false,
isStorageAvailable: false,
},
apps: {
isLoading: false,

View File

@ -14,7 +14,7 @@ export interface Domain {
shortage: number;
storageSize: number;
usedSize: number;
isAccountLock: boolean;
isStorageAvailable: boolean;
}
export interface Apps {

View File

@ -14,8 +14,8 @@ import {
import postAdd from "../../assets/images/post_add.svg";
import history from "../../assets/images/history.svg";
import key from "../../assets/images/key.svg";
import lock from "../../assets/images/lock.svg";
import lockOpen from "../../assets/images/lock_open.svg";
import block from "../../assets/images/block.svg";
import circle from "../../assets/images/circle.svg";
import { LicenseOrderPopup } from "./licenseOrderPopup";
import { CardLicenseActivatePopup } from "./cardLicenseActivatePopup";
@ -188,19 +188,17 @@ const LicenseSummary: React.FC = (): JSX.Element => {
<dd>{licenseSummaryInfo.usedSize}GB</dd>
<dt>
{t(
getTranslationID("LicenseSummaryPage.label.accountLock")
getTranslationID(
"LicenseSummaryPage.label.storageAvailable"
)
)}
</dt>
<dd>
{licenseSummaryInfo.isAccountLock && (
<img src={lock} alt="" className={styles.icCheckCircle} />
{licenseSummaryInfo.isStorageAvailable && (
<img src={block} alt="" className={styles.icInTable} />
)}
{!licenseSummaryInfo.isAccountLock && (
<img
src={lockOpen}
alt=""
className={styles.icCheckCircle}
/>
{!licenseSummaryInfo.isStorageAvailable && (
<img src={circle} alt="" className={styles.icInTable} />
)}
</dd>
</dl>

View File

@ -1493,12 +1493,12 @@ tr.isSelected .menuInTable li a {
vertical-align: bottom;
}
.license .listVertical dd img[src*="circle.svg"] {
.license .listVertical dd img[src*="circle"] {
filter: brightness(0) saturate(100%) invert(58%) sepia(41%) saturate(5814%)
hue-rotate(143deg) brightness(96%) contrast(101%);
}
.license .listVertical dd img[src*="block.svg"] {
.license .listVertical dd img[src*="block"] {
filter: brightness(0) saturate(100%) invert(45%) sepia(77%) saturate(2633%)
hue-rotate(340deg) brightness(102%) contrast(101%);
}

View File

@ -152,7 +152,7 @@
"shortage": "(de)Shortage",
"storageSize": "(de)Storage Size",
"usedSize": "(de)Used Size",
"accountLock": "(de)Account Lock"
"storageAvailable": "(de)Storage Available"
}
},
"licenseOrderPage": {

View File

@ -152,7 +152,7 @@
"shortage": "Shortage",
"storageSize": "Storage Size",
"usedSize": "Used Size",
"accountLock": "Account Lock"
"storageAvailable": "Storage Available"
}
},
"licenseOrderPage": {

View File

@ -152,7 +152,7 @@
"shortage": "(es)Shortage",
"storageSize": "(es)Storage Size",
"usedSize": "(es)Used Size",
"accountLock": "(es)Account Lock"
"storageAvailable": "(es)Storage Available"
}
},
"licenseOrderPage": {

View File

@ -152,7 +152,7 @@
"shortage": "(fr)Shortage",
"storageSize": "(fr)Storage Size",
"usedSize": "(fr)Used Size",
"accountLock": "(fr)Account Lock"
"storageAvailable": "(fr)Storage Available"
}
},
"licenseOrderPage": {

View File

@ -1681,7 +1681,7 @@
"shortage": { "type": "number" },
"storageSize": { "type": "number" },
"usedSize": { "type": "number" },
"isAccountLock": { "type": "boolean" }
"isStorageAvailable": { "type": "boolean" }
},
"required": [
"totalLicense",
@ -1694,7 +1694,7 @@
"shortage",
"storageSize",
"usedSize",
"isAccountLock"
"isStorageAvailable"
]
},
"Account": {

View File

@ -212,7 +212,7 @@ const expectedAccountLisenceCounts = {
shortage: 0,
storageSize: 0,
usedSize: 0,
isAccountLock: false,
isStorageAvailable: false,
};
const userInfo = {

View File

@ -51,7 +51,7 @@ export class AccountsService {
// システム上有効期限日付の23時59分59秒999ミリ秒までライセンスは有効なため、各値最大値をセット
expiringSoonDate.setHours(23, 59, 59, 999);
const { licenseSummary, isAccountLock } =
const { licenseSummary, isStorageAvailable } =
await this.accountRepository.getLicenseSummaryInfo(
accountId,
currentDate,
@ -83,7 +83,7 @@ export class AccountsService {
storageSize: 0, // XXX PBI1201対象外
usedSize: 0, // XXX PBI1201対象外
shortage,
isAccountLock,
isStorageAvailable,
};
return licenseSummaryResponse;
} catch (e) {

View File

@ -36,7 +36,7 @@ export type SendGridMockValue = {
export type AccountsRepositoryMockValue = {
getLicenseSummaryInfo: {
licenseSummary: LicenseSummaryInfo;
isAccountLock: boolean;
isStorageAvailable: boolean;
};
};
export const makeAccountsServiceMock = async (
@ -86,7 +86,7 @@ export const makeAccountsRepositoryMock = (
.fn<
Promise<{
licenseSummary: LicenseSummaryInfo;
isAccountLock: boolean;
isStorageAvailable: boolean;
}>,
[]
>()
@ -173,7 +173,7 @@ export const makeDefaultAccountsRepositoryMockValue =
return {
getLicenseSummaryInfo: {
licenseSummary: licenseSummaryInfo,
isAccountLock: false,
isStorageAvailable: false,
},
};
};

View File

@ -75,7 +75,7 @@ export class GetLicenseSummaryResponse {
usedSize: number;
@ApiProperty()
isAccountLock: boolean;
isStorageAvailable: boolean;
}
export class Account {

View File

@ -174,7 +174,7 @@ export class AccountsRepositoryService {
id: number,
currentDate: Date,
expiringSoonDate: Date,
): Promise<{ licenseSummary: LicenseSummaryInfo; isAccountLock: boolean }> {
): Promise<{ licenseSummary: LicenseSummaryInfo; isStorageAvailable: boolean }> {
return await this.dataSource.transaction(async (entityManager) => {
const license = entityManager.getRepository(License);
const licenseOrder = entityManager.getRepository(LicenseOrder);
@ -271,7 +271,7 @@ export class AccountsRepositoryService {
});
// アカウントのロック状態を取得する
const isAccountLock = (await this.findAccountById(id)).locked;
const isStorageAvailable = (await this.findAccountById(id)).locked;
let licenseSummary = new LicenseSummaryInfo();
licenseSummary = {
@ -284,7 +284,7 @@ export class AccountsRepositoryService {
issueRequesting: issueRequesting,
numberOfRequesting: numberOfRequesting,
};
return { licenseSummary: licenseSummary, isAccountLock };
return { licenseSummary: licenseSummary, isStorageAvailable };
});
}
}