From c5f2556c3dc3d5403a14d00e9402096c77cc0cbe Mon Sep 17 00:00:00 2001
From: Bidyashish <hi@bidyashish.com>
Date: Tue, 22 Oct 2024 08:59:15 -0700
Subject: [PATCH] #3393 - Increase the Maximum Offering Name Character Limit to
 100 Characters (#3800)

**Technical**
- [x] Change the form.io client-side validation.
- [x] Change the
[education-program-offering.model.ts](https://github.com/bcgov/SIMS/blob/e5b7ea01bf15f36271a9dae005a5e93b8998da7b/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts#L20)
constant `OFFERING_NAME_MAX_LENGTH`.
- [x] No DB changes expected.
- [x] Check the above-mentioned UIs to ensure the 100-character offering
names will be accommodated in the UI. Feel free to paste some
screenshots to the ticket to allow the business to review it.

Error Over 100 Character

![image](https://github.com/user-attachments/assets/eb023c0f-775b-4dc3-80e0-9d20c8869b6b)


Instituition Page:

![image](https://github.com/user-attachments/assets/b77feb19-a2a6-45f7-b9e3-105e5d489c9b)

Drop Down Section:

![image](https://github.com/user-attachments/assets/13f984ad-d180-44c7-b370-0d8df3766a31)

Offering Page:

![image](https://github.com/user-attachments/assets/40b74aa9-f317-43a9-918c-69944e6bd12a)

Add Offering:

![image](https://github.com/user-attachments/assets/3c6510dc-da8d-4345-9cf0-2ad558796f23)
---
 .../sims-db/src/entities/education-program-offering.model.ts  | 4 ++--
 .../forms/src/form-definitions/educationprogramoffering.json  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts b/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts
index 06227eaf81..e0b5f74247 100644
--- a/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts
+++ b/sources/packages/backend/libs/sims-db/src/entities/education-program-offering.model.ts
@@ -16,9 +16,9 @@ import { numericTransformer } from "@sims/sims-db/transformers/numeric.transform
 
 /**
  * Max value the offering name can have. By DB definition it is defined as
- * 300 but from business perspective it should not be longer than 50.
+ * 300 but from business perspective it should not be longer than 100.
  */
-export const OFFERING_NAME_MAX_LENGTH = 50;
+export const OFFERING_NAME_MAX_LENGTH = 100;
 export const OFFERING_WIL_TYPE_MAX_LENGTH = 50;
 
 /**
diff --git a/sources/packages/forms/src/form-definitions/educationprogramoffering.json b/sources/packages/forms/src/form-definitions/educationprogramoffering.json
index 51e540d5f7..1783376eba 100644
--- a/sources/packages/forms/src/form-definitions/educationprogramoffering.json
+++ b/sources/packages/forms/src/form-definitions/educationprogramoffering.json
@@ -317,7 +317,7 @@
           "tableView": true,
           "validate": {
             "required": true,
-            "maxLength": 50,
+            "maxLength": 100,
             "custom": "",
             "customPrivate": false,
             "strictDateValidation": false,