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

Update Resource Forms to Enhance Validation #9062

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
46ec289
Update Resource Forms to Enhance Validation
JavidSumra Nov 8, 2024
9256e70
fix resource update test suit
JavidSumra Nov 9, 2024
41c1b1c
Merge branch 'develop' of github.com:JavidSumra/care_fe into issues/9…
JavidSumra Nov 9, 2024
5017f20
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 9, 2024
f68d453
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 11, 2024
9d3a9ba
Updated Handle Input to avoid Negative Value
JavidSumra Nov 19, 2024
098ba35
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 19, 2024
a5d862d
Remove Unnecessary Comments
JavidSumra Nov 19, 2024
7f5e000
Merge remote-tracking branch 'refs/remotes/origin/issues/9053/prevent…
JavidSumra Nov 19, 2024
fa5e529
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 20, 2024
fe78ab4
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
nihal467 Nov 20, 2024
de7d829
Add Requested Changes
JavidSumra Nov 21, 2024
6440d4b
Merge remote-tracking branch 'refs/remotes/origin/issues/9053/prevent…
JavidSumra Nov 21, 2024
2c98d02
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 22, 2024
bfaf9ce
Fix Min Value issue in Resource Create/Update Form
JavidSumra Nov 26, 2024
8c9ae68
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 26, 2024
f3d396d
Merge branch 'develop' of https://github.com/JavidSumra/care_fe into …
JavidSumra Nov 26, 2024
0dcc585
Fix sanitize function
JavidSumra Nov 26, 2024
32d5b35
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Nov 26, 2024
5a0b57f
Fix Min Value Error issue in Resource Form Fields
JavidSumra Nov 26, 2024
e98f12d
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 27, 2024
13d19e0
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 27, 2024
03f2fcb
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 27, 2024
706c5b0
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 28, 2024
356f516
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 28, 2024
c910c84
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Nov 29, 2024
47804a5
Merge branch 'develop' of https://github.com/JavidSumra/care_fe into …
JavidSumra Nov 30, 2024
83d3113
Fix 0 Value on Resourse Request
JavidSumra Nov 30, 2024
27847a9
Merge branch 'ohcnetwork:develop' into issues/9053/prevent-negative-q…
JavidSumra Nov 30, 2024
d7e44c0
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Nov 30, 2024
1936cef
Fix Approved Quntity Issue
JavidSumra Dec 5, 2024
eff793d
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 5, 2024
a6d9740
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 5, 2024
3f03744
Merge branch 'develop' of https://github.com/JavidSumra/care_fe into …
JavidSumra Dec 5, 2024
be9d71c
Fix Validation
JavidSumra Dec 5, 2024
5512d94
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Dec 5, 2024
15cc8d6
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 5, 2024
31bc4f1
Add Suggestions
JavidSumra Dec 5, 2024
99cbac8
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Dec 5, 2024
506c212
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 5, 2024
43c635d
Add Translation and Revert to switch case logic
JavidSumra Dec 5, 2024
0230bcb
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Dec 5, 2024
633530d
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 5, 2024
10a34f2
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 7, 2024
08ac2c9
Add Requested Changes
JavidSumra Dec 9, 2024
83d4031
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Dec 9, 2024
b584e6d
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 9, 2024
c5624e9
Fix Failing Test
JavidSumra Dec 9, 2024
e1d0a76
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Dec 9, 2024
1033d25
Fix error state for assigned facility
JavidSumra Dec 9, 2024
94f6607
Add Requested Changes
JavidSumra Dec 10, 2024
c689d1b
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 10, 2024
2fd83cc
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 10, 2024
995618a
Fix Placeholder issue
JavidSumra Dec 10, 2024
8fd7a56
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Dec 10, 2024
7f82661
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 11, 2024
4e9d0cb
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 11, 2024
ea06d20
Fix Merger Conflicts
JavidSumra Dec 13, 2024
d37047a
Merge branch 'issues/9053/prevent-negative-quantity-and-empty-descrip…
JavidSumra Dec 13, 2024
d84c341
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 13, 2024
650149a
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 13, 2024
e55ae0c
Merge branch 'develop' into issues/9053/prevent-negative-quantity-and…
JavidSumra Dec 14, 2024
785bfa4
Fix Merge Conflict
JavidSumra Dec 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cypress/e2e/resource_spec/ResourcesHomepage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,10 @@ describe("Resource Page", () => {
cy.awaitUrl(createdResource);
resourcePage.clickUpdateStatus();
resourcePage.updateStatus("APPROVED");
cy.clickAndSelectOption(
"input[name='assigned_facility_object']",
"Dummy Request Fulfilment Center, Ernakulam",
);
resourcePage.clickSubmitButton();
resourcePage.verifySuccessNotification(
"Resource request updated successfully",
Expand Down
2 changes: 1 addition & 1 deletion cypress/pageobject/Facility/FacilityCreation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ class FacilityPage {
) {
cy.get("#refering_facility_contact_name").type(name);
cy.get("#refering_facility_contact_number").type(phone_number);
cy.get("[name='approving_facility']")
cy.get("[name='approving_facility_object']")
.type(facility)
.then(() => {
cy.get("[role='option']").first().click();
Expand Down
16 changes: 16 additions & 0 deletions public/locale/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,7 @@
"approve": "Approve",
"approved_by_district_covid_control_room": "Approved by District COVID Control Room",
"approving_facility": "Name of Approving Facility",
"approving_facility_error": "Name of the referring facility is required.",
"archive": "Archive",
"archived": "Archived",
"are_non_editable_fields": "are non-editable fields",
Expand All @@ -348,9 +349,11 @@
"assign": "Assign",
"assign_a_volunteer_to": "Assign a volunteer to {{name}}",
"assign_bed": "Assign Bed",
"assign_facility_label": "What facility would you like to assign the request to",
"assign_to_volunteer": "Assign to a Volunteer",
"assigned_doctor": "Assigned Doctor",
"assigned_facility": "Facility assigned",
"assigned_quantity_error": "Value can't be smaller than 0",
"assigned_to": "Assigned to",
JavidSumra marked this conversation as resolved.
Show resolved Hide resolved
"assigned_volunteer": "Assigned Volunteer",
"async_operation_warning": "This operation may take some time. Please check back later.",
Expand Down Expand Up @@ -687,6 +690,9 @@
"emergency_contact_person_name_volunteer": "Emergency Contact Person Name (Volunteer)",
"emergency_contact_volunteer": "Emergency Contact (Volunteer)",
"empty_date_time": "--:-- --; --/--/----",
"empty_description_error": "Description is required field.",
"empty_resource_error": "Resource approving facility cannot be empty.",
"empty_title_error": "Title is required field.",
"encounter_date_field_label__A": "Date & Time of Admission to the Facility",
"encounter_date_field_label__DC": "Date & Time of Domiciliary Care commencement",
"encounter_date_field_label__DD": "Date & Time of Consultation",
Expand Down Expand Up @@ -1216,10 +1222,12 @@
"ration_card__NO_CARD": "Non-card holder",
"ration_card_category": "Ration Card Category",
"reason": "Reason",
"reason_error": "Description of the resource request is mandatory.",
"reason_for_discontinuation": "Reason for discontinuation",
"reason_for_edit": "Reason for edit",
"reason_for_referral": "Reason for referral",
"reason_for_shift": "Reason for shift",
"reason_invalid": "Please enter a description for the resource request.",
"recommended_aspect_ratio_for": "Recommended aspect ratio for",
"record": "Record Audio",
"record_delete_confirm": "Are you sure you want to delete this record?",
Expand All @@ -1229,6 +1237,9 @@
"redirected_to_create_consultation": "Note: You will be redirected to create consultation form. Please complete the form to finish the transfer process",
"referral_letter": "Referral Letter",
"referred_to": "Referred to",
"referring_facility_contact_name_error": "Name of the contact at the referring facility is required.",
"referring_facility_contact_number_error": "Phone number of the contact at the referring facility is required.",
"referring_facility_contact_number_invalid": "Please enter a valid phone number.",
"refresh": "Refresh",
"refresh_list": "Refresh List",
"refuted": "Refuted",
Expand All @@ -1254,6 +1265,7 @@
"request_sample_test": "Request Sample Test",
"request_title": "Request Title",
"request_title_placeholder": "Type your title here",
"requested_quantity_error": "Value can't be smaller than 1",
"required": "Required",
"required_quantity": "Required Quantity",
"resend_otp": "Resend OTP",
Expand Down Expand Up @@ -1313,6 +1325,7 @@
"select_date": "Select date",
"select_eligible_policy": "Select an Eligible Insurance Policy",
"select_facility_for_discharged_patients_warning": "Facility needs to be selected to view discharged patients.",
"select_facility_type_error": "Please select a facility type.",
"select_for_administration": "Select for Administration",
"select_groups": "Select Groups",
"select_investigation": "Select Investigations (all investigations will be selected by default)",
Expand Down Expand Up @@ -1404,6 +1417,8 @@
"test_type": "Type of test done",
"tested_on": "Tested on",
"third_party_software_licenses": "Third Party Software Licenses",
"title_error": "Title for the resource request is mandatory.",
"title_invalid": "Please enter a title for the resource request.",
"titrate_dosage": "Titrate Dosage",
"to_be_conducted": "To be conducted",
"total_amount": "Total Amount",
Expand Down Expand Up @@ -1475,6 +1490,7 @@
"update_preset_position_to_current": "Update preset's position to camera's current position",
"update_record": "Update Record",
"update_record_for_asset": "Update record for asset",
"update_resource_request": "Update Resource Request",
"update_shift_request": "Update Shift Request",
"update_status_details": "Update Status/Details",
"update_volunteer": "Reassign Volunteer",
Expand Down
4 changes: 2 additions & 2 deletions src/Routers/routes/ResourceRoutes.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { Redirect } from "raviger";

import BoardView from "@/components/Resource/ResourceBoard";
import ResourceCreate from "@/components/Resource/ResourceCreate";
import ResourceDetails from "@/components/Resource/ResourceDetails";
import { ResourceDetailsUpdate } from "@/components/Resource/ResourceDetailsUpdate";
import ListView from "@/components/Resource/ResourceList";

import { AppRoutes } from "@/Routers/AppRouter";
Expand All @@ -15,7 +15,7 @@ const ResourceRoutes: AppRoutes = {
"/resource/board": () => <BoardView />,
"/resource/list": () => <ListView />,
"/resource/:id": ({ id }) => <ResourceDetails id={id} />,
"/resource/:id/update": ({ id }) => <ResourceDetailsUpdate id={id} />,
"/resource/:id/update": ({ id }) => <ResourceCreate resourceId={id} />,
};

export default ResourceRoutes;
Loading
Loading