refatoração de frontend

pull/20/head
adriano 2023-08-09 10:26:54 -03:00
parent b3ac76e340
commit 7b1d2f2d2b
1 changed files with 7 additions and 24 deletions

View File

@ -95,12 +95,12 @@ const ConfigModal = ({ open, onClose, change }) => {
try {
const { data } = await api.get('/settings')
const outBusinessHours = data.config.find((c) => c.key == "outBusinessHours")
const ticketExpiration = data.config.find((c) => c.key == "ticketExpiration")
const saturday = data.config.find((c) => c.key == "saturday")
const sunday = data.config.find((c) => c.key == "sunday")
const weekend = data.config.find((c) => c.key == "weekend")
const holiday = data.config.find((c) => c.key == "holiday")
const outBusinessHours = data.config.find((c) => c.key === "outBusinessHours")
const ticketExpiration = data.config.find((c) => c.key === "ticketExpiration")
const saturday = data.config.find((c) => c.key === "saturday")
const sunday = data.config.find((c) => c.key === "sunday")
const weekend = data.config.find((c) => c.key === "weekend")
const holiday = data.config.find((c) => c.key === "holiday")
setConfig({
startTimeBus: outBusinessHours.startTime,
@ -444,23 +444,6 @@ const ConfigModal = ({ open, onClose, change }) => {
const TimePickerField = ({ field, form, ...other }) => {
const { name, value } = field
const handleChange = (time) => {
form.setFieldValue(name, time, true)
}
return (
<TimePicker
{...other}
name={name}
value={value}
onChange={handleChange}
format="hh:mm a"
/>
)
}
export default React.memo(ConfigModal)