sowell-models 1.29.0 → 1.31.0
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/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Model, Attr, BelongsTo, HasMany } from "spraypaint"
|
|
1
|
+
import { Model, Attr, BelongsTo, HasMany, HasOne } from "spraypaint"
|
|
2
2
|
import { IModel, PouchCollection, PouchORM } from "pouchorm"
|
|
3
3
|
import { orderBy } from "lodash"
|
|
4
4
|
import * as yup from "yup"
|
|
@@ -32,9 +32,11 @@ export interface IssueReportPayload {
|
|
|
32
32
|
spot?: string
|
|
33
33
|
areaNature?: "housing" | "other_spots" | "common_areas" | "zone"
|
|
34
34
|
isTenantRequest?: boolean
|
|
35
|
+
tenantSpot?: string
|
|
35
36
|
reason?: string
|
|
36
37
|
origin?: string
|
|
37
38
|
assignee?: string
|
|
39
|
+
metadata?: Record<string, any>
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
export type Tab = "mySector" | "others"
|
|
@@ -88,12 +90,14 @@ export interface IIssueReport extends IModel {
|
|
|
88
90
|
spot?: ISpot | ISpot[]
|
|
89
91
|
imgs?: string[]
|
|
90
92
|
isTenantRequest?: boolean
|
|
93
|
+
tenantSpot?: ISpot
|
|
91
94
|
reason?: IReason
|
|
92
95
|
origin?: IOrigin
|
|
93
96
|
assignee?: IUser
|
|
94
97
|
seen?: boolean
|
|
95
98
|
areaId?: number
|
|
96
99
|
validate?: () => string
|
|
100
|
+
metadata?: Record<string, any>
|
|
97
101
|
}
|
|
98
102
|
|
|
99
103
|
export class IssueCollection
|
|
@@ -153,11 +157,13 @@ export class SPIssueReportItem
|
|
|
153
157
|
@Attr() canceledTimestamp!: Date
|
|
154
158
|
@Attr() rejectedTimestamp!: Date
|
|
155
159
|
@Attr() seen!: boolean
|
|
160
|
+
@Attr() metadata!: Record<string, any>
|
|
156
161
|
@BelongsTo() author!: SPUserItem
|
|
157
162
|
@BelongsTo() category!: SPCategoryItem
|
|
158
163
|
@BelongsTo() residence!: IResidence
|
|
159
164
|
@BelongsTo() place!: SPPlaceItem
|
|
160
165
|
@BelongsTo() spot!: SPSpotItem
|
|
166
|
+
@BelongsTo() tenantSpot?: SPSpotItem
|
|
161
167
|
@BelongsTo() company!: SPCompany
|
|
162
168
|
@BelongsTo() visitReport!: SPVisitReport
|
|
163
169
|
@BelongsTo() checkpoint!: SPCheckpointItem
|
|
@@ -180,6 +186,7 @@ export class SPIssueReportItem
|
|
|
180
186
|
priority: yup.number().required(),
|
|
181
187
|
visitReport: yup.string(),
|
|
182
188
|
isTenantRequest: yup.boolean(),
|
|
189
|
+
tenantSpot: yup.string().nullable().notRequired()
|
|
183
190
|
})
|
|
184
191
|
|
|
185
192
|
const isValid = await schema.isValid(payload)
|