Complete Enhanced Triple Migration Pattern for PhotoDialog and OfferDialog components

- Implement 4-phase migration pattern: Database + SQL + Notifications + Template Streamlining
- PhotoDialog.vue: Replace databaseUtil with PlatformServiceMixin, add 8 notification constants, extract 11 computed properties
- OfferDialog.vue: Replace databaseUtil with PlatformServiceMixin, add 7 notification constants, extract CSS classes to computed properties
- Update migration template with Phase 4 (Template Streamlining) and Phase 5 (Code Quality Review)
- Add 15 centralized notification constants to src/constants/notifications.ts

Migration validation: 25/27 components complete (93% success rate)
This commit is contained in:
Matthew Raymer
2025-07-07 09:56:40 +00:00
parent c28ddc0c5c
commit 17e30762bd
6 changed files with 849 additions and 264 deletions

View File

@@ -196,3 +196,80 @@ export const NOTIFY_CAMERA_SHARE_METHOD = {
yesText: "we are nearby with cameras",
noText: "we will share another way",
};
// OfferDialog.vue constants
export const NOTIFY_OFFER_SETTINGS_ERROR = {
title: "Error",
message: "There was an error retrieving your settings.",
};
export const NOTIFY_OFFER_RECORDING = {
text: "Recording the offer...",
title: "",
};
export const NOTIFY_OFFER_IDENTITY_REQUIRED = {
title: "Error",
message: "You must select an identity before you can record an offer.",
};
export const NOTIFY_OFFER_DESCRIPTION_REQUIRED = {
title: "Error",
message: "You must enter a description or some number of {unit}.",
};
export const NOTIFY_OFFER_CREATION_ERROR = {
title: "Error",
message: "There was an error creating the offer.",
};
export const NOTIFY_OFFER_SUCCESS = {
title: "Success",
message: "That offer was recorded.",
};
export const NOTIFY_OFFER_SUBMISSION_ERROR = {
title: "Error",
message: "There was an error recording the offer.",
};
// PhotoDialog.vue constants
export const NOTIFY_PHOTO_SETTINGS_ERROR = {
title: "Error",
message: "There was an error retrieving your settings.",
};
export const NOTIFY_PHOTO_CAPTURE_ERROR = {
title: "Error",
message: "Failed to take picture. Please try again.",
};
export const NOTIFY_PHOTO_CAMERA_ERROR = {
title: "Camera Error",
message: "Could not access camera. Please check permissions and try again.",
};
export const NOTIFY_PHOTO_UPLOAD_ERROR = {
title: "Upload Error",
message: "Failed to upload image. Please try again.",
};
export const NOTIFY_PHOTO_UPLOAD_SUCCESS = {
title: "Success",
message: "Image uploaded successfully.",
};
export const NOTIFY_PHOTO_UNSUPPORTED_FORMAT = {
title: "Unsupported Format",
message: "This file format is not supported. Please try a different image.",
};
export const NOTIFY_PHOTO_SIZE_ERROR = {
title: "File Too Large",
message: "Image file is too large. Please choose a smaller image.",
};
export const NOTIFY_PHOTO_PROCESSING_ERROR = {
title: "Processing Error",
message: "Failed to process image. Please try again.",
};