-
+
{{
(field.value as { date?: Date })?.date
? formatDate((field.value as { date: Date }).date)
: ""
}}
+
+
+
+
@@ -140,18 +159,35 @@ const scheduleSchema = z.object({
dates: z.object({
start: z.date(),
end: z.date(),
+ allDayLong: z.boolean().optional(),
}),
- times: z.array(
- z.object({
- date: z.date(),
- // Allow null/undefined initially, or enforce validation if needed.
- startTime: z.date().nullable().optional(),
- endTime: z.date().nullable().optional(),
- })
- ),
+ times: z
+ .array(
+ z.object({
+ date: z.date(),
+ // Allow null/undefined initially, or enforce validation if needed.
+ startTime: z.date().nullable(),
+ endTime: z.date().nullable(),
+ allDayLong: z.boolean().optional(),
+ })
+ )
+ .refine(
+ (times) => {
+ // Ensure startTime is before endTime for each entry.
+ return times.every((t) => {
+ if (t.allDayLong) return true;
+ if (t.startTime && t.endTime) {
+ return t.startTime <= t.endTime;
+ }
+ return true; // Skip validation if times are null/undefined
+ });
+ },
+ {
+ message: "Start time must be before end time",
+ }
+ ),
createAnother: z.boolean().optional(),
});
-
const syncTimesArray = (
dateRange: { start: Date; end: Date } | null,
currentTimes: {
@@ -206,10 +242,21 @@ const handlePrev = () => {
};
const handleSubmit = async (values: Record) => {
- // Simulate API delay.
- await new Promise((resolve) => setTimeout(resolve, 500));
-
+ const { times, createAnother } = values;
if (!flow) return;
- flow.next(values);
+ const mappedTimes = (
+ times as {
+ date: Date;
+ startTime: Date;
+ endTime: Date;
+ allDayLong?: boolean;
+ }[]
+ ).map((t) => ({
+ date: t.date.toISOString().split("T")[0],
+ start_time: t.startTime,
+ end_time: t.endTime,
+ all_day: t.allDayLong || false,
+ }));
+ flow.next({ times: mappedTimes, createAnother });
};
diff --git a/frontend/app/components/machine/steps/createEvent/MachineStepsCreateEventType.vue b/frontend/app/components/machine/steps/createEvent/MachineStepsCreateEventType.vue
index 12fe34545..1781a1986 100644
--- a/frontend/app/components/machine/steps/createEvent/MachineStepsCreateEventType.vue
+++ b/frontend/app/components/machine/steps/createEvent/MachineStepsCreateEventType.vue
@@ -53,6 +53,7 @@
v-slot="{ id, handleChange, value }"
:label="$t('i18n.components._global.topics')"
name="topics"
+ required
>
("flow");
const topicsSettingsSchema = z.object({
setting: z.string().min(1, t("i18n._global.required")),
- topics: z.array(z.string()).optional(),
+ topics: z.array(z.string()).min(1, t("i18n._global.required")),
type: z.string().min(1, t("i18n._global.required")),
});
const handlePrev = () => {
@@ -114,10 +115,10 @@ const optionLocations = [
class: "text-nowrap",
},
];
-const handleSubmit = async (values: Record) => {
+const handleSubmit = (values: Record) => {
// Simulate an API call.
- await new Promise((resolve) => setTimeout(resolve, 1000));
+ const { setting, ...rest } = values;
if (!flow) return;
- flow.next(values);
+ flow.next({ location_type: setting, ...rest });
};
diff --git a/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupDetails.vue b/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupDetails.vue
index b2e2c10e8..4caaa7b79 100644
--- a/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupDetails.vue
+++ b/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupDetails.vue
@@ -87,10 +87,9 @@ const organizationDetailsSchema = z.object({
description: z.string().min(1, t("i18n._global.required")),
organization: z.string().min(1, t("i18n._global.required")),
});
-const handleSubmit = async (values: Record) => {
+const handleSubmit = (values: Record) => {
// Simulate an API call.
- await new Promise((resolve) => setTimeout(resolve, 1000));
if (!flow) return;
- flow.next(values);
+ flow.next({ ...values, org: values.organization });
};
diff --git a/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupLocation.vue b/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupLocation.vue
index 3b19ec197..3e2ade67e 100644
--- a/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupLocation.vue
+++ b/frontend/app/components/machine/steps/createGroup/MachineStepsCreateGroupLocation.vue
@@ -16,11 +16,12 @@
},
]"
class="space-y-4"
+ :initial-values="formData"
:schema="locationSchema"
>
@@ -29,13 +30,13 @@
@update:selected-country="handleChange"
disabled
:hasError="!!errorMessage.value"
- :label="$t('i18n.components.machine.steps._global.country')"
+ :label="$t('i18n.components._global.country')"
:selected-country="(value.value as string) || ''"
/>
@@ -44,7 +45,7 @@
@blur="handleBlur"
@input="handleChange"
:hasError="!!errorMessage.value"
- :label="$t('i18n.components.machine.steps._global.city')"
+ :label="$t('i18n.components._global.city')"
:modelValue="(value.value as string)"
/>
@@ -56,7 +57,17 @@
import { z } from "zod";
const flow = inject("flow");
-
+const { data: organization } = useGetOrganization(
+ (
+ flow?.context.value.nodeData
+ ?.groupDetails as ContextCreateGroupData[CreateGroupSteps.GroupDetails]
+ ).org
+);
+const formData = computed(() => {
+ return {
+ country: organization.value?.location.countryCode || "",
+ };
+});
const locationSchema = z.object({
country: z.string().min(1, "Country is required"),
city: z.string().min(1, "City is required"),
@@ -65,10 +76,11 @@ const handlePrev = () => {
if (!flow) return;
flow.prev();
};
-const handleSubmit = async (values: Record) => {
+const handleSubmit = (values: Record) => {
// Simulate an API call.
- await new Promise((resolve) => setTimeout(resolve, 1000));
+
+ const { city, country } = values;
if (!flow) return;
- flow.next(values);
+ flow.next({ city, countryCode: country });
};
diff --git a/frontend/app/components/machine/steps/createOrganization/MachineStepsCreateOrganizationsLocation.vue b/frontend/app/components/machine/steps/createOrganization/MachineStepsCreateOrganizationsLocation.vue
index 5404c9d68..9ff354b11 100644
--- a/frontend/app/components/machine/steps/createOrganization/MachineStepsCreateOrganizationsLocation.vue
+++ b/frontend/app/components/machine/steps/createOrganization/MachineStepsCreateOrganizationsLocation.vue
@@ -20,7 +20,7 @@
>
@@ -28,13 +28,13 @@
:id="id"
@update:selected-country="handleChange"
:hasError="!!errorMessage.value"
- :label="$t('i18n.components.machine.steps._global.country')"
+ :label="$t('i18n.components._global.country')"
:selected-country="(value.value as string) || ''"
/>
@@ -43,7 +43,7 @@
@blur="handleBlur"
@input="handleChange"
:hasError="!!errorMessage.value"
- :label="$t('i18n.components.machine.steps._global.city')"
+ :label="$t('i18n.components._global.city')"
:modelValue="(value.value as string)"
/>
@@ -65,8 +65,8 @@ const handlePrev = () => {
};
const handleSubmit = async (values: Record) => {
// Simulate an API call.
- await new Promise((resolve) => setTimeout(resolve, 1000));
+ const { country, city } = values;
if (!flow) return;
- flow.next(values);
+ flow.next({ country_code: country, city });
};
diff --git a/frontend/app/components/media/MediaUrl.vue b/frontend/app/components/media/MediaUrl.vue
new file mode 100644
index 000000000..5e3844e70
--- /dev/null
+++ b/frontend/app/components/media/MediaUrl.vue
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
diff --git a/frontend/app/components/media/map/MediaMapEvent.vue b/frontend/app/components/media/map/MediaMapEvent.vue
index 48a5de910..d4ee6962f 100644
--- a/frontend/app/components/media/map/MediaMapEvent.vue
+++ b/frontend/app/components/media/map/MediaMapEvent.vue
@@ -49,7 +49,7 @@ const buildExpandedTooltip = () => {

-
${event.physicalLocation?.displayName.split(",").slice(0, 3).join(", ")}
+
${event.physicalLocation?.addressOrName.split(",").slice(0, 3).join(", ")}
@@ -62,7 +62,9 @@ const pointer: Pointer = {
id: event.id,
color: getEventColorByType(event.type as EventType),
location: event.physicalLocation || {
- displayName: event.name,
+ addressOrName: event.name,
+ city: "",
+ countryCode: "",
lat: "0",
lon: "0",
id: "",
diff --git a/frontend/app/components/media/map/MediaMapEvents.vue b/frontend/app/components/media/map/MediaMapEvents.vue
index 7da2d5b66..1bcb1a8e9 100644
--- a/frontend/app/components/media/map/MediaMapEvents.vue
+++ b/frontend/app/components/media/map/MediaMapEvents.vue
@@ -128,7 +128,9 @@ const pointers: PointerCluster[] = events.map((event) => {
id: event.id,
color: getEventColorByType(event.type as EventType),
location: event.physicalLocation || {
- displayName: event.name,
+ city: "",
+ countryCode: "",
+ addressOrName: event.name,
lat: "0",
lon: "0",
id: "",
@@ -140,7 +142,7 @@ const pointers: PointerCluster[] = events.map((event) => {
name: event.name,
type: event.type,
location: event.physicalLocation
- ? event.physicalLocation.displayName
+ ? event.physicalLocation.addressOrName
: "",
},
};
diff --git a/frontend/app/components/meta-tag/MetaTagDates.vue b/frontend/app/components/meta-tag/MetaTagDates.vue
new file mode 100644
index 000000000..1f43b3f75
--- /dev/null
+++ b/frontend/app/components/meta-tag/MetaTagDates.vue
@@ -0,0 +1,51 @@
+
+
+
+
+
+ ... show more dates
+
+
+
+
+
diff --git a/frontend/app/components/modal/create/ModalCreateEvent.vue b/frontend/app/components/modal/create/ModalCreateEvent.vue
index e3774da31..4fbee673d 100644
--- a/frontend/app/components/modal/create/ModalCreateEvent.vue
+++ b/frontend/app/components/modal/create/ModalCreateEvent.vue
@@ -9,15 +9,18 @@
/>
+