diff --git a/azure-pipelines-staging.yml b/azure-pipelines-staging.yml index d2759b7..86f970d 100644 --- a/azure-pipelines-staging.yml +++ b/azure-pipelines-staging.yml @@ -87,6 +87,7 @@ jobs: REDIS_PORT: 0 REDIS_PASSWORD: xxxxxxxxxxxx ADB2C_CACHE_TTL: 0 + STAGE: local - task: Docker@0 displayName: build inputs: diff --git a/dictation_client/.vscode/settings.json b/dictation_client/.vscode/settings.json index 4ec4dc1..2f24e82 100644 --- a/dictation_client/.vscode/settings.json +++ b/dictation_client/.vscode/settings.json @@ -27,8 +27,8 @@ "debug.javascript.usePreview": false, "editor.copyWithSyntaxHighlighting": false, "editor.codeActionsOnSave": { - "source.fixAll.eslint": true, - "source.fixAll.stylelint": true + "source.fixAll.eslint": "explicit", + "source.fixAll.stylelint": "explicit" }, "editor.defaultFormatter": "esbenp.prettier-vscode", "editor.formatOnSave": true, diff --git a/dictation_client/package.json b/dictation_client/package.json index a445672..ac8d5c0 100644 --- a/dictation_client/package.json +++ b/dictation_client/package.json @@ -8,8 +8,8 @@ "scripts": { "start": "vite", "build": "tsc && vite build --mode development", - "build:stg": "tsc && vite build --mode staging", - "build:prod": "tsc && vite build --mode production", + "build:stg": "tsc && vite build --mode staging --sourcemap false", + "build:prod": "tsc && vite build --mode production --sourcemap false", "build:local": "tsc && vite build --mode development && sh localdeploy.sh", "preview": "vite preview", "typecheck": "tsc --noEmit", diff --git a/dictation_client/src/common/convertUtcToLocal.ts b/dictation_client/src/common/convertUtcToLocal.ts new file mode 100644 index 0000000..bbb4c0b --- /dev/null +++ b/dictation_client/src/common/convertUtcToLocal.ts @@ -0,0 +1,15 @@ +// UTCの日付に対してローカルのロケール+タイムゾーンを考慮して表示形式と時刻補正を行った文字列を返却する +export const convertUtcToLocal = ( + utcDateString: string, + formatOptions?: Intl.DateTimeFormatOptions +): string => { + if (Number.isNaN(Date.parse(utcDateString))) { + // 日付文字列が未定義または無効な場合は 変換を行わない + return utcDateString; + } + + const utcDate = new Date(utcDateString); + return formatOptions + ? utcDate.toLocaleString(undefined, formatOptions) + : utcDate.toLocaleString(); +}; diff --git a/dictation_client/src/components/header/constants.ts b/dictation_client/src/components/header/constants.ts index f3e4f53..6b3f7dc 100644 --- a/dictation_client/src/components/header/constants.ts +++ b/dictation_client/src/components/header/constants.ts @@ -51,7 +51,7 @@ export const HEADER_MENUS: { }, ]; -export const HEADER_NAME = getTranslationID("common.label.headerName"); +export const HEADER_NAME = "ODMS Cloud"; /** * adminのみに表示するヘッダータブ diff --git a/dictation_client/src/components/header/loginedHeader.tsx b/dictation_client/src/components/header/loginedHeader.tsx index 57ee5dd..7b900ab 100644 --- a/dictation_client/src/components/header/loginedHeader.tsx +++ b/dictation_client/src/components/header/loginedHeader.tsx @@ -74,7 +74,7 @@ const LoginedHeader: React.FC = (props: HeaderProps) => {
OM System
-
{t(HEADER_NAME)}
+
{HEADER_NAME}
-
+

{companyName}

-
    +
    • {/* 他アカウントのライセンス情報を見ている場合は、前画面に戻る用のreturnボタンを表示 */} {selectedRow && ( @@ -194,99 +194,133 @@ export const LicenseSummary: React.FC = ( )}
    -
    -
    - {t( - getTranslationID( - "LicenseSummaryPage.label.totalLicense" - ) - )} -
    -
    {licenseSummaryInfo.totalLicense}
    -
    - {t( - getTranslationID( - "LicenseSummaryPage.label.allocatedLicense" - ) - )} -
    -
    {licenseSummaryInfo.allocatedLicense}
    -
    - {t( - getTranslationID( - "LicenseSummaryPage.label.reusableLicense" - ) - )} -
    -
    {licenseSummaryInfo.reusableLicense}
    -
    - {t( - getTranslationID("LicenseSummaryPage.label.freeLicense") - )} -
    -
    {licenseSummaryInfo.freeLicense}
    -
    - {t( - getTranslationID( - "LicenseSummaryPage.label.expiringWithin14daysLicense" - ) - )} -
    -
    {licenseSummaryInfo.expiringWithin14daysLicense}
    -
    - {t( - getTranslationID( - "LicenseSummaryPage.label.issueRequesting" - ) - )} -
    -
    {licenseSummaryInfo.issueRequesting}
    -
    - {t( - getTranslationID( - "LicenseSummaryPage.label.numberOfRequesting" - ) - )} -
    -
    {licenseSummaryInfo.numberOfRequesting}
    -
    - {t(getTranslationID("LicenseSummaryPage.label.shortage"))} -
    -
    - 0 ? styles.isAlert : "" - } - > - {licenseSummaryInfo.shortage} - -
    -
    - {t( - getTranslationID("LicenseSummaryPage.label.storageSize") - )} -
    -
    {licenseSummaryInfo.storageSize}GB
    -
    - {t(getTranslationID("LicenseSummaryPage.label.usedSize"))} -
    -
    {licenseSummaryInfo.usedSize}GB
    -
    - {t( - getTranslationID( - "LicenseSummaryPage.label.storageAvailable" - ) - )} -
    -
    - {licenseSummaryInfo.isStorageAvailable && ( - - )} - {!licenseSummaryInfo.isStorageAvailable && ( - - )} -
    -
    +
    +
    +

    + {t( + getTranslationID( + "LicenseSummaryPage.label.licenseLabel" + ) + )} +

    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.totalLicense" + ) + )} +
    +
    {licenseSummaryInfo.totalLicense}
    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.freeLicense" + ) + )} +
    +
    {licenseSummaryInfo.freeLicense}
    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.reusableLicense" + ) + )} +
    +
    {licenseSummaryInfo.reusableLicense}
    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.allocatedLicense" + ) + )} +
    +
    {licenseSummaryInfo.allocatedLicense}
    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.expiringWithin14daysLicense" + ) + )} +
    +
    {licenseSummaryInfo.expiringWithin14daysLicense}
    +
    + {t( + getTranslationID("LicenseSummaryPage.label.shortage") + )} +
    +
    + 0 + ? styles.isAlert + : "" + } + > + {licenseSummaryInfo.shortage} + +
    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.issueRequesting" + ) + )} +
    +
    {licenseSummaryInfo.issueRequesting}
    +
    +
    +
    +
    +

    + {t( + getTranslationID( + "LicenseSummaryPage.label.storageLabel" + ) + )} +

    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.storageSize" + ) + )} +
    +
    {licenseSummaryInfo.storageSize}GB
    +
    + {t( + getTranslationID("LicenseSummaryPage.label.usedSize") + )} +
    +
    {licenseSummaryInfo.usedSize}GB
    +
    + {t( + getTranslationID( + "LicenseSummaryPage.label.storageAvailable" + ) + )} +
    +
    + {licenseSummaryInfo.isStorageAvailable && ( + + )} + {!licenseSummaryInfo.isStorageAvailable && ( + + )} +
    +
    +
diff --git a/dictation_client/src/pages/TermsPage/index.tsx b/dictation_client/src/pages/TermsPage/index.tsx index 777a115..974487e 100644 --- a/dictation_client/src/pages/TermsPage/index.tsx +++ b/dictation_client/src/pages/TermsPage/index.tsx @@ -13,6 +13,7 @@ import { getTermsInfoAsync, updateAcceptedVersionAsync, selectTier, + selectIsLoading, selectTermVersions, } from "features//terms"; import { selectLocalStorageKeyforIdToken } from "features/login"; @@ -27,7 +28,7 @@ const TermsPage: React.FC = (): JSX.Element => { selectLocalStorageKeyforIdToken ); const tier = useSelector(selectTier); - + const isLoading = useSelector(selectIsLoading); const [isCheckedEula, setIsCheckedEula] = useState(false); const [isCheckedPrivacyNotice, setIsCheckedPrivacyNotice] = useState(false); const [isCheckedDpa, setIsCheckedDpa] = useState(false); @@ -88,7 +89,15 @@ const TermsPage: React.FC = (): JSX.Element => { tier, dispatch, ]); - + if (isLoading) { + return ( + <> +
+

loading ...

+