From 8c2fafc2f9551b81ff67cdfa7bb4d1dd6a074b65 Mon Sep 17 00:00:00 2001 From: imaimai17468 Date: Wed, 24 May 2023 02:42:50 +0900 Subject: [PATCH 1/3] =?UTF-8?q?[fix]=20=E7=89=A9=E5=93=81=E7=94=B3?= =?UTF-8?q?=E8=AB=8B=E3=82=92=E6=8A=98=E3=82=8A=E8=BF=94=E3=81=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- user_front/pages/regist_info/index.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/user_front/pages/regist_info/index.vue b/user_front/pages/regist_info/index.vue index 5496c859a..795f107a5 100644 --- a/user_front/pages/regist_info/index.vue +++ b/user_front/pages/regist_info/index.vue @@ -495,7 +495,7 @@ const rentalItemOverlap = computed(() => {

{{ rentalItemOverlap }} が重複しています

削除してください

-
+
Date: Wed, 24 May 2023 03:25:12 +0900 Subject: [PATCH 2/3] =?UTF-8?q?[fix]=20=E7=B7=A8=E9=9B=86=E3=81=AB?= =?UTF-8?q?=E9=96=A2=E3=81=97=E3=81=A6=E3=80=81=E3=83=AA=E3=82=BB=E3=83=83?= =?UTF-8?q?=E3=83=88=E3=81=99=E3=82=8B=E3=81=A8=E3=83=90=E3=83=AA=E3=83=87?= =?UTF-8?q?=E3=83=BC=E3=82=B7=E3=83=A7=E3=83=B3=E3=81=8C=E5=83=8D=E3=81=8F?= =?UTF-8?q?=E3=82=88=E3=81=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../components/RegistInfo/edit/Employee.vue | 2 + .../components/RegistInfo/edit/Food.vue | 3 + .../components/RegistInfo/edit/Item.vue | 2 + .../components/RegistInfo/edit/Place.vue | 102 ++++++++++-------- .../components/RegistInfo/edit/Power.vue | 5 + .../components/RegistInfo/edit/Purchase.vue | 5 + .../components/RegistInfo/edit/Stage.vue | 6 ++ .../RegistInfo/edit/StageOption.vue | 5 + .../components/RegistInfo/edit/SubRep.vue | 6 ++ 9 files changed, 90 insertions(+), 46 deletions(-) diff --git a/user_front/components/RegistInfo/edit/Employee.vue b/user_front/components/RegistInfo/edit/Employee.vue index 7719fc7d4..ee6c2683d 100644 --- a/user_front/components/RegistInfo/edit/Employee.vue +++ b/user_front/components/RegistInfo/edit/Employee.vue @@ -74,6 +74,8 @@ const editEmployee = async () => { const reset = () => { newName.value = '' newStudentId.value = null + handleName(newName.value) + handleStudentId(newStudentId.value) } diff --git a/user_front/components/RegistInfo/edit/Food.vue b/user_front/components/RegistInfo/edit/Food.vue index 31e98ba70..ba6278653 100644 --- a/user_front/components/RegistInfo/edit/Food.vue +++ b/user_front/components/RegistInfo/edit/Food.vue @@ -89,6 +89,9 @@ const reset = () => { newIsCooking.value = false; newNumFirstDay.value = null; newNumSecondDay.value = null; + handleDishName(newDishName.value); + handleNumFirstDay(newNumFirstDay.value); + handleNumSecondDay(newNumSecondDay.value); }; diff --git a/user_front/components/RegistInfo/edit/Item.vue b/user_front/components/RegistInfo/edit/Item.vue index 406cf6e14..1c2813e9d 100644 --- a/user_front/components/RegistInfo/edit/Item.vue +++ b/user_front/components/RegistInfo/edit/Item.vue @@ -118,6 +118,8 @@ const editItem = async () => { const reset = () => { newItem.value = null; newNum.value = null; + handleName(newItem.value); + handleNum(newNum.value); }; // 物品のidから物品の情報を取得し、物品の貸し出し可能数を返す diff --git a/user_front/components/RegistInfo/edit/Place.vue b/user_front/components/RegistInfo/edit/Place.vue index e1ce02657..bcc888c3d 100644 --- a/user_front/components/RegistInfo/edit/Place.vue +++ b/user_front/components/RegistInfo/edit/Place.vue @@ -2,9 +2,10 @@ import { Place, PlaceList } from "~~/types/regist/place"; import { useField, useForm } from "vee-validate"; import { placeSchema } from "~~/utils/validate"; -const config = useRuntimeConfig(); import axios from "axios"; +const config = useRuntimeConfig(); + interface Props { id: number | null; first: number | null; @@ -32,6 +33,7 @@ const { meta, isSubmitting } = useForm({ first: props.first, second: props.second, third: props.third, + remark: props.remark, }, }); const { handleChange: handleFirstPlace, errorMessage: firstPlaceError } = @@ -40,6 +42,8 @@ const { handleChange: handleSecondPlace, errorMessage: secondPlaceError } = useField("second"); const { handleChange: handleThirdPlace, errorMessage: thirdPlaceError } = useField("third"); +const { handleChange: handleRemark, errorMessage: remarkError } = + useField("remark"); const EATING_AREA = [ "事務棟エリア", @@ -52,7 +56,6 @@ const isEatingArea = (place: string) => { return EATING_AREA.includes(place); }; - const placeList = ref([]); const newFirst = ref(props.first); const newSecond = ref(props.second); @@ -60,7 +63,7 @@ const newThird = ref(props.third); const newRemark = ref(props.remark); const groupCategoryId = ref(); const isOverlapPlace = ref(false); -const group_id = ref() +const group_id = ref(); const isDuplicate = computed(() => { if ( newFirst.value === newSecond.value || @@ -83,10 +86,12 @@ const closeEditPlace = () => { onMounted(async () => { const placeData = await $fetch(config.APIURL + "/places"); - !!placeData.data && placeData.data.forEach((place) => { - placeList.value.push(place) - }) - const groupUrl = config.APIURL + "/groups/" + Number(localStorage.getItem("group_id")); + !!placeData.data && + placeData.data.forEach((place) => { + placeList.value.push(place); + }); + const groupUrl = + config.APIURL + "/groups/" + Number(localStorage.getItem("group_id")); axios.get(groupUrl).then(async (response) => { groupCategoryId.value = response.data.data.group_category_id; @@ -102,7 +107,7 @@ onMounted(async () => { } }); }); -}) +}); const editPlace = async () => { if (props.id === null) { @@ -114,10 +119,9 @@ const editPlace = async () => { second: newSecond.value, third: newThird.value, remark: newRemark.value, - } - }) - } - else{ + }, + }); + } else { await useFetch(config.APIURL + "/place_orders/" + props.id, { method: "PUT", params: { @@ -126,18 +130,22 @@ const editPlace = async () => { second: newSecond.value, third: newThird.value, remark: newRemark.value, - } - }) + }, + }); } - reloadPlace() - closeEditPlace() -} + reloadPlace(); + closeEditPlace(); +}; const reset = () => { newFirst.value = null; newSecond.value = null; newThird.value = null; newRemark.value = ""; + handleFirstPlace(newFirst.value); + handleSecondPlace(newSecond.value); + handleThirdPlace(newThird.value); + handleRemark(newRemark.value); }; @@ -154,48 +162,50 @@ const reset = () => {