Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issue #38: Make a request form #83

Merged
merged 17 commits into from
Mar 24, 2024

Conversation

delano
Copy link
Contributor

@delano delano commented Mar 24, 2024

User description

This pull request fixes issue #38 by making several changes to the RequestForm component. The changes include removing unused files, refactoring the component, adding missing pages, updating dependencies, and improving form layout and validation. These changes enhance the functionality and user experience of the request form.


Type

enhancement, documentation


Description

  • Added a new FoodDeliveryForm.vue component with dark mode support.
  • Removed unused RequestForm.vue and FoodRequestForm.vue components.
  • Updated dashboard layout with new icons and added a settings page link.
  • Updated the dashboard index page to include a new request form and request history.
  • Added a new settings page for portal settings including theme customization.
  • Added test cases for the dashboard index page.
  • Added FoodDeliveryFormState interface for the new food delivery form component.
  • Added type declaration for @vueform/plugin-mask.
  • Configured Vueform with the mask plugin and added @vueform/plugin-mask dependency.
  • Updated lock file with new dependencies.
  • Added JSON data for branch locations, countries, divisions level1, and languages for the food delivery form.

Changes walkthrough

Relevant files
Enhancement
6 files
RequestForm.vue
Remove Unused RequestForm Component                                           

apps/ui/components/RequestForm.vue

  • Removed the entire RequestForm.vue component.
+0/-1607
FoodDeliveryForm.vue
Add Food Delivery Form Component with Dark Mode Support   

apps/ui/components/requests/FoodDeliveryForm.vue

  • Added a new FoodDeliveryForm.vue component for handling food delivery
    requests.
  • Implemented form steps, schema, and state management for the food
    delivery form.
  • Added dark mode support to the form.
  • +745/-0 
    FoodRequestForm.vue
    Remove Unused FoodRequestForm Component                                   

    apps/ui/components/requests/FoodRequestForm.vue

    • Removed the FoodRequestForm.vue component.
    +0/-94   
    dashboard.vue
    Update Dashboard Layout with New Icons and Settings Page Link

    apps/ui/layouts/dashboard.vue

    • Updated navigation icons and added a new settings page link.
    +6/-5     
    index.vue
    Update Dashboard Index with New Request Form and History 

    apps/ui/pages/dashboard/index.vue

  • Updated the dashboard index page to include a new request form and
    request history.
  • +33/-1   
    settings.vue
    Add New Settings Page for Portal Customization                     

    apps/ui/pages/settings.vue

  • Added a new settings page for portal settings including theme
    customization.
  • +44/-0   
    Tests
    1 files
    index.nuxt.test.ts
    Add Test Cases for Dashboard Index Page                                   

    apps/ui/pages/dashboard/index.nuxt.test.ts

    • Added test cases for the dashboard index page.
    +328/-0 
    Documentation
    2 files
    index.d.ts
    Add FoodDeliveryFormState Interface for Food Delivery Form

    apps/ui/types/index.d.ts

  • Added FoodDeliveryFormState interface for the new food delivery form
    component.
  • +36/-0   
    vueform-plugin-mask.d.ts
    Add Type Declaration for Vueform Mask Plugin                         

    apps/ui/types/vueform-plugin-mask.d.ts

    • Added type declaration for @vueform/plugin-mask.
    +13/-0   
    Configuration changes
    1 files
    vueform.config.ts
    Configure Vueform with Mask Plugin                                             

    apps/ui/vueform.config.ts

    • Configured Vueform with the mask plugin.
    +4/-0     
    Dependencies
    2 files
    package.json
    Add Vueform Mask Plugin Dependency                                             

    apps/ui/package.json

    • Added @vueform/plugin-mask dependency.
    +1/-0     
    pnpm-lock.yaml
    Update Lock File with New Dependencies                                     

    apps/ui/pnpm-lock.yaml

    • Updated lock file with new dependencies.
    +34/-0   
    Data changes
    4 files
    branch_locations.json
    Add Branch Locations JSON Data for Food Delivery Form       

    apps/ui/public/json/branch_locations.json

    • Added branch locations JSON data for the food delivery form.
    +41/-0   
    countries.json
    Add Countries JSON Data for Food Delivery Form                     

    apps/ui/public/json/countries.json

    • Added countries JSON data for the food delivery form.
    +247/-0 
    divisions_level1.json
    Add Divisions Level1 JSON Data for Food Delivery Form       

    apps/ui/public/json/divisions_level1.json

    • Added divisions level1 JSON data for the food delivery form.
    +15/-0   
    languages.json
    Add Languages JSON Data for Food Delivery Form                     

    apps/ui/public/json/languages.json

    • Added languages JSON data for the food delivery form.
    +279/-0 

    delano added 17 commits March 20, 2024 20:03
    - Delete unused step schema and logic from RequestForm
    - Extract shared form elements into separate schema
    - Add styling to customize form theme
    - Update example dashboard page to demonstrate usage
    - Rename page# ids to step# for clarity
    - Add static section headers to indicate each step
    - Set Province/Territory field as required
    - Adjust column sizes for address fields
    - Hide redundant country select
    - Populate branch locations list
    - Remove unused accommodation and amenities fields
    Provides theme toggle within the dashboard area.
    Using FoodDeliveryFormState interface added in previous commit.
    - Move location details to reusable address component
    - Add pet details form with name, breed, age, weight
    - Require agreeing to safe drop policy before submitting
    - Update confirmation checkbox text for clarity
    - Adjust previous/next button labels for consistency
    Copy link

    joshua-keaton bot commented Mar 24, 2024

    PR Description updated to latest commit (ec06628)

    Copy link

    joshua-keaton bot commented Mar 24, 2024

    PR Review

    ⏱️ Estimated effort to review [1-5]

    4, due to the extensive changes across multiple files, including the addition of new components, updates to existing components, removal of unused components, and the introduction of new JSON data files. The PR involves both frontend and backend changes, requiring a thorough review of code functionality, style, and potential side effects.

    🧪 Relevant tests

    No

    🔍 Possible issues

    Possible Bug: The removal of RequestForm.vue and FoodRequestForm.vue components without ensuring all their functionalities are covered by the new FoodDeliveryForm.vue component.

    Performance Concern: The addition of multiple JSON files for dropdown options could impact the loading time if not properly handled or cached.

    Code Duplication: Similar JSON structures for country and language options suggest a potential for code duplication or unoptimized data handling.

    🔒 Security concerns

    No

    @delano delano marked this pull request as ready for review March 24, 2024 01:21
    Copy link
    Collaborator

    @joshuakeaton joshuakeaton left a comment

    Choose a reason for hiding this comment

    The reason will be displayed to describe this comment to others. Learn more.

    Left comments inline

    @joshuakeaton joshuakeaton self-requested a review March 24, 2024 01:23
    @delano delano merged commit 6e6981d into main Mar 24, 2024
    0 of 2 checks passed
    @delano delano deleted the delano/38-revisit-requestform-vueform branch March 24, 2024 01:27
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    Status: ✔️ Done
    Development

    Successfully merging this pull request may close these issues.

    2 participants