diff --git a/met-api/src/met_api/models/staff_user.py b/met-api/src/met_api/models/staff_user.py index ae3fc6d25..7cd058d98 100644 --- a/met-api/src/met_api/models/staff_user.py +++ b/met-api/src/met_api/models/staff_user.py @@ -33,7 +33,7 @@ class StaffUser(BaseModel): email_address = Column(db.String(100), nullable=True) contact_number = Column(db.String(50), nullable=True) external_id = Column(db.String(50), nullable=False, unique=True) - status_id = db.Column(db.Integer, ForeignKey('user_status.id'), nullable=False, server_default='1') + status_id = db.Column(db.Integer, ForeignKey('user_status.id'), nullable=False, default=1) tenant_id = db.Column(db.Integer, db.ForeignKey('tenant.id'), nullable=True) @classmethod diff --git a/met-api/src/met_api/utils/datetime.py b/met-api/src/met_api/utils/datetime.py index 7b657f18c..3644a9356 100644 --- a/met-api/src/met_api/utils/datetime.py +++ b/met-api/src/met_api/utils/datetime.py @@ -20,7 +20,7 @@ def local_datetime(): """Get the local (Pacific Timezone) datetime.""" utcmoment = datetime.utcnow().replace(tzinfo=pytz.utc) - now = utcmoment.astimezone(pytz.timezone('America/Vancouver')) + now = utcmoment.astimezone(pytz.timezone('US/Pacific')) return now diff --git a/met-web/src/components/Form/formio.scss b/met-web/src/components/Form/formio.scss index c5090663f..514b8eaf2 100644 --- a/met-web/src/components/Form/formio.scss +++ b/met-web/src/components/Form/formio.scss @@ -644,3 +644,7 @@ div[disabled] { overflow-y: auto !important; max-height: 200px !important; } + +.choices__list--dropdown .choices__list { + overflow: visible; +} diff --git a/met-web/src/components/FormioModalListener/index.tsx b/met-web/src/components/FormioModalListener/index.tsx new file mode 100644 index 000000000..1ef377da3 --- /dev/null +++ b/met-web/src/components/FormioModalListener/index.tsx @@ -0,0 +1,17 @@ +import { useEffect } from 'react'; +import { useLocation } from 'react-router-dom'; + +const FormioModalListener = () => { + const { pathname } = useLocation(); + + useEffect(() => { + const formioModal = document.querySelector('.formio-dialog'); + if (formioModal) { + formioModal.remove(); + } + }, [pathname]); + + return null; +}; + +export default FormioModalListener; diff --git a/met-web/src/components/common/dateHelper.tsx b/met-web/src/components/common/dateHelper.tsx index ab4e7e8dc..e05143697 100644 --- a/met-web/src/components/common/dateHelper.tsx +++ b/met-web/src/components/common/dateHelper.tsx @@ -10,7 +10,7 @@ const formatToUTCTimeZone = (date: string, fmt: string) => dayjs(date).utc().for export const formatDate = (date: Dayjs | string, formatString = 'YYYY-MM-DD') => { if (date) { - return formatToPacificTimeZone(date.toString(), formatString, 'America/Los_Angeles'); + return formatToPacificTimeZone(date.toString(), formatString, 'US/Pacific'); } else { return ''; } diff --git a/met-web/src/components/engagement/form/EngagementWidgets/Events/InPersonEventFormDrawer.tsx b/met-web/src/components/engagement/form/EngagementWidgets/Events/InPersonEventFormDrawer.tsx index d8b578a66..19440dee7 100644 --- a/met-web/src/components/engagement/form/EngagementWidgets/Events/InPersonEventFormDrawer.tsx +++ b/met-web/src/components/engagement/form/EngagementWidgets/Events/InPersonEventFormDrawer.tsx @@ -53,8 +53,8 @@ const InPersonEventFormDrawer = () => { } = useContext(EventsContext); const [isCreating, setIsCreating] = useState(false); const eventItemToEdit = eventToEdit ? eventToEdit.event_items[0] : null; - const startDate = dayjs(eventItemToEdit ? eventItemToEdit?.start_date : '').tz('America/Vancouver'); - const endDate = dayjs(eventItemToEdit ? eventItemToEdit?.end_date : '').tz('America/Vancouver'); + const startDate = dayjs(eventItemToEdit ? eventItemToEdit?.start_date : '').tz('US/Pacific'); + const endDate = dayjs(eventItemToEdit ? eventItemToEdit?.end_date : '').tz('US/Pacific'); const methods = useForm({ resolver: yupResolver(schema), }); diff --git a/met-web/src/components/engagement/form/EngagementWidgets/Events/VirtualSessionFormDrawer.tsx b/met-web/src/components/engagement/form/EngagementWidgets/Events/VirtualSessionFormDrawer.tsx index f6c99c6c1..64c749ebd 100644 --- a/met-web/src/components/engagement/form/EngagementWidgets/Events/VirtualSessionFormDrawer.tsx +++ b/met-web/src/components/engagement/form/EngagementWidgets/Events/VirtualSessionFormDrawer.tsx @@ -46,8 +46,8 @@ const VirtualSessionFormDrawer = () => { } = useContext(EventsContext); const [isCreating, setIsCreating] = useState(false); const eventItemToEdit = eventToEdit ? eventToEdit.event_items[0] : null; - const startDate = dayjs(eventItemToEdit ? eventItemToEdit?.start_date : '').tz('America/Vancouver'); - const endDate = dayjs(eventItemToEdit ? eventItemToEdit?.end_date : '').tz('America/Vancouver'); + const startDate = dayjs(eventItemToEdit ? eventItemToEdit?.start_date : '').tz('US/Pacific'); + const endDate = dayjs(eventItemToEdit ? eventItemToEdit?.end_date : '').tz('US/Pacific'); const methods = useForm({ resolver: yupResolver(schema), }); diff --git a/met-web/src/routes/AuthenticatedRoutes.tsx b/met-web/src/routes/AuthenticatedRoutes.tsx index d400331f4..c07c870ec 100644 --- a/met-web/src/routes/AuthenticatedRoutes.tsx +++ b/met-web/src/routes/AuthenticatedRoutes.tsx @@ -23,11 +23,13 @@ import { USER_ROLES } from 'services/userService/constants'; import UserProfile from 'components/userManagement/userDetails'; import ScrollToTop from 'components/scrollToTop'; import ReportSettings from 'components/survey/report'; +import FormioModalListener from 'components/FormioModalListener'; const AuthenticatedRoutes = () => { return ( <> + } /> } />