sowell-models 1.19.0 → 1.21.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 +9 -12
- package/src/models/Checklist/index.ts +2 -0
- package/src/models/Company/index.ts +4 -0
- package/build/index.d.ts +0 -28
- package/build/index.d.ts.map +0 -1
- package/build/index.js +0 -27
- package/build/models/Agency/index.d.ts +0 -26
- package/build/models/Agency/index.d.ts.map +0 -1
- package/build/models/Agency/index.js +0 -61
- package/build/models/ApplicationRecord/index.d.ts +0 -7
- package/build/models/ApplicationRecord/index.d.ts.map +0 -1
- package/build/models/ApplicationRecord/index.js +0 -18
- package/build/models/AreaItem/index.d.ts +0 -51
- package/build/models/AreaItem/index.d.ts.map +0 -1
- package/build/models/AreaItem/index.js +0 -101
- package/build/models/Assignation/index.d.ts +0 -17
- package/build/models/Assignation/index.d.ts.map +0 -1
- package/build/models/Assignation/index.js +0 -24
- package/build/models/Author/index.d.ts +0 -8
- package/build/models/Author/index.d.ts.map +0 -1
- package/build/models/Author/index.js +0 -22
- package/build/models/Checklist/index.d.ts +0 -41
- package/build/models/Checklist/index.d.ts.map +0 -1
- package/build/models/Checklist/index.js +0 -79
- package/build/models/Checkpoint/index.d.ts +0 -45
- package/build/models/Checkpoint/index.d.ts.map +0 -1
- package/build/models/Checkpoint/index.js +0 -85
- package/build/models/Company/index.d.ts +0 -22
- package/build/models/Company/index.d.ts.map +0 -1
- package/build/models/Company/index.js +0 -33
- package/build/models/Export/index.d.ts +0 -22
- package/build/models/Export/index.d.ts.map +0 -1
- package/build/models/Export/index.js +0 -34
- package/build/models/Family/index.d.ts +0 -20
- package/build/models/Family/index.d.ts.map +0 -1
- package/build/models/Family/index.js +0 -55
- package/build/models/IssueReport/index.d.ts +0 -135
- package/build/models/IssueReport/index.d.ts.map +0 -1
- package/build/models/IssueReport/index.js +0 -193
- package/build/models/Location/index.d.ts +0 -24
- package/build/models/Location/index.d.ts.map +0 -1
- package/build/models/Location/index.js +0 -33
- package/build/models/Origin/index.d.ts +0 -23
- package/build/models/Origin/index.d.ts.map +0 -1
- package/build/models/Origin/index.js +0 -58
- package/build/models/Place/index.d.ts +0 -49
- package/build/models/Place/index.d.ts.map +0 -1
- package/build/models/Place/index.js +0 -89
- package/build/models/Provider/index.d.ts +0 -22
- package/build/models/Provider/index.d.ts.map +0 -1
- package/build/models/Provider/index.js +0 -58
- package/build/models/Reason/index.d.ts +0 -24
- package/build/models/Reason/index.d.ts.map +0 -1
- package/build/models/Reason/index.js +0 -58
- package/build/models/Residence/index.d.ts +0 -30
- package/build/models/Residence/index.d.ts.map +0 -1
- package/build/models/Residence/index.js +0 -64
- package/build/models/Sector/index.d.ts +0 -33
- package/build/models/Sector/index.d.ts.map +0 -1
- package/build/models/Sector/index.js +0 -72
- package/build/models/Spot/index.d.ts +0 -28
- package/build/models/Spot/index.d.ts.map +0 -1
- package/build/models/Spot/index.js +0 -61
- package/build/models/UnseenIssue/index.d.ts +0 -14
- package/build/models/UnseenIssue/index.d.ts.map +0 -1
- package/build/models/UnseenIssue/index.js +0 -21
- package/build/models/User/index.d.ts +0 -53
- package/build/models/User/index.d.ts.map +0 -1
- package/build/models/User/index.js +0 -116
- package/build/models/VisitProp/index.d.ts +0 -31
- package/build/models/VisitProp/index.d.ts.map +0 -1
- package/build/models/VisitProp/index.js +0 -42
- package/build/models/VisitReport/index.d.ts +0 -95
- package/build/models/VisitReport/index.d.ts.map +0 -1
- package/build/models/VisitReport/index.js +0 -110
- package/build/models/VisitSchedule/index.d.ts +0 -42
- package/build/models/VisitSchedule/index.d.ts.map +0 -1
- package/build/models/VisitSchedule/index.js +0 -82
- package/build/models/category/index.d.ts +0 -34
- package/build/models/category/index.d.ts.map +0 -1
- package/build/models/category/index.js +0 -70
- package/build/models/interfaces.d.ts +0 -8
- package/build/models/interfaces.d.ts.map +0 -1
- package/build/models/interfaces.js +0 -1
- package/build/models/types.d.ts +0 -7
- package/build/models/types.d.ts.map +0 -1
- package/build/models/types.js +0 -9
- package/build/utils/arrayDiffBy.d.ts +0 -7
- package/build/utils/arrayDiffBy.d.ts.map +0 -1
- package/build/utils/arrayDiffBy.js +0 -9
package/package.json
CHANGED
|
@@ -1,21 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "sowell-models",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.21.0",
|
|
4
4
|
"description": "SoWell models",
|
|
5
5
|
"type": "module",
|
|
6
|
-
"main": "./
|
|
7
|
-
"module": "./
|
|
8
|
-
"types": "./
|
|
6
|
+
"main": "./src/index.ts",
|
|
7
|
+
"module": "./src/index.ts",
|
|
8
|
+
"types": "./src/index.ts",
|
|
9
9
|
"exports": {
|
|
10
|
-
".":
|
|
11
|
-
|
|
12
|
-
"require": "./build/index.js",
|
|
13
|
-
"types": "./build/index.d.ts"
|
|
14
|
-
}
|
|
10
|
+
".": "./src/index.ts",
|
|
11
|
+
"./package.json": "./package.json"
|
|
15
12
|
},
|
|
16
13
|
"files": [
|
|
17
|
-
"
|
|
18
|
-
"
|
|
14
|
+
"src/**/*",
|
|
15
|
+
"build/**/*"
|
|
19
16
|
],
|
|
20
17
|
"engines": {
|
|
21
18
|
"node": ">= 20.9 < 21 || ^22"
|
|
@@ -44,7 +41,7 @@
|
|
|
44
41
|
"link:update": "npm run build",
|
|
45
42
|
"link:force": "npm run build && npm unlink && npm link",
|
|
46
43
|
"link:build-only": "npm run build && mv src src.tmp && yarn link && mv src.tmp src",
|
|
47
|
-
"prepublishOnly": "
|
|
44
|
+
"prepublishOnly": "echo 'Publishing TypeScript sources'",
|
|
48
45
|
"release": "yarn build && npm publish --access public",
|
|
49
46
|
"lint": "eslint .",
|
|
50
47
|
"prettier": "prettier \"{src,__{tests}__}/**/*.{ts,mts}\" --config .prettierrc --write",
|
|
@@ -21,6 +21,7 @@ export interface IChecklist extends IModel {
|
|
|
21
21
|
checkpoints?: ICheckpoint[]
|
|
22
22
|
family?: IFamily
|
|
23
23
|
periodicity?: string
|
|
24
|
+
defaultAgent?: string
|
|
24
25
|
allowedAgents?: string[]
|
|
25
26
|
}
|
|
26
27
|
|
|
@@ -53,6 +54,7 @@ export class SPChecklistItem extends ApplicationRecord implements IChecklist {
|
|
|
53
54
|
@Attr({ persist: false }) updatedAt!: Date
|
|
54
55
|
@Attr() periodicity!: string
|
|
55
56
|
@Attr() allowedAgents!: string[]
|
|
57
|
+
@Attr() defaultAgent!: string
|
|
56
58
|
@BelongsTo() company!: SPCompany
|
|
57
59
|
@BelongsTo() family!: SPFamily
|
|
58
60
|
@HasOne() area!: SPAreaItem
|
|
@@ -11,13 +11,17 @@ export interface ICompany extends IModel {
|
|
|
11
11
|
id?: string
|
|
12
12
|
_id?: string
|
|
13
13
|
name?: string
|
|
14
|
+
logo_url?: string
|
|
14
15
|
config?: Record<string, any>
|
|
16
|
+
domain?: string
|
|
15
17
|
}
|
|
16
18
|
|
|
17
19
|
@Model()
|
|
18
20
|
export class SPCompany extends ApplicationRecord implements ICompany {
|
|
19
21
|
static jsonapiType = "companies"
|
|
20
22
|
@Attr() name!: string
|
|
23
|
+
@Attr() logo_url!: string
|
|
24
|
+
@Attr() domain!: string
|
|
21
25
|
@Attr() config!: Record<string, any>
|
|
22
26
|
@HasMany("areas") spAreaItems!: SPAreaItem[]
|
|
23
27
|
@HasMany("agencies") spAgencyItems!: SPAgencyItem[]
|
package/build/index.d.ts
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
export * from './models/Agency';
|
|
2
|
-
export * from './models/ApplicationRecord';
|
|
3
|
-
export * from './models/Author';
|
|
4
|
-
export * from './models/Checklist';
|
|
5
|
-
export * from './models/Checkpoint';
|
|
6
|
-
export * from './models/Company';
|
|
7
|
-
export * from './models/IssueReport';
|
|
8
|
-
export * from './models/category';
|
|
9
|
-
export * from './models/Reason';
|
|
10
|
-
export * from './models/AreaItem';
|
|
11
|
-
export * from './models/Place';
|
|
12
|
-
export * from './models/Residence';
|
|
13
|
-
export * from './models/User';
|
|
14
|
-
export * from './models/VisitReport';
|
|
15
|
-
export * from './models/VisitSchedule';
|
|
16
|
-
export * from './models/Spot';
|
|
17
|
-
export * from './models/interfaces';
|
|
18
|
-
export * from './models/types';
|
|
19
|
-
export * from './models/Sector';
|
|
20
|
-
export * from './models/Assignation';
|
|
21
|
-
export * from './models/Export';
|
|
22
|
-
export * from './models/VisitProp';
|
|
23
|
-
export * from './models/Family';
|
|
24
|
-
export * from './models/Location';
|
|
25
|
-
export * from './models/Origin';
|
|
26
|
-
export * from './models/Provider';
|
|
27
|
-
export * from './models/UnseenIssue';
|
|
28
|
-
//# sourceMappingURL=index.d.ts.map
|
package/build/index.d.ts.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAChC,cAAc,4BAA4B,CAAC;AAC3C,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,sBAAsB,CAAC;AACrC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,eAAe,CAAC;AAC9B,cAAc,sBAAsB,CAAC;AACrC,cAAc,wBAAwB,CAAC;AACvC,cAAc,eAAe,CAAC;AAC9B,cAAc,qBAAqB,CAAC;AACpC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,iBAAiB,CAAC;AAChC,cAAc,sBAAsB,CAAC;AACrC,cAAc,iBAAiB,CAAC;AAChC,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC;AAClC,cAAc,sBAAsB,CAAC"}
|
package/build/index.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
export * from './models/Agency';
|
|
2
|
-
export * from './models/ApplicationRecord';
|
|
3
|
-
export * from './models/Author';
|
|
4
|
-
export * from './models/Checklist';
|
|
5
|
-
export * from './models/Checkpoint';
|
|
6
|
-
export * from './models/Company';
|
|
7
|
-
export * from './models/IssueReport';
|
|
8
|
-
export * from './models/category';
|
|
9
|
-
export * from './models/Reason';
|
|
10
|
-
export * from './models/AreaItem';
|
|
11
|
-
export * from './models/Place';
|
|
12
|
-
export * from './models/Residence';
|
|
13
|
-
export * from './models/User';
|
|
14
|
-
export * from './models/VisitReport';
|
|
15
|
-
export * from './models/VisitSchedule';
|
|
16
|
-
export * from './models/Spot';
|
|
17
|
-
export * from './models/interfaces';
|
|
18
|
-
export * from './models/types';
|
|
19
|
-
export * from './models/Sector';
|
|
20
|
-
export * from './models/Assignation';
|
|
21
|
-
export * from './models/Export';
|
|
22
|
-
export * from './models/VisitProp';
|
|
23
|
-
export * from './models/Family';
|
|
24
|
-
export * from './models/Location';
|
|
25
|
-
export * from './models/Origin';
|
|
26
|
-
export * from './models/Provider';
|
|
27
|
-
export * from './models/UnseenIssue';
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { IModel, PouchCollection } from 'pouchorm';
|
|
2
|
-
import { ICompany, SPCompany } from '../Company';
|
|
3
|
-
import { ApplicationRecord } from '../ApplicationRecord';
|
|
4
|
-
import { IResidence, SPResidenceItem } from '../Residence';
|
|
5
|
-
import { CollectionFindOptions, IClearable } from '../interfaces';
|
|
6
|
-
export interface IAgency extends IModel {
|
|
7
|
-
_id?: string;
|
|
8
|
-
name: string;
|
|
9
|
-
hasScheduledVisit?: boolean;
|
|
10
|
-
residences?: IResidence[];
|
|
11
|
-
company?: ICompany;
|
|
12
|
-
}
|
|
13
|
-
export declare class AgencyCollection extends PouchCollection<IAgency> implements IClearable {
|
|
14
|
-
beforeInit(): Promise<void>;
|
|
15
|
-
clear(): Promise<void>;
|
|
16
|
-
find(selector?: Record<string, any> | Partial<IAgency> | undefined, opts?: CollectionFindOptions): Promise<IAgency[]>;
|
|
17
|
-
}
|
|
18
|
-
export declare class SPAgencyItem extends ApplicationRecord implements IAgency {
|
|
19
|
-
static jsonapiType: string;
|
|
20
|
-
name: string;
|
|
21
|
-
hasScheduledVisit: boolean;
|
|
22
|
-
company: SPCompany;
|
|
23
|
-
residences: SPResidenceItem[];
|
|
24
|
-
get _id(): string | undefined;
|
|
25
|
-
}
|
|
26
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/Agency/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAY,MAAM,UAAU,CAAC;AAG7D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AACzD,OAAO,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AAElE,MAAM,WAAW,OAAQ,SAAQ,MAAM;IACrC,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,UAAU,CAAC,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,CAAC,EAAE,QAAQ,CAAC;CACpB;AAED,qBAAa,gBACX,SAAQ,eAAe,CAAC,OAAO,CAC/B,YAAW,UAAU;IAEf,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,IAAI,CACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,OAAO,CAAC,GAAG,SAAS,EAC7D,IAAI,CAAC,EAAE,qBAAqB;CAK/B;AACD,qBACa,YAAa,SAAQ,iBAAkB,YAAW,OAAO;IACpE,MAAM,CAAC,WAAW,SAAc;IACxB,IAAI,EAAG,MAAM,CAAC;IACd,iBAAiB,EAAG,OAAO,CAAC;IACvB,OAAO,EAAG,SAAS,CAAC;IACtB,UAAU,EAAG,eAAe,EAAE,CAAC;IAC1C,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;CACF"}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { Attr, BelongsTo, HasMany, Model } from 'spraypaint';
|
|
17
|
-
import { PouchCollection, PouchORM } from 'pouchorm';
|
|
18
|
-
import { orderBy } from 'lodash';
|
|
19
|
-
import { ApplicationRecord } from '../ApplicationRecord';
|
|
20
|
-
export class AgencyCollection extends PouchCollection {
|
|
21
|
-
beforeInit() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
clear() {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
yield PouchORM.clearDatabase('agencies');
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
find(selector, opts) {
|
|
31
|
-
const _super = Object.create(null, {
|
|
32
|
-
find: { get: () => super.find }
|
|
33
|
-
});
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const result = yield _super.find.call(this, selector, opts);
|
|
36
|
-
return orderBy(result, ['name'], ['asc']);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
let SPAgencyItem = class SPAgencyItem extends ApplicationRecord {
|
|
41
|
-
get _id() {
|
|
42
|
-
return this.id;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
SPAgencyItem.jsonapiType = 'agencies';
|
|
46
|
-
__decorate([
|
|
47
|
-
Attr()
|
|
48
|
-
], SPAgencyItem.prototype, "name", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
Attr()
|
|
51
|
-
], SPAgencyItem.prototype, "hasScheduledVisit", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
BelongsTo()
|
|
54
|
-
], SPAgencyItem.prototype, "company", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
HasMany()
|
|
57
|
-
], SPAgencyItem.prototype, "residences", void 0);
|
|
58
|
-
SPAgencyItem = __decorate([
|
|
59
|
-
Model()
|
|
60
|
-
], SPAgencyItem);
|
|
61
|
-
export { SPAgencyItem };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/ApplicationRecord/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,cAAc,EAAE,MAAM,YAAY,CAAA;AAElD,qBACa,iBAAkB,SAAQ,cAAc;IACnD,MAAM,CAAC,OAAO,EAA0B,MAAM,CAAA;IAC9C,MAAM,CAAC,YAAY,SAAK;IACxB,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,MAAM;CAGxC"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Model, SpraypaintBase } from "spraypaint";
|
|
8
|
-
let ApplicationRecord = class ApplicationRecord extends SpraypaintBase {
|
|
9
|
-
static generateAuthHeader(token) {
|
|
10
|
-
return `Bearer ${token}`;
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
ApplicationRecord.baseUrl = process.env.API_URL;
|
|
14
|
-
ApplicationRecord.apiNamespace = "";
|
|
15
|
-
ApplicationRecord = __decorate([
|
|
16
|
-
Model()
|
|
17
|
-
], ApplicationRecord);
|
|
18
|
-
export { ApplicationRecord };
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { IModel, PouchCollection } from "pouchorm";
|
|
2
|
-
import { ICompany, SPCompany } from "../Company";
|
|
3
|
-
import { ApplicationRecord } from "../ApplicationRecord";
|
|
4
|
-
import { SPCategoryItem } from "../category";
|
|
5
|
-
import { CollectionFindOptions, IClearable } from "../interfaces";
|
|
6
|
-
import { SPSpotItem } from "../Spot";
|
|
7
|
-
import { SPChecklistItem } from "../Checklist";
|
|
8
|
-
import { ILocation, SPLocationItem } from "../Location";
|
|
9
|
-
export interface IAreaType extends IModel {
|
|
10
|
-
_id?: string;
|
|
11
|
-
name?: string;
|
|
12
|
-
iconUrl?: string;
|
|
13
|
-
depthLevel?: string;
|
|
14
|
-
locations?: ILocation[];
|
|
15
|
-
}
|
|
16
|
-
export interface IArea extends IModel {
|
|
17
|
-
_id?: string;
|
|
18
|
-
name?: string;
|
|
19
|
-
iconUrl?: string;
|
|
20
|
-
company?: ICompany;
|
|
21
|
-
areaType?: IAreaType;
|
|
22
|
-
nature?: "housing" | "other_spots" | "common_areas" | "zone";
|
|
23
|
-
}
|
|
24
|
-
export declare class AreaCollection extends PouchCollection<IArea> implements IClearable {
|
|
25
|
-
beforeInit(): Promise<void>;
|
|
26
|
-
clear(): Promise<void>;
|
|
27
|
-
find(selector?: Record<string, any> | Partial<IArea> | undefined, opts?: CollectionFindOptions): Promise<IArea[]>;
|
|
28
|
-
}
|
|
29
|
-
export declare class SPAreaType extends ApplicationRecord implements IAreaType {
|
|
30
|
-
static jsonapiType: string;
|
|
31
|
-
name: string;
|
|
32
|
-
iconUrl: string;
|
|
33
|
-
depthLevel: string;
|
|
34
|
-
locationTypes: SPAreaItem[];
|
|
35
|
-
locations: SPLocationItem[];
|
|
36
|
-
get _id(): string | undefined;
|
|
37
|
-
}
|
|
38
|
-
export declare class SPAreaItem extends ApplicationRecord implements IArea {
|
|
39
|
-
static jsonapiType: string;
|
|
40
|
-
name: string;
|
|
41
|
-
iconUrl: string;
|
|
42
|
-
nature: "housing" | "other_spots" | "common_areas" | "zone";
|
|
43
|
-
depthLevel: string;
|
|
44
|
-
company: SPCompany;
|
|
45
|
-
areaType: SPAreaType;
|
|
46
|
-
checklists: SPChecklistItem[];
|
|
47
|
-
spcategoryItems: SPCategoryItem[];
|
|
48
|
-
spSpots: SPSpotItem[];
|
|
49
|
-
get _id(): string | undefined;
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/AreaItem/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAY,eAAe,EAAE,MAAM,UAAU,CAAA;AAG5D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAChD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAC9C,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAEvD,MAAM,WAAW,SAAU,SAAQ,MAAM;IACvC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,SAAS,CAAC,EAAE,SAAS,EAAE,CAAA;CACxB;AAED,MAAM,WAAW,KAAM,SAAQ,MAAM;IACnC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB,QAAQ,CAAC,EAAE,SAAS,CAAA;IACpB,MAAM,CAAC,EAAE,SAAS,GAAG,aAAa,GAAG,cAAc,GAAG,MAAM,CAAA;CAC7D;AAED,qBAAa,cACX,SAAQ,eAAe,CAAC,KAAK,CAC7B,YAAW,UAAU;IACf,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,IAAI,CACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,SAAS,EAC3D,IAAI,CAAC,EAAE,qBAAqB;CAK/B;AAED,qBACa,UACX,SAAQ,iBACR,YAAW,SAAS;IACpB,MAAM,CAAC,WAAW,SAAe;IACzB,IAAI,EAAG,MAAM,CAAA;IACf,OAAO,EAAG,MAAM,CAAA;IAChB,UAAU,EAAG,MAAM,CAAA;IACd,aAAa,EAAG,UAAU,EAAE,CAAA;IAC5B,SAAS,EAAG,cAAc,EAAE,CAAA;IACvC,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;CACF;AAED,qBACa,UAAW,SAAQ,iBAAkB,YAAW,KAAK;IAChE,MAAM,CAAC,WAAW,SAAU;IACpB,IAAI,EAAG,MAAM,CAAA;IACf,OAAO,EAAG,MAAM,CAAA;IAChB,MAAM,EAAG,SAAS,GAAG,aAAa,GAAG,cAAc,GAAG,MAAM,CAAA;IAC5D,UAAU,EAAG,MAAM,CAAA;IACZ,OAAO,EAAG,SAAS,CAAA;IACtB,QAAQ,EAAG,UAAU,CAAA;IACpB,UAAU,EAAG,eAAe,EAAE,CAAA;IAC9B,eAAe,EAAG,cAAc,EAAE,CAAA;IAClC,OAAO,EAAG,UAAU,EAAE,CAAA;IACjC,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;CACF"}
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { Model, Attr, BelongsTo, HasMany, HasOne } from "spraypaint";
|
|
17
|
-
import { PouchORM, PouchCollection } from "pouchorm";
|
|
18
|
-
import { orderBy } from "lodash";
|
|
19
|
-
import { ApplicationRecord } from "../ApplicationRecord";
|
|
20
|
-
export class AreaCollection extends PouchCollection {
|
|
21
|
-
beforeInit() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
clear() {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
yield PouchORM.clearDatabase("areas");
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
find(selector, opts) {
|
|
31
|
-
const _super = Object.create(null, {
|
|
32
|
-
find: { get: () => super.find }
|
|
33
|
-
});
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const result = yield _super.find.call(this, selector, opts);
|
|
36
|
-
return orderBy(result, ["name"], ["asc"]);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
let SPAreaType = class SPAreaType extends ApplicationRecord {
|
|
41
|
-
get _id() {
|
|
42
|
-
return this.id;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
SPAreaType.jsonapiType = "area_types";
|
|
46
|
-
__decorate([
|
|
47
|
-
Attr()
|
|
48
|
-
], SPAreaType.prototype, "name", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
Attr
|
|
51
|
-
], SPAreaType.prototype, "iconUrl", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
Attr
|
|
54
|
-
], SPAreaType.prototype, "depthLevel", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
HasMany()
|
|
57
|
-
], SPAreaType.prototype, "locationTypes", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
HasMany()
|
|
60
|
-
], SPAreaType.prototype, "locations", void 0);
|
|
61
|
-
SPAreaType = __decorate([
|
|
62
|
-
Model()
|
|
63
|
-
], SPAreaType);
|
|
64
|
-
export { SPAreaType };
|
|
65
|
-
let SPAreaItem = class SPAreaItem extends ApplicationRecord {
|
|
66
|
-
get _id() {
|
|
67
|
-
return this.id;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
70
|
-
SPAreaItem.jsonapiType = "areas";
|
|
71
|
-
__decorate([
|
|
72
|
-
Attr()
|
|
73
|
-
], SPAreaItem.prototype, "name", void 0);
|
|
74
|
-
__decorate([
|
|
75
|
-
Attr
|
|
76
|
-
], SPAreaItem.prototype, "iconUrl", void 0);
|
|
77
|
-
__decorate([
|
|
78
|
-
Attr
|
|
79
|
-
], SPAreaItem.prototype, "nature", void 0);
|
|
80
|
-
__decorate([
|
|
81
|
-
Attr
|
|
82
|
-
], SPAreaItem.prototype, "depthLevel", void 0);
|
|
83
|
-
__decorate([
|
|
84
|
-
BelongsTo()
|
|
85
|
-
], SPAreaItem.prototype, "company", void 0);
|
|
86
|
-
__decorate([
|
|
87
|
-
HasOne()
|
|
88
|
-
], SPAreaItem.prototype, "areaType", void 0);
|
|
89
|
-
__decorate([
|
|
90
|
-
HasMany()
|
|
91
|
-
], SPAreaItem.prototype, "checklists", void 0);
|
|
92
|
-
__decorate([
|
|
93
|
-
HasMany()
|
|
94
|
-
], SPAreaItem.prototype, "spcategoryItems", void 0);
|
|
95
|
-
__decorate([
|
|
96
|
-
HasMany()
|
|
97
|
-
], SPAreaItem.prototype, "spSpots", void 0);
|
|
98
|
-
SPAreaItem = __decorate([
|
|
99
|
-
Model()
|
|
100
|
-
], SPAreaItem);
|
|
101
|
-
export { SPAreaItem };
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { ISector, SPSectorItem } from "../Sector";
|
|
2
|
-
import { IUser, SPUserItem } from "../User";
|
|
3
|
-
import { ApplicationRecord } from "../ApplicationRecord";
|
|
4
|
-
import { IModel } from "pouchorm";
|
|
5
|
-
export interface IAssignation extends IModel {
|
|
6
|
-
id?: string;
|
|
7
|
-
roles: string[];
|
|
8
|
-
user?: IUser;
|
|
9
|
-
sector?: ISector;
|
|
10
|
-
}
|
|
11
|
-
export declare class SPAssignation extends ApplicationRecord implements IAssignation {
|
|
12
|
-
static jsonapiType: string;
|
|
13
|
-
roles: string[];
|
|
14
|
-
user: SPUserItem;
|
|
15
|
-
sector: SPSectorItem;
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/Assignation/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACjD,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AAE3C,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAEjC,MAAM,WAAW,YAAa,SAAQ,MAAM;IAC1C,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,MAAM,CAAC,EAAE,OAAO,CAAA;CACjB;AAED,qBACa,aAAc,SAAQ,iBAAkB,YAAW,YAAY;IAC1E,MAAM,CAAC,WAAW,SAAiB;IAC3B,KAAK,EAAG,MAAM,EAAE,CAAA;IACX,IAAI,EAAG,UAAU,CAAA;IACjB,MAAM,EAAG,YAAY,CAAA;CACnC"}
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Attr, BelongsTo, Model } from "spraypaint";
|
|
8
|
-
import { ApplicationRecord } from "../ApplicationRecord";
|
|
9
|
-
let SPAssignation = class SPAssignation extends ApplicationRecord {
|
|
10
|
-
};
|
|
11
|
-
SPAssignation.jsonapiType = "assignations";
|
|
12
|
-
__decorate([
|
|
13
|
-
Attr()
|
|
14
|
-
], SPAssignation.prototype, "roles", void 0);
|
|
15
|
-
__decorate([
|
|
16
|
-
BelongsTo()
|
|
17
|
-
], SPAssignation.prototype, "user", void 0);
|
|
18
|
-
__decorate([
|
|
19
|
-
BelongsTo()
|
|
20
|
-
], SPAssignation.prototype, "sector", void 0);
|
|
21
|
-
SPAssignation = __decorate([
|
|
22
|
-
Model()
|
|
23
|
-
], SPAssignation);
|
|
24
|
-
export { SPAssignation };
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/Author/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAA;AACpC,qBACa,QAAS,SAAQ,UAAU;IACtC,MAAM,CAAC,WAAW,SAAY;CAC/B;AAED,qBACa,UAAW,SAAQ,UAAU;IACxC,MAAM,CAAC,WAAW,SAAc;CACjC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
import { Model } from "spraypaint";
|
|
8
|
-
import { SPUserItem } from "../User";
|
|
9
|
-
let SPAuthor = class SPAuthor extends SPUserItem {
|
|
10
|
-
};
|
|
11
|
-
SPAuthor.jsonapiType = "authors";
|
|
12
|
-
SPAuthor = __decorate([
|
|
13
|
-
Model()
|
|
14
|
-
], SPAuthor);
|
|
15
|
-
export { SPAuthor };
|
|
16
|
-
let SPAssignee = class SPAssignee extends SPUserItem {
|
|
17
|
-
};
|
|
18
|
-
SPAssignee.jsonapiType = "assignees";
|
|
19
|
-
SPAssignee = __decorate([
|
|
20
|
-
Model()
|
|
21
|
-
], SPAssignee);
|
|
22
|
-
export { SPAssignee };
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
import { IModel, PouchCollection } from "pouchorm";
|
|
2
|
-
import { ICompany, SPCompany } from "../Company";
|
|
3
|
-
import { ApplicationRecord } from "../ApplicationRecord";
|
|
4
|
-
import { ICheckpoint, SPCheckpointItem } from "../Checkpoint";
|
|
5
|
-
import { CollectionFindOptions, IClearable } from "../interfaces";
|
|
6
|
-
import { IArea, SPAreaItem } from "../AreaItem";
|
|
7
|
-
import { IFamily, SPFamily } from "../Family";
|
|
8
|
-
export interface IChecklist extends IModel {
|
|
9
|
-
_id?: string;
|
|
10
|
-
id?: string;
|
|
11
|
-
name: string;
|
|
12
|
-
isPlanned?: boolean;
|
|
13
|
-
iconUrl?: string;
|
|
14
|
-
updatedAt?: Date;
|
|
15
|
-
company?: ICompany;
|
|
16
|
-
area?: IArea;
|
|
17
|
-
checkpoints?: ICheckpoint[];
|
|
18
|
-
family?: IFamily;
|
|
19
|
-
periodicity?: string;
|
|
20
|
-
allowedAgents?: string[];
|
|
21
|
-
}
|
|
22
|
-
export declare class ChecklistCollection extends PouchCollection<IChecklist> implements IClearable {
|
|
23
|
-
beforeInit(): Promise<void>;
|
|
24
|
-
clear(): Promise<void>;
|
|
25
|
-
find(selector?: Record<string, any> | Partial<IChecklist> | undefined, opts?: CollectionFindOptions): Promise<IChecklist[]>;
|
|
26
|
-
}
|
|
27
|
-
export declare class SPChecklistItem extends ApplicationRecord implements IChecklist {
|
|
28
|
-
static jsonapiType: string;
|
|
29
|
-
name: string;
|
|
30
|
-
isPlanned: boolean;
|
|
31
|
-
iconUrl: string;
|
|
32
|
-
updatedAt: Date;
|
|
33
|
-
periodicity: string;
|
|
34
|
-
allowedAgents: string[];
|
|
35
|
-
company: SPCompany;
|
|
36
|
-
family: SPFamily;
|
|
37
|
-
area: SPAreaItem;
|
|
38
|
-
checkpoints?: SPCheckpointItem[] | undefined;
|
|
39
|
-
get _id(): string | undefined;
|
|
40
|
-
}
|
|
41
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/models/Checklist/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAY,MAAM,UAAU,CAAA;AAG5D,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AAEhD,OAAO,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AACxD,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,eAAe,CAAA;AAC7D,OAAO,EAAE,qBAAqB,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACjE,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAA;AAC7C,MAAM,WAAW,UAAW,SAAQ,MAAM;IACxC,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,IAAI,CAAA;IAChB,OAAO,CAAC,EAAE,QAAQ,CAAA;IAClB,IAAI,CAAC,EAAE,KAAK,CAAA;IACZ,WAAW,CAAC,EAAE,WAAW,EAAE,CAAA;IAC3B,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,EAAE,CAAA;CACzB;AAED,qBAAa,mBACX,SAAQ,eAAe,CAAC,UAAU,CAClC,YAAW,UAAU;IAEf,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAI3B,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAItB,IAAI,CACR,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,SAAS,EAChE,IAAI,CAAC,EAAE,qBAAqB,GAC3B,OAAO,CAAC,UAAU,EAAE,CAAC;CAIzB;AACD,qBACa,eAAgB,SAAQ,iBAAkB,YAAW,UAAU;IAC1E,MAAM,CAAC,WAAW,SAAe;IACzB,IAAI,EAAG,MAAM,CAAA;IACb,SAAS,EAAG,OAAO,CAAA;IACnB,OAAO,EAAG,MAAM,CAAA;IACE,SAAS,EAAG,IAAI,CAAA;IAClC,WAAW,EAAG,MAAM,CAAA;IACpB,aAAa,EAAG,MAAM,EAAE,CAAA;IACnB,OAAO,EAAG,SAAS,CAAA;IACnB,MAAM,EAAG,QAAQ,CAAA;IACpB,IAAI,EAAG,UAAU,CAAA;IAChB,WAAW,CAAC,EAAE,gBAAgB,EAAE,GAAG,SAAS,CAAA;IACvD,IAAI,GAAG,IAAI,MAAM,GAAG,SAAS,CAE5B;CACF"}
|
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
2
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
3
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
4
|
-
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
5
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
|
-
};
|
|
7
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
8
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
9
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
10
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
11
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
12
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
13
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
14
|
-
});
|
|
15
|
-
};
|
|
16
|
-
import { Model, Attr, BelongsTo, HasMany, HasOne } from "spraypaint";
|
|
17
|
-
import { PouchCollection, PouchORM } from "pouchorm";
|
|
18
|
-
import { orderBy } from "lodash";
|
|
19
|
-
import { ApplicationRecord } from "../ApplicationRecord";
|
|
20
|
-
export class ChecklistCollection extends PouchCollection {
|
|
21
|
-
beforeInit() {
|
|
22
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
clear() {
|
|
26
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
27
|
-
yield PouchORM.clearDatabase("checklists");
|
|
28
|
-
});
|
|
29
|
-
}
|
|
30
|
-
find(selector, opts) {
|
|
31
|
-
const _super = Object.create(null, {
|
|
32
|
-
find: { get: () => super.find }
|
|
33
|
-
});
|
|
34
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
const result = yield _super.find.call(this, selector, opts);
|
|
36
|
-
return orderBy(result, ["name"], ["asc"]);
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
let SPChecklistItem = class SPChecklistItem extends ApplicationRecord {
|
|
41
|
-
get _id() {
|
|
42
|
-
return this.id;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
SPChecklistItem.jsonapiType = "checklists";
|
|
46
|
-
__decorate([
|
|
47
|
-
Attr()
|
|
48
|
-
], SPChecklistItem.prototype, "name", void 0);
|
|
49
|
-
__decorate([
|
|
50
|
-
Attr()
|
|
51
|
-
], SPChecklistItem.prototype, "isPlanned", void 0);
|
|
52
|
-
__decorate([
|
|
53
|
-
Attr()
|
|
54
|
-
], SPChecklistItem.prototype, "iconUrl", void 0);
|
|
55
|
-
__decorate([
|
|
56
|
-
Attr({ persist: false })
|
|
57
|
-
], SPChecklistItem.prototype, "updatedAt", void 0);
|
|
58
|
-
__decorate([
|
|
59
|
-
Attr()
|
|
60
|
-
], SPChecklistItem.prototype, "periodicity", void 0);
|
|
61
|
-
__decorate([
|
|
62
|
-
Attr()
|
|
63
|
-
], SPChecklistItem.prototype, "allowedAgents", void 0);
|
|
64
|
-
__decorate([
|
|
65
|
-
BelongsTo()
|
|
66
|
-
], SPChecklistItem.prototype, "company", void 0);
|
|
67
|
-
__decorate([
|
|
68
|
-
BelongsTo()
|
|
69
|
-
], SPChecklistItem.prototype, "family", void 0);
|
|
70
|
-
__decorate([
|
|
71
|
-
HasOne()
|
|
72
|
-
], SPChecklistItem.prototype, "area", void 0);
|
|
73
|
-
__decorate([
|
|
74
|
-
HasMany()
|
|
75
|
-
], SPChecklistItem.prototype, "checkpoints", void 0);
|
|
76
|
-
SPChecklistItem = __decorate([
|
|
77
|
-
Model()
|
|
78
|
-
], SPChecklistItem);
|
|
79
|
-
export { SPChecklistItem };
|