wuyi 2 недель назад
Родитель
Сommit
5fe79e8b19
1 измененных файлов с 7 добавлено и 18 удалено
  1. 7 18
      src/views/ScanView.vue

+ 7 - 18
src/views/ScanView.vue

@@ -65,7 +65,7 @@ const FORM_KEY_MAP = Object.freeze({
     'name',
     'gender',
     'phone',
-    'specialNote',
+    'remark',
     'emergencyContactName',
     'emergencyContactPhone',
     'emergencyContactEmail',
@@ -80,7 +80,7 @@ const FORM_KEY_MAP = Object.freeze({
 const DEFAULT_FORM_STATE = Object.freeze({
   photoUrl: '',
   name: '',
-  gender: 'unknown',
+  gender: 'other',
   phone: '',
   specialNote: '',
   emergencyContactName: '',
@@ -1122,12 +1122,7 @@ onMounted(() => {
                         </div>
                         <p class="text-xs font-medium uppercase tracking-wider text-slate-500">{{ isPerson ? 'Additional notes' : isGoods ? 'Item notes' : 'Extra description' }}</p>
                       </div>
-                      <div v-if="isPerson" class="mt-3">
-                        <p class="whitespace-pre-wrap text-sm leading-relaxed text-slate-700">
-                          {{ profile?.specialNote || 'No extra details' }}
-                        </p>
-                      </div>
-                      <div v-else class="mt-3">
+                      <div class="mt-3">
                         <div v-if="parseRemarkToArray(profile?.remark).length === 0" class="text-sm text-slate-500">
                           No extra details
                         </div>
@@ -1293,7 +1288,7 @@ onMounted(() => {
                   <button v-for="option in [
                     { label: 'Male', value: 'male' },
                     { label: 'Female', value: 'female' },
-                    { label: 'Prefer not to say', value: 'unknown' }
+                    { label: 'Other', value: 'other' }
                   ]" :key="option.value" type="button" class="flex-1 rounded-2xl border px-4 py-3 text-sm"
                     :class="formData.gender === option.value ? 'border-slate-900 bg-slate-900 text-white' : 'border-slate-200 text-slate-500'"
                     @click="formData.gender = option.value">
@@ -1379,15 +1374,9 @@ onMounted(() => {
               </label>
             </div>
 
-            <label v-if="isPerson" class="block space-y-2 text-sm">
-              <span class="text-slate-500">Additional notes / health tips</span>
-              <textarea v-model="formData.specialNote" rows="4"
-                class="w-full rounded-2xl border border-slate-200 px-4 py-3"
-                placeholder="e.g. allergies, medical needs, carried items" />
-            </label>
-            <div v-else class="space-y-3">
+            <div class="space-y-3">
               <label class="block text-sm">
-                <span class="text-slate-500">{{ isGoods ? 'Item notes' : 'Extra remarks' }}</span>
+                <span class="text-slate-500">{{ isPerson ? 'Additional notes / health tips' : isGoods ? 'Item notes' : 'Extra remarks' }}</span>
                 <p class="mt-1 text-xs text-slate-400">You can add up to 4 remarks</p>
               </label>
               <div class="space-y-3">
@@ -1397,7 +1386,7 @@ onMounted(() => {
                       v-model="formData.remark[index.toString()]"
                       rows="3"
                       class="w-full rounded-2xl border border-slate-200 px-4 py-3 resize-y min-h-[3rem]"
-                      :placeholder="isGoods ? `Item note ${index} (e.g. item features, usage notes)` : `Remark ${index} (e.g. pet habits, health info)`" />
+                      :placeholder="isPerson ? `Note ${index} (e.g. allergies, medical needs, carried items)` : isGoods ? `Item note ${index} (e.g. item features, usage notes)` : `Remark ${index} (e.g. pet habits, health info)`" />
                   </div>
                   <button
                     v-if="index > 1 || (index === 1 && getRemarkIndexes().length > 1)"