@paro.io/expert-shared-components 1.14.2 → 1.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -69,7 +69,7 @@ const EditFocusAreaModal = ({ isOpen, focusArea, onClose, onSave, updateOpportun
69
69
  ]
70
70
  });
71
71
  (0, utils_1.showToast)('success', 'Focus area updated successfully');
72
- onSaveFocusArea();
72
+ onSaveFocusArea && onSaveFocusArea();
73
73
  }
74
74
  catch (error) {
75
75
  console.error('Error updating focus area:', error);
@@ -66,21 +66,30 @@ const PRIORITY_LEVELS = [
66
66
  'Medium - Needed next week',
67
67
  'Low - Needed eventually'
68
68
  ];
69
+ const getPriorityLevel = (priority) => {
70
+ if (!priority)
71
+ return PRIORITY_LEVELS[0];
72
+ switch (priority) {
73
+ case 'HIGH': return 'Urgent - Blocks current work';
74
+ case 'MEDIUM': return 'High - Needed this week';
75
+ case 'LOW': return 'Medium - Needed next week';
76
+ default:
77
+ return PRIORITY_LEVELS[0];
78
+ }
79
+ };
69
80
  // Request Information Modal Component
70
81
  const RequestInfoModal = ({ isOpen, missingInfoItem, onClose, onSubmit, documentCenterController, isInternal, handleRouteToDocuments, isParoIntelligenceRolePresent, }) => {
71
82
  const [submitting, setSubmitting] = (0, react_1.useState)(false);
72
83
  const [formData, setFormData] = (0, react_1.useState)({
73
- informationCategory: '',
74
- priorityLevel: '',
84
+ informationCategory: INFORMATION_CATEGORIES[0], // Default to first category
85
+ priorityLevel: PRIORITY_LEVELS[0], // Default to first priority
75
86
  specificInformation: '',
76
87
  });
77
88
  react_1.default.useEffect(() => {
78
89
  if (missingInfoItem) {
79
90
  setFormData({
80
- informationCategory: missingInfoItem.category || '',
81
- priorityLevel: missingInfoItem.priority === 'HIGH' ? 'Urgent - Blocks current work' :
82
- missingInfoItem.priority === 'MEDIUM' ? 'High - Needed this week' :
83
- 'Medium - Needed next week',
91
+ informationCategory: missingInfoItem.category || INFORMATION_CATEGORIES[0],
92
+ priorityLevel: getPriorityLevel(missingInfoItem.priority),
84
93
  specificInformation: missingInfoItem.description || '',
85
94
  });
86
95
  }
@@ -146,13 +155,13 @@ const RequestInfoModal = ({ isOpen, missingInfoItem, onClose, onSubmit, document
146
155
  "View Documents in Document Center"))))),
147
156
  react_1.default.createElement("div", null,
148
157
  react_1.default.createElement("label", { htmlFor: "informationCategory", className: "block text-sm font-medium text-gray-700 mb-1" }, "Information Category"),
149
- react_1.default.createElement("select", { id: "informationCategory", value: formData.informationCategory, onChange: (e) => setFormData(prev => (Object.assign(Object.assign({}, prev), { informationCategory: e.target.value }))), className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm" }, INFORMATION_CATEGORIES.map((category) => (react_1.default.createElement("option", { key: category, value: category }, category))))),
158
+ react_1.default.createElement("select", { id: "informationCategory", disabled: isInternal && !isParoIntelligenceRolePresent, value: formData.informationCategory, onChange: (e) => setFormData(prev => (Object.assign(Object.assign({}, prev), { informationCategory: e.target.value }))), className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm" }, INFORMATION_CATEGORIES.map((category) => (react_1.default.createElement("option", { key: category, value: category }, category))))),
150
159
  react_1.default.createElement("div", null,
151
160
  react_1.default.createElement("label", { htmlFor: "priorityLevel", className: "block text-sm font-medium text-gray-700 mb-1" }, "Priority Level"),
152
- react_1.default.createElement("select", { id: "priorityLevel", value: formData.priorityLevel, onChange: (e) => setFormData(prev => (Object.assign(Object.assign({}, prev), { priorityLevel: e.target.value }))), className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm" }, PRIORITY_LEVELS.map((level) => (react_1.default.createElement("option", { key: level, value: level }, level))))),
161
+ react_1.default.createElement("select", { id: "priorityLevel", disabled: isInternal && !isParoIntelligenceRolePresent, value: formData.priorityLevel, onChange: (e) => setFormData(prev => (Object.assign(Object.assign({}, prev), { priorityLevel: e.target.value }))), className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm" }, PRIORITY_LEVELS.map((level) => (react_1.default.createElement("option", { key: level, value: level }, level))))),
153
162
  react_1.default.createElement("div", null,
154
163
  react_1.default.createElement("label", { htmlFor: "specificInformation", className: "block text-sm font-medium text-gray-700 mb-1" }, "Specific Information Needed"),
155
- react_1.default.createElement("textarea", { id: "specificInformation", value: formData.specificInformation, onChange: (e) => setFormData(prev => (Object.assign(Object.assign({}, prev), { specificInformation: e.target.value }))), rows: 4, className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm", placeholder: "Need NetSuite configuration details:\r\n \r\n 1. US vs Colombian entity setup\r\n 2. Consolidation process and requirements" }))),
164
+ react_1.default.createElement("textarea", { id: "specificInformation", disabled: isInternal && !isParoIntelligenceRolePresent, value: formData.specificInformation, onChange: (e) => setFormData(prev => (Object.assign(Object.assign({}, prev), { specificInformation: e.target.value }))), rows: 4, className: "w-full px-3 py-2 border border-gray-300 rounded-md shadow-sm focus:outline-none focus:ring-2 focus:ring-blue-500 focus:border-blue-500 text-sm", placeholder: "Need NetSuite configuration details:\r\n \r\n 1. US vs Colombian entity setup\r\n 2. Consolidation process and requirements" }))),
156
165
  react_1.default.createElement("div", { className: "px-6 py-4 border-t border-gray-200 flex justify-end space-x-3" },
157
166
  react_1.default.createElement("button", { onClick: handleCancel, className: "px-4 py-2 text-sm font-medium text-gray-700 bg-white border border-gray-300 rounded-md hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-gray-500 transition-colors" }, "Cancel"),
158
167
  react_1.default.createElement("button", { onClick: handleSubmit, disabled: isInternal && !isParoIntelligenceRolePresent, className: `px-4 py-2 text-sm font-medium text-white bg-blue bg-blue-600 border border-transparent rounded-md hover:bg-blue-700 focus:outline-none focus:ring-2 focus:ring-blue-500 transition-colors cursor-${isInternal && !isParoIntelligenceRolePresent ? "not-allowed" : "pointer"}` }, buttonText)))));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@paro.io/expert-shared-components",
3
- "version": "1.14.2",
3
+ "version": "1.14.3",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {