Frontend
attik-frontend/src/app/tools/settings/scheduling/online-service-filter/ServiceFilterOptionModal.tsx — The modal holds description and question in local state and, on save, sends them as description.trim() || undefined and question.trim() || undefined. When the user clears a field, that becomes undefined and is omitted from the JSON body. The fix must ensure that when the user intends to clear a field, the backend receives an explicit value that means "clear" (e.g. empty string) so the stored value can be updated. The same consideration applies for both create and update payloads.Backend
attik-backend/src/routes/serviceFilter.ts — The PUT /options/:id handler updates option.description and option.question only when the corresponding key is present in the request body (if (description !== undefined) option.description = description;). When the frontend omits the key (because it sent undefined), the backend does not change the field. No backend change is strictly required if the frontend starts sending an explicit empty string for "cleared" optional fields; the existing logic will then set the stored value to empty. If the team prefers the backend to treat a missing key as "clear," that would be a separate decision and would need to be applied consistently for optional string fields on this endpoint.attik-backend/src/models/serviceFilterOptionSchema.ts — The description and question fields are optional (required: false). Storing an empty string is valid and already supported.Decision
attik-frontend/src/app/tools/settings/scheduling/online-service-filter/ServiceFilterOptionModal.tsx (handleSave, update and create payloads)attik-backend/src/routes/serviceFilter.ts (PUT /options/:id)attik-backend/src/models/serviceFilterOptionSchema.tsPlease authenticate to join the conversation.
Planned
New Features
18 days ago
Linear
Get notified by email when there are changes.
Planned
New Features
18 days ago
Linear
Get notified by email when there are changes.