From 2c3ab05281d2f550ff75574bd72b2607cf20a2c6 Mon Sep 17 00:00:00 2001 From: dyusuke3263 Date: Wed, 29 Nov 2023 00:20:10 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[fix]=E7=B7=A8=E9=9B=86=E3=83=A2=E3=83=BC?= =?UTF-8?q?=E3=83=80=E3=83=AB=E3=81=A7=E3=83=A6=E3=83=BC=E3=82=B6=E3=83=BC?= =?UTF-8?q?=E3=81=8C=E5=8F=8D=E6=98=A0=E3=81=95=E3=82=8C=E3=81=AA=E3=81=84?= =?UTF-8?q?=E3=83=90=E3=82=B0=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/sponsoractivities/EditModal.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/view/next-project/src/components/sponsoractivities/EditModal.tsx b/view/next-project/src/components/sponsoractivities/EditModal.tsx index d94700e61..6c708cd20 100644 --- a/view/next-project/src/components/sponsoractivities/EditModal.tsx +++ b/view/next-project/src/components/sponsoractivities/EditModal.tsx @@ -42,6 +42,8 @@ export default function EditModal(props: ModalProps) { expense: Number((props.sponsorActivity.expense / 11).toFixed(1)), }); + const default_user = users.find((user) => user.id === formData.userID); + const initStyleIds = sponsorStyleDetails ? sponsorStyleDetails.map((sponsorStyleDetail) => sponsorStyleDetail.sponsorStyleID) : []; @@ -178,7 +180,10 @@ export default function EditModal(props: ModalProps) { .filter((user, index, self) => { return self.findIndex((u) => u.name === user.name) === index; }); - if (res.length !== 0) setFormData({ ...formData, userID: res[0].id }); + + if (res.length !== 0 && default_user?.bureauID !== bureauId) { + setFormData({ ...formData, userID: res[0].id }); + } return res; }, [bureauId]); From 24486ecc975f2d6353cba23c1dd732b51a98d7ba Mon Sep 17 00:00:00 2001 From: dyusuke3263 Date: Tue, 28 Nov 2023 15:27:08 +0000 Subject: [PATCH 2/3] formatted by workflow --- .../src/components/sponsoractivities/EditModal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/view/next-project/src/components/sponsoractivities/EditModal.tsx b/view/next-project/src/components/sponsoractivities/EditModal.tsx index 6c708cd20..5fb8ef2f6 100644 --- a/view/next-project/src/components/sponsoractivities/EditModal.tsx +++ b/view/next-project/src/components/sponsoractivities/EditModal.tsx @@ -180,10 +180,10 @@ export default function EditModal(props: ModalProps) { .filter((user, index, self) => { return self.findIndex((u) => u.name === user.name) === index; }); - - if (res.length !== 0 && default_user?.bureauID !== bureauId) { - setFormData({ ...formData, userID: res[0].id }); - } + + if (res.length !== 0 && default_user?.bureauID !== bureauId) { + setFormData({ ...formData, userID: res[0].id }); + } return res; }, [bureauId]); From 3d5fc4b89cf4185498100e4ff52647f49752bdb5 Mon Sep 17 00:00:00 2001 From: Kubosaka Date: Thu, 21 Mar 2024 10:29:08 +0900 Subject: [PATCH 3/3] =?UTF-8?q?[fix]selected=E2=86=92value=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/sponsoractivities/EditModal.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/view/next-project/src/components/sponsoractivities/EditModal.tsx b/view/next-project/src/components/sponsoractivities/EditModal.tsx index 5fb8ef2f6..4b7f30639 100644 --- a/view/next-project/src/components/sponsoractivities/EditModal.tsx +++ b/view/next-project/src/components/sponsoractivities/EditModal.tsx @@ -192,9 +192,9 @@ export default function EditModal(props: ModalProps) {

企業名

- {sponsors.map((sponsor) => ( - ))} @@ -226,9 +226,9 @@ export default function EditModal(props: ModalProps) {

担当者名

- {filteredUsers.map((user) => ( - ))}