Skip to content

[WIP] Add "New Service" page to allow service creation#20

Merged
reenatoteixeira merged 6 commits intostagefrom
feat/services-module/new-service-page
Mar 31, 2026
Merged

[WIP] Add "New Service" page to allow service creation#20
reenatoteixeira merged 6 commits intostagefrom
feat/services-module/new-service-page

Conversation

@reenatoteixeira
Copy link
Copy Markdown
Member

This pull request introduces a new "Create Service" feature, allowing users to add new services to the catalog via a dedicated page and form. It also updates the service data model, improves the input field UI, and ensures newly created service documents include their generated ID.

The most important changes include:

New Service Creation Feature:

  • Added a new page component NewServicePage with a form for creating services, including fields for name, description, pricing, and promotional details. The form handles submission, validation, and user feedback. (src/modules/services/pages/NewServicePage.tsx)
  • Registered the new page in the services module exports and in the app router, and added a protected route at /services/new so only authenticated users can access it. (src/modules/services/pages/index.tsx, src/router/components/AppRoute.tsx) [1] [2] [3]

Data Model and Backend Integration:

  • Updated the Service type by removing the unused imageUrl property to match the new service creation form. (src/modules/services/types/Service.types.ts)
  • Modified the createDocument function to automatically set the generated document ID into the id field of the new service record. (src/services/firebase/firestore.ts)

UI/UX Improvements:

  • Improved the InputField component's styling to ensure full width and adjusted label styling for consistency. (src/shared/components/InputField/InputField.styles.ts, src/shared/components/InputField/InputField.tsx) [1] [2]

@reenatoteixeira reenatoteixeira self-assigned this Mar 31, 2026
@reenatoteixeira reenatoteixeira added the enhancement New feature or request label Mar 31, 2026
@reenatoteixeira reenatoteixeira merged commit 47446d2 into stage Mar 31, 2026
2 checks passed
@reenatoteixeira reenatoteixeira deleted the feat/services-module/new-service-page branch March 31, 2026 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant