@attabot/complaint-app 1.0.35 → 1.0.36

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.
package/README.md CHANGED
@@ -160,7 +160,7 @@ MIT
160
160
 
161
161
  ### Parent-owned catalogs
162
162
 
163
- Pass `roleList` and `storeList` from the parent application (for example, its Redux selectors). Each entry has an `id` and a `name` or `label`. The parent loads these catalogs; the package uses roles in category/workflow selectors and stores in Store ID controls in the complaint form and preview. Updates to the props are reflected on rerender. Store controls submit IDs. Complaint types, workflows, fields, statuses, and complaint submissions continue using the complaint API.
163
+ Pass `roleList`, `userList`, and `storeList` from the parent application (for example, its Redux selectors). Each entry has an `id` and a `name` or `label`. The parent loads these catalogs; the package uses roles and users in category/workflow selectors and stores in Store ID controls in the complaint form and preview. Updates to the props are reflected on rerender. Store controls submit IDs. Complaint types, workflows, fields, statuses, and complaint submissions continue using the complaint API. Pass the signed-in user as `currentUser`; when the `company` prop is omitted, the package also uses `currentUser.company` for company-specific location labels.
164
164
 
165
165
  ```jsx
166
166
  <ComplaintApp apiUrl={complaintApiUrl} authToken={token}
@@ -171,6 +171,6 @@ The legacy `rolelist` prop remains an alias; `roleList` takes precedence. Missin
171
171
 
172
172
  ### Company context
173
173
 
174
- Pass the parent company object using `company={company}`. The package forwards it with page props and synchronizes it to `state.appDetails.details.company`, so nested components can read it through the existing package Redux provider. Parent updates replace the company object; passing `null` clears it. The package does not fetch company details.
174
+ Pass the parent company object using `company={company}`. If omitted, the package uses `currentUser.company` when available. The package forwards the resolved object with page props and synchronizes it to `state.appDetails.details.company`, so nested components can read it through the existing package Redux provider. Parent updates replace the company object; passing `null` clears it. The package does not fetch company details.
175
175
 
176
176
  Visible location labels use `company.level4` (for example, `Branch ID` and `Select Branch`). Missing or blank names fall back to `Store`. Field keys, IDs, saved data, and dependency values retain their original values.