|
|
|
|
@ -2,7 +2,7 @@ import { NavLink } from 'react-router-dom'
|
|
|
|
|
import { useState, useEffect } from 'react'
|
|
|
|
|
import { Row, Col, Space, Button, Table, Typography, Modal, App, Select } from 'antd'
|
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
|
import { isEmpty } from '@/utils/commons'
|
|
|
|
|
import { groupBy, isEmpty } from '@/utils/commons'
|
|
|
|
|
import { useTranslation } from 'react-i18next'
|
|
|
|
|
import useFormStore from '@/stores/Form'
|
|
|
|
|
import useReservationStore from '@/stores/Reservation'
|
|
|
|
|
@ -140,13 +140,11 @@ function Newest() {
|
|
|
|
|
const initAgencyGuideList = (agencyId) => {
|
|
|
|
|
fetchAgencyGuideList(agencyId)
|
|
|
|
|
.then((guideList) => {
|
|
|
|
|
const selectOptions = guideList.map((data) => {
|
|
|
|
|
return {
|
|
|
|
|
value: data.guideId,
|
|
|
|
|
label: data.guideName + '(' + data.mobileNo + ')',
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
setGuideSelectOptions(selectOptions)
|
|
|
|
|
const guideCity = (groupBy(guideList, 'cityName'));
|
|
|
|
|
const guideOptions = Object.keys(guideCity).map(city => ({
|
|
|
|
|
label: city, options: guideCity[city].map(guide => ({ value: guide.guideId, label: guide.guideName + '(' + guide.mobileNo + ')', })),
|
|
|
|
|
}));
|
|
|
|
|
setGuideSelectOptions(guideOptions)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|