Merged PR 439: [PBI1197残]ドロップダウンの挙動について統一する

## 概要
[Task2713: [PBI1197残]ドロップダウンの挙動について統一する](https://paruru.nds-tyo.co.jp:8443/tfs/ReciproCollection/fa4924a4-d079-4fab-9fb5-a9a11eb205f0/_workitems/edit/2713)

ドロップダウンの選択肢表示を修正しました。

## レビューポイント
なし

## 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/Task2713?csf=1&web=1&e=OyuhN1

## 動作確認状況
ローカルで動作確認済み

## 補足
なし
This commit is contained in:
oura.a 2023-09-27 08:40:26 +00:00
parent de13753ef6
commit ba7ef1b4c6
10 changed files with 51 additions and 28 deletions

View File

@ -161,13 +161,16 @@ const AccountPage: React.FC = (): JSX.Element => {
);
}}
>
<option value="">
{t(
<option value="" hidden>
{`-- ${t(
getTranslationID("accountPage.label.selectDealer")
)}
)} --`}
</option>
<option value="">
{`-- ${t(
getTranslationID("common.label.notSelected")
)} --`}
</option>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<option value="Blank" />
{dealers.map((x) => (
<option key={x.name} value={x.name}>
{x.name}
@ -249,6 +252,7 @@ const AccountPage: React.FC = (): JSX.Element => {
}}
>
<option
hidden
value={
users.find(
(x) =>
@ -313,6 +317,7 @@ const AccountPage: React.FC = (): JSX.Element => {
}}
>
<option
hidden
value={
viewInfo.account.secondryAdminUserId
? users.find(
@ -328,14 +333,17 @@ const AccountPage: React.FC = (): JSX.Element => {
(x) =>
x.id === viewInfo.account.secondryAdminUserId
)?.email
: t(
: `-- ${t(
getTranslationID(
"accountPage.label.selectSecondaryAdministrator"
)
)}
)} --`}
</option>
<option value="">
{`-- ${t(
getTranslationID("common.label.notSelected")
)} --`}
</option>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<option value="Blank" />
{users.map((x) => (
<option key={x.email} value={x.email}>
{x.email}
@ -367,6 +375,7 @@ const AccountPage: React.FC = (): JSX.Element => {
{isTier5 && (
<ul className={styles.linkBottom}>
<li>
{/* eslint-disable-next-line jsx-a11y/click-events-have-key-events, jsx-a11y/no-static-element-interactions */}
<a className={styles.linkTx} onClick={onDeleteAccountOpen}>
{t(getTranslationID("accountPage.label.deleteAccount"))}
</a>

View File

@ -159,7 +159,7 @@ export const AddPartnerAccountPopup: React.FC<AddPartnerAccountPopup> = (
}
>
{COUNTRY_LIST.map((x) => (
<option key={x.value} value={x.value}>
<option key={x.value} value={x.value} hidden={!x.value}>
{x.label}
</option>
))}

View File

@ -1,5 +1,5 @@
export const COUNTRY_LIST = [
{ value: "", label: "Select Country" },
{ value: "", label: "-- Select Country --" },
{ value: "CA", label: "Canada" },
{ value: "KY", label: "Cayman Islands" },
{ value: "US", label: "U.S.A." },

View File

@ -188,7 +188,7 @@ const SignupInput: React.FC = (): JSX.Element => {
}
>
{COUNTRY_LIST.map((x) => (
<option key={x.value} value={x.value}>
<option key={x.value} value={x.value} hidden={!x.value}>
{x.label}
</option>
))}
@ -217,15 +217,24 @@ const SignupInput: React.FC = (): JSX.Element => {
}}
value={dealers.find((x) => x.id === dealer)?.id ?? NaN}
>
<option value="">
{`-- ${t(
getTranslationID("common.label.notSelected")
)} --`}
</option>
{[
{
id: NaN,
country: "",
name: "Select dealer",
name: "-- Select dealer --",
},
...dealers,
].map((x) => (
<option key={x.id} value={x.id}>
<option
key={x.id}
value={x.id}
hidden={Number.isNaN(x.id)}
>
{x.name}
</option>
))}

View File

@ -218,12 +218,13 @@ export const AllocateLicensePopup: React.FC<AllocateLicensePopupProps> = (
}}
value={selectedlicenseId ?? ""}
>
<option value="">
{t(
<option value="" hidden>
{`--
${t(
getTranslationID(
"allocateLicensePopupPage.label.dropDownHeading"
)
)}
)} --`}
</option>
{allocatableLicenses.map((x) => (
<option key={x.licenseId} value={x.licenseId}>

View File

@ -151,7 +151,7 @@ const WorktypeIdSettingPage: React.FC = (): JSX.Element => {
)}
</a>
</li>
<li className={styles.selectMenu}>
<li className={`${styles.selectMenu} ${styles.form}`}>
{`${t(
getTranslationID(
"worktypeIdSetting.label.activeWorktypeId"
@ -166,9 +166,13 @@ const WorktypeIdSettingPage: React.FC = (): JSX.Element => {
const active = value === "" ? undefined : Number(value);
setSelectedActiveWorktypeId(active);
}}
required
>
{/* eslint-disable-next-line jsx-a11y/control-has-associated-label */}
<option value="" />
<option value="">
{`-- ${t(
getTranslationID("common.label.notSelected")
)} --`}
</option>
{worktypes?.map((worktype) => (
<option key={worktype.id} value={worktype.id}>
{worktype.worktypeId}

View File

@ -21,7 +21,7 @@
"tier3": "(de)Distributor",
"tier4": "(de)Dealer",
"tier5": "(de)Customer",
"notSelected": "(de)-- None --"
"notSelected": "(de)None"
}
},
"topPage": {

View File

@ -21,7 +21,7 @@
"tier3": "Distributor",
"tier4": "Dealer",
"tier5": "Customer",
"notSelected": "-- None --"
"notSelected": "None"
}
},
"topPage": {

View File

@ -21,7 +21,7 @@
"tier3": "(es)Distributor",
"tier4": "(es)Dealer",
"tier5": "(es)Customer",
"notSelected": "(es)-- None --"
"notSelected": "(es)None"
}
},
"topPage": {

View File

@ -21,7 +21,7 @@
"tier3": "(fr)Distributor",
"tier4": "(fr)Dealer",
"tier5": "(fr)Customer",
"notSelected": "(fr)-- None --"
"notSelected": "(fr)None"
}
},
"topPage": {