From c8fbc475bb875662a2c72d53372fb40c777335e5 Mon Sep 17 00:00:00 2001 From: uchida189 Date: Sat, 24 Aug 2024 14:43:57 +0900 Subject: [PATCH 1/2] =?UTF-8?q?[feat]=E5=8D=94=E8=B3=9B=E6=B4=BB=E5=8B=95?= =?UTF-8?q?=E3=83=9A=E3=83=BC=E3=82=B8=E3=81=A7=E7=94=BB=E9=9D=A2=E5=A4=96?= =?UTF-8?q?=E3=82=BF=E3=83=83=E3=83=97=E3=81=A7=E3=83=A2=E3=83=BC=E3=83=80?= =?UTF-8?q?=E3=83=AB=E3=82=92=E9=96=89=E3=81=98=E3=82=8B=E3=82=88=E3=81=86?= =?UTF-8?q?=E3=81=AB=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 1 + .../sponsoractivities/AddPdfDetailModal.tsx | 12 +++++++----- .../sponsoractivities/DeleteModal.tsx | 10 +++++++--- .../sponsoractivities/DetailModal.tsx | 2 +- .../sponsoractivities/EditInvoiceModal.tsx | 14 +++++++------- .../components/sponsoractivities/EditModal.tsx | 18 +++++++----------- .../sponsoractivities/FilterModal.tsx | 7 +------ .../sponsoractivities/PaymentDayModal.tsx | 12 +++++++----- .../SponsorActivitiesAddModal.tsx | 12 ++++++------ .../sponsoractivities/UploadFileModal.tsx | 2 +- 10 files changed, 45 insertions(+), 45 deletions(-) diff --git a/.gitignore b/.gitignore index be84314c8..0f1a72645 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ FinanSu.iml finansu.env finansu.local.env api/tmp +.DS_Store # cloudflare web/**/*.json diff --git a/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx b/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx index b003a7799..f5d555297 100644 --- a/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx +++ b/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx @@ -90,15 +90,17 @@ export default function AddPdfDetailModal(props: ModalProps) { (e: React.ChangeEvent | React.ChangeEvent) => { setInvoiceDate({ ...invoiceData, [input]: e.target.value }); }; + + const onClose = () => { + props.setIsOpen(false); + }; return ( - +
{ - props.setIsOpen(false); - }} + onClick={onClose} />

@@ -135,7 +137,7 @@ export default function AddPdfDetailModal(props: ModalProps) { formatDate(invoiceData.deadline), formatDate(invoiceData.issuedDate, false), ); - props.setIsOpen(false); + onClose(); }} > ダウンロード diff --git a/view/next-project/src/components/sponsoractivities/DeleteModal.tsx b/view/next-project/src/components/sponsoractivities/DeleteModal.tsx index 86d52d777..7afc83bfc 100644 --- a/view/next-project/src/components/sponsoractivities/DeleteModal.tsx +++ b/view/next-project/src/components/sponsoractivities/DeleteModal.tsx @@ -17,6 +17,10 @@ const SponsorActivitiesDeleteModal: FC = (props) => { props.setShowModal(false); router.reload(); }; + + const onClose = () => { + props.setShowModal(false); + }; const deleteSponsorActivity = async () => { const deleteSponsorActivityUrl = process.env.CSR_API_URI + '/activities/' + props.id; @@ -24,17 +28,17 @@ const SponsorActivitiesDeleteModal: FC = (props) => { }; return ( - +

- props.setShowModal(false)} /> +
協賛企業の削除
削除しますか?
- 戻る + 戻る { deleteSponsorActivity(); diff --git a/view/next-project/src/components/sponsoractivities/DetailModal.tsx b/view/next-project/src/components/sponsoractivities/DetailModal.tsx index af011e1f8..25d3b9a84 100644 --- a/view/next-project/src/components/sponsoractivities/DetailModal.tsx +++ b/view/next-project/src/components/sponsoractivities/DetailModal.tsx @@ -31,7 +31,7 @@ const DetailModal: FC = (props) => { const [pageNum, setPageNum] = useState(1); return ( - +
diff --git a/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx b/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx index fba6af5df..1fb0de6a5 100644 --- a/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx +++ b/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx @@ -51,15 +51,17 @@ export default function EditInvoiceModal(props: ModalProps) { setInvoice(editInvoice); setIsOpen(false); }; + + const onClose = () => { + props.setIsOpen(false); + }; return ( - +
{ - setIsOpen(false); - }} + onClick={onClose} />
@@ -135,9 +137,7 @@ export default function EditInvoiceModal(props: ModalProps) {
{ - setIsOpen(false); - }} + onClick={onClose} > 戻る diff --git a/view/next-project/src/components/sponsoractivities/EditModal.tsx b/view/next-project/src/components/sponsoractivities/EditModal.tsx index 0e0368db8..7bf06eb14 100644 --- a/view/next-project/src/components/sponsoractivities/EditModal.tsx +++ b/view/next-project/src/components/sponsoractivities/EditModal.tsx @@ -210,6 +210,10 @@ export default function EditModal(props: ModalProps) { }, [formDataSponsorID]); const NO_SPONSORS_MESSAGE = '企業が登録されていません'; + + const onClose = () => { + props.setIsOpen(false); + }; // 協賛企業の情報 const content = (data: SponsorActivity) => ( @@ -352,14 +356,10 @@ export default function EditModal(props: ModalProps) { ); return ( - +
- { - props.setIsOpen(false); - }} - /> +
協賛企業の修正
@@ -371,11 +371,7 @@ export default function EditModal(props: ModalProps) {
)}
- { - props.setIsOpen(false); - }} - > + 戻る = (props) => { }; return ( - { - onClose(); - }} - > +
diff --git a/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx b/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx index b4a319299..0925d8cfc 100644 --- a/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx +++ b/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx @@ -47,14 +47,16 @@ export default function PaymentDayModal(props: ModalProps) { setFormData({ ...formData, [input]: e.target.value }); }; + const onClose = () => { + props.setIsOpen(false); + }; + return ( - +
{ - props.setIsOpen(false); - }} + onClick={onClose} />

@@ -76,7 +78,7 @@ export default function PaymentDayModal(props: ModalProps) { formatDate(paymentDay, false), formatDate(formData.receivedAt, false), ); - props.setIsOpen(false); + onClose(); }} > 領収書ダウンロード diff --git a/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx b/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx index 46c0df584..842f549bb 100644 --- a/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx +++ b/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx @@ -198,6 +198,10 @@ export default function SponsorActivitiesAddModal(props: Props) { }, [formDataSponsorID]); const NO_SPONSORS_MESSAGE = '企業が登録されていません'; + + const onClose = () => { + props.setIsOpen(false); + }; // 協賛活動の情報 const content = (data: SponsorActivity) => ( @@ -426,14 +430,10 @@ export default function SponsorActivitiesAddModal(props: Props) { }; return ( - +

- { - props.setIsOpen(false); - }} - /> +
協賛活動の登録
diff --git a/view/next-project/src/components/sponsoractivities/UploadFileModal.tsx b/view/next-project/src/components/sponsoractivities/UploadFileModal.tsx index 063b82da5..928070232 100644 --- a/view/next-project/src/components/sponsoractivities/UploadFileModal.tsx +++ b/view/next-project/src/components/sponsoractivities/UploadFileModal.tsx @@ -152,7 +152,7 @@ const UplaodFileModal: FC = (props) => { }; return ( - +
From 5b7fdb715ec198b7c2bedcc7641ea1675a9fb18f Mon Sep 17 00:00:00 2001 From: uchida189 Date: Sat, 24 Aug 2024 05:46:53 +0000 Subject: [PATCH 2/2] formatted by workflow --- .../sponsoractivities/AddPdfDetailModal.tsx | 6 ++---- .../src/components/sponsoractivities/DeleteModal.tsx | 2 +- .../sponsoractivities/EditInvoiceModal.tsx | 12 +++--------- .../src/components/sponsoractivities/EditModal.tsx | 8 +++----- .../components/sponsoractivities/PaymentDayModal.tsx | 4 +--- .../sponsoractivities/SponsorActivitiesAddModal.tsx | 4 ++-- 6 files changed, 12 insertions(+), 24 deletions(-) diff --git a/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx b/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx index f5d555297..b2d5eec41 100644 --- a/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx +++ b/view/next-project/src/components/sponsoractivities/AddPdfDetailModal.tsx @@ -90,7 +90,7 @@ export default function AddPdfDetailModal(props: ModalProps) { (e: React.ChangeEvent | React.ChangeEvent) => { setInvoiceDate({ ...invoiceData, [input]: e.target.value }); }; - + const onClose = () => { props.setIsOpen(false); }; @@ -99,9 +99,7 @@ export default function AddPdfDetailModal(props: ModalProps) {
- +

請求書の発行 diff --git a/view/next-project/src/components/sponsoractivities/DeleteModal.tsx b/view/next-project/src/components/sponsoractivities/DeleteModal.tsx index 7afc83bfc..99f7cd0db 100644 --- a/view/next-project/src/components/sponsoractivities/DeleteModal.tsx +++ b/view/next-project/src/components/sponsoractivities/DeleteModal.tsx @@ -17,7 +17,7 @@ const SponsorActivitiesDeleteModal: FC = (props) => { props.setShowModal(false); router.reload(); }; - + const onClose = () => { props.setShowModal(false); }; diff --git a/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx b/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx index 1fb0de6a5..02ee5a672 100644 --- a/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx +++ b/view/next-project/src/components/sponsoractivities/EditInvoiceModal.tsx @@ -51,7 +51,7 @@ export default function EditInvoiceModal(props: ModalProps) { setInvoice(editInvoice); setIsOpen(false); }; - + const onClose = () => { props.setIsOpen(false); }; @@ -60,9 +60,7 @@ export default function EditInvoiceModal(props: ModalProps) {

- +
請求書の修正
@@ -136,11 +134,7 @@ export default function EditInvoiceModal(props: ModalProps) {
- - 戻る - + 戻る 編集完了
diff --git a/view/next-project/src/components/sponsoractivities/EditModal.tsx b/view/next-project/src/components/sponsoractivities/EditModal.tsx index 7bf06eb14..4fb3ba165 100644 --- a/view/next-project/src/components/sponsoractivities/EditModal.tsx +++ b/view/next-project/src/components/sponsoractivities/EditModal.tsx @@ -210,7 +210,7 @@ export default function EditModal(props: ModalProps) { }, [formDataSponsorID]); const NO_SPONSORS_MESSAGE = '企業が登録されていません'; - + const onClose = () => { props.setIsOpen(false); }; @@ -359,7 +359,7 @@ export default function EditModal(props: ModalProps) {
- +
協賛企業の修正
@@ -371,9 +371,7 @@ export default function EditModal(props: ModalProps) {
)}
- - 戻る - + 戻る { submit(formData); diff --git a/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx b/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx index 0925d8cfc..d55ecd397 100644 --- a/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx +++ b/view/next-project/src/components/sponsoractivities/PaymentDayModal.tsx @@ -55,9 +55,7 @@ export default function PaymentDayModal(props: ModalProps) {
- +

入金日を入力 diff --git a/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx b/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx index 842f549bb..b2a8b84fa 100644 --- a/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx +++ b/view/next-project/src/components/sponsoractivities/SponsorActivitiesAddModal.tsx @@ -198,7 +198,7 @@ export default function SponsorActivitiesAddModal(props: Props) { }, [formDataSponsorID]); const NO_SPONSORS_MESSAGE = '企業が登録されていません'; - + const onClose = () => { props.setIsOpen(false); }; @@ -433,7 +433,7 @@ export default function SponsorActivitiesAddModal(props: Props) {

- +
協賛活動の登録