@7365admin1/core 3.52.3-staging.242 → 3.52.3-staging.244

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.
@@ -0,0 +1,16 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Hide deleted plates on every person read, not only on the two browse paths.
6
+
7
+ A vehicle's plate number is copied onto the resident's record as `site.people.plates[]`. Deleting the vehicle is meant to take it back out, and where that copy had already drifted the read paths filter it against the vehicle record. That filter was only on `GET /api/people` and `GET /api/people/unit/:unit`, so four other endpoints still handed back a plate whose only vehicle is deleted:
8
+
9
+ - `GET /api/people/plateNumber/:plateNumber`
10
+ - `GET /api/people/nric/:nric` (the MA app's NRIC lookup, and layer-common's `findPersonByNRIC`)
11
+ - `GET /api/people/contact/:contact`
12
+ - `GET /api/people/all-nric` (the MA app's NRIC search)
13
+
14
+ Each of the four now applies the same filter. `status: { $ne: "deleted" }` on three of those queries is the PERSON's status and has nothing to do with the vehicle — reading it as "deleted plates are excluded" is how they were missed. The filter runs on the way out, after the Redis read, so a plate deleted inside the 15-minute cache window disappears immediately rather than at the next expiry.
15
+
16
+ Unchanged: a plate the resident merely declared, with no vehicle record at all, is still listed; a plate a second live vehicle still holds is still listed.
@@ -0,0 +1,12 @@
1
+ ---
2
+ "@7365admin1/core": patch
3
+ ---
4
+
5
+ Default the visitor-invite `type` to `guest` so already-installed resident app builds can invite again.
6
+
7
+ `POST /api/visitor-transactions/invite/:inviterId` made `type` a required field when the
8
+ contractor invite was added. Every resident app build already in the stores sends no `type`, so
9
+ those users get a 400 — `"type" is required` — on a form that has no Type field. `type` now
10
+ defaults to `guest`, which is exactly what the endpoint did before the contractor work.
11
+ Contractor invites are unchanged: `contractorType` is still required when `type` is `contractor`,
12
+ and an unrecognised `type` is still refused.
package/dist/index.d.ts CHANGED
@@ -5056,7 +5056,13 @@ declare function usePersonRepo(): {
5056
5056
  nric?: string | undefined;
5057
5057
  sort?: Record<string, any> | undefined;
5058
5058
  site: string;
5059
- }) => Promise<{}>;
5059
+ }) => Promise<{
5060
+ items: any[];
5061
+ pages: number;
5062
+ pageRange: string;
5063
+ } | {
5064
+ items: TPerson[];
5065
+ }>;
5060
5066
  pushVehicleById: (id: string | ObjectId, plate: {
5061
5067
  plateNumber: string;
5062
5068
  recNo: string;