asv-hlps 1.2.18 → 1.2.21

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.
Files changed (63) hide show
  1. package/lib/cjs/core/estates/hlpEstate.d.ts +11 -0
  2. package/lib/cjs/core/estates/hlpEstate.js +37 -0
  3. package/lib/cjs/core/estates/index.d.ts +5 -0
  4. package/lib/cjs/core/estates/index.js +27 -0
  5. package/lib/cjs/core/estates/models/Estate.d.ts +24 -0
  6. package/lib/cjs/core/estates/models/Estate.js +2 -0
  7. package/lib/cjs/core/estates/models/EstateAsset.d.ts +7 -0
  8. package/lib/cjs/core/estates/models/EstateAsset.js +2 -0
  9. package/lib/cjs/core/estates/models/EstateCat.d.ts +3 -0
  10. package/lib/cjs/core/estates/models/EstateCat.js +2 -0
  11. package/lib/cjs/core/estates/models/EstateElt.d.ts +3 -0
  12. package/lib/cjs/core/estates/models/EstateElt.js +2 -0
  13. package/lib/cjs/core/estates/models/EstateLevel.d.ts +3 -0
  14. package/lib/cjs/core/estates/models/EstateLevel.js +2 -0
  15. package/lib/cjs/core/estates/models/EstatePor.d.ts +3 -0
  16. package/lib/cjs/core/estates/models/EstatePor.js +2 -0
  17. package/lib/cjs/core/estates/models/Housing.d.ts +17 -0
  18. package/lib/cjs/core/estates/models/Housing.js +2 -0
  19. package/lib/cjs/core/estates/models/HousingRented.d.ts +15 -0
  20. package/lib/cjs/core/estates/models/HousingRented.js +2 -0
  21. package/lib/cjs/core/estates/models/index.d.ts +9 -0
  22. package/lib/cjs/core/estates/models/index.js +2 -0
  23. package/lib/cjs/core/estates/pipes/estate-pipe.d.ts +6 -0
  24. package/lib/cjs/core/estates/pipes/estate-pipe.js +17 -0
  25. package/lib/cjs/core/estates/pipes/list-estate-pipe.d.ts +6 -0
  26. package/lib/cjs/core/estates/pipes/list-estate-pipe.js +17 -0
  27. package/lib/cjs/index.d.ts +1 -13
  28. package/lib/cjs/index.js +1 -13
  29. package/lib/cjs/models/entities/users/UserNotatial.d.ts +2 -2
  30. package/lib/cjs/models/index.d.ts +13 -1
  31. package/lib/cjs/models/index.js +26 -0
  32. package/lib/esm/core/estates/hlpEstate.d.ts +11 -0
  33. package/lib/esm/core/estates/hlpEstate.js +35 -0
  34. package/lib/esm/core/estates/index.d.ts +5 -0
  35. package/lib/esm/core/estates/index.js +5 -0
  36. package/lib/esm/core/estates/models/Estate.d.ts +24 -0
  37. package/lib/esm/core/estates/models/Estate.js +1 -0
  38. package/lib/esm/core/estates/models/EstateAsset.d.ts +7 -0
  39. package/lib/esm/core/estates/models/EstateAsset.js +1 -0
  40. package/lib/esm/core/estates/models/EstateCat.d.ts +3 -0
  41. package/lib/esm/core/estates/models/EstateCat.js +1 -0
  42. package/lib/esm/core/estates/models/EstateElt.d.ts +3 -0
  43. package/lib/esm/core/estates/models/EstateElt.js +1 -0
  44. package/lib/esm/core/estates/models/EstateLevel.d.ts +3 -0
  45. package/lib/esm/core/estates/models/EstateLevel.js +1 -0
  46. package/lib/esm/core/estates/models/EstatePor.d.ts +3 -0
  47. package/lib/esm/core/estates/models/EstatePor.js +1 -0
  48. package/lib/esm/core/estates/models/Housing.d.ts +17 -0
  49. package/lib/esm/core/estates/models/Housing.js +1 -0
  50. package/lib/esm/core/estates/models/HousingRented.d.ts +15 -0
  51. package/lib/esm/core/estates/models/HousingRented.js +1 -0
  52. package/lib/esm/core/estates/models/index.d.ts +9 -0
  53. package/lib/esm/core/estates/models/index.js +1 -0
  54. package/lib/esm/core/estates/pipes/estate-pipe.d.ts +6 -0
  55. package/lib/esm/core/estates/pipes/estate-pipe.js +12 -0
  56. package/lib/esm/core/estates/pipes/list-estate-pipe.d.ts +6 -0
  57. package/lib/esm/core/estates/pipes/list-estate-pipe.js +12 -0
  58. package/lib/esm/index.d.ts +1 -13
  59. package/lib/esm/index.js +1 -13
  60. package/lib/esm/models/entities/users/UserNotatial.d.ts +2 -2
  61. package/lib/esm/models/index.d.ts +13 -1
  62. package/lib/esm/models/index.js +13 -1
  63. package/package.json +1 -1
@@ -0,0 +1,11 @@
1
+ import { Estate } from "./models/Estate";
2
+ import { Housing } from "./models/Housing";
3
+ declare class HlpEstate {
4
+ nbHousings(estate: Estate): number;
5
+ totalHousings(estates: Estate[]): number;
6
+ nbLodgers(housings: Housing[]): number;
7
+ totalLodgers(estates: Estate[]): number;
8
+ address(estate: Estate): string;
9
+ }
10
+ declare const _default: HlpEstate;
11
+ export default _default;
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ class HlpEstate {
4
+ nbHousings(estate) {
5
+ return estate.housings.length || 0;
6
+ }
7
+ totalHousings(estates) {
8
+ if (!estates.length) {
9
+ return 0;
10
+ }
11
+ let count = 0;
12
+ estates.map((estate) => {
13
+ count += this.nbHousings(estate);
14
+ });
15
+ return count;
16
+ }
17
+ nbLodgers(housings) {
18
+ let count = 0;
19
+ housings.map((housing) => {
20
+ if (housing.lodger) {
21
+ count++;
22
+ }
23
+ });
24
+ return count;
25
+ }
26
+ totalLodgers(estates) {
27
+ let count = 0;
28
+ estates.map((estate) => {
29
+ count += this.nbLodgers(estate.housings);
30
+ });
31
+ return count;
32
+ }
33
+ address(estate) {
34
+ return estate.region.name + ", " + estate.city.name + ", " + estate.quarter.name;
35
+ }
36
+ }
37
+ exports.default = new HlpEstate();
@@ -0,0 +1,5 @@
1
+ import HlpEstate from "./hlpEstate";
2
+ import EstatePipe from "./pipes/estate-pipe";
3
+ import ListEstatePipe from "./pipes/estate-pipe";
4
+ export * from "../estates/models/index";
5
+ export { HlpEstate, EstatePipe, ListEstatePipe };
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ var __importDefault = (this && this.__importDefault) || function (mod) {
17
+ return (mod && mod.__esModule) ? mod : { "default": mod };
18
+ };
19
+ Object.defineProperty(exports, "__esModule", { value: true });
20
+ exports.ListEstatePipe = exports.EstatePipe = exports.HlpEstate = void 0;
21
+ const hlpEstate_1 = __importDefault(require("./hlpEstate"));
22
+ exports.HlpEstate = hlpEstate_1.default;
23
+ const estate_pipe_1 = __importDefault(require("./pipes/estate-pipe"));
24
+ exports.EstatePipe = estate_pipe_1.default;
25
+ const estate_pipe_2 = __importDefault(require("./pipes/estate-pipe"));
26
+ exports.ListEstatePipe = estate_pipe_2.default;
27
+ __exportStar(require("../estates/models/index"), exports);
@@ -0,0 +1,24 @@
1
+ import { User } from "../../../models/entities/users/User";
2
+ import { City } from "../../../models/entities/world/City";
3
+ import { Quarter } from "../../../models/entities/world/Quarter";
4
+ import { Region } from "../../../models/entities/world/Region";
5
+ import { EstateAsset } from "./EstateAsset";
6
+ import { EstateCat } from "./EstateCat";
7
+ import { EstatePor } from "./EstatePor";
8
+ import { Housing } from "./Housing";
9
+ export interface Estate {
10
+ id: number;
11
+ ref: string;
12
+ createdAt: Date;
13
+ description: string;
14
+ salePrice: number;
15
+ cat: EstateCat;
16
+ por: EstatePor;
17
+ region?: Region;
18
+ city?: City;
19
+ quarter?: Quarter;
20
+ prop?: User;
21
+ isActive?: boolean;
22
+ housings?: Housing[];
23
+ assets?: EstateAsset[];
24
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,7 @@
1
+ export interface EstateAsset {
2
+ id: number;
3
+ name: string;
4
+ elt: string;
5
+ qtity: number;
6
+ size: string;
7
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstateCat extends NaCoAc {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstateElt extends NaCoAc {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstateLevel extends NaCoAc {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstatePor extends NaCoAc {
3
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,17 @@
1
+ import { User } from "../../../models/entities/users/User";
2
+ import { Estate } from "./Estate";
3
+ import { HousingRented } from "./HousingRented";
4
+ export interface Housing {
5
+ id: number;
6
+ createdAt: Date;
7
+ description: string;
8
+ ref: string;
9
+ price: number;
10
+ deposit: number;
11
+ chargesPrice: number;
12
+ isActive: boolean;
13
+ estate: Estate;
14
+ lodger: User;
15
+ encoder: User;
16
+ rented: HousingRented;
17
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,15 @@
1
+ import { User } from "../../../models/entities/users/User";
2
+ import { Housing } from "./Housing";
3
+ export interface HousingRented {
4
+ id: number;
5
+ dateIn: Date;
6
+ dateOut: Date;
7
+ price: number;
8
+ deposit: number;
9
+ prepaid: number;
10
+ lodger?: User;
11
+ lodgerId?: number;
12
+ housingId?: number;
13
+ housing?: Housing;
14
+ encoder?: User;
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,9 @@
1
+ import { Estate } from "./Estate";
2
+ import { EstateAsset } from "./EstateAsset";
3
+ import { EstateCat } from "./EstateCat";
4
+ import { EstateElt } from "./EstateElt";
5
+ import { EstateLevel } from "./EstateLevel";
6
+ import { EstatePor } from "./EstatePor";
7
+ import { Housing } from "./Housing";
8
+ import { HousingRented } from "./HousingRented";
9
+ export { Estate, EstateAsset, EstateCat, EstateElt, EstateLevel, EstatePor, Housing, HousingRented };
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -0,0 +1,6 @@
1
+ import { Estate } from "../models/Estate";
2
+ declare class EstatePipe {
3
+ transform(estate: Estate, params: "housings" | "lodgers"): number;
4
+ }
5
+ declare const _default: EstatePipe;
6
+ export default _default;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const hlpEstate_1 = __importDefault(require("../hlpEstate"));
7
+ class EstatePipe {
8
+ transform(estate, params) {
9
+ switch (params) {
10
+ case "housings":
11
+ return hlpEstate_1.default.nbHousings(estate);
12
+ case "lodgers":
13
+ return hlpEstate_1.default.nbLodgers(estate.housings);
14
+ }
15
+ }
16
+ }
17
+ exports.default = new EstatePipe();
@@ -0,0 +1,6 @@
1
+ import { Estate } from "../models/Estate";
2
+ declare class ListEstatePipe {
3
+ transform(estates: Estate[], params: "housings" | "lodgers"): number;
4
+ }
5
+ declare const _default: ListEstatePipe;
6
+ export default _default;
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ const hlpEstate_1 = __importDefault(require("../hlpEstate"));
7
+ class ListEstatePipe {
8
+ transform(estates, params) {
9
+ switch (params) {
10
+ case "housings":
11
+ return hlpEstate_1.default.totalHousings(estates);
12
+ case "lodgers":
13
+ return hlpEstate_1.default.totalLodgers(estates);
14
+ }
15
+ }
16
+ }
17
+ exports.default = new ListEstatePipe();
@@ -22,19 +22,6 @@ import "./utils";
22
22
  export * from "./auth";
23
23
  export * from "./bill";
24
24
  export * from "./bootstrap";
25
- export * from "./models/entities/bills/index";
26
- export * from "./models/entities/buys/index";
27
- export * from "./models/entities/comptas/index";
28
- export * from "./models/entities/estates/index";
29
- export * from "./models/entities/sales/index";
30
- export * from "./models/entities/users/index";
31
- export * from "./models/entities/world/index";
32
- export * from "./models/entities/cashs/index";
33
- export * from "./models/entities/auth/index";
34
- export * from "./models/entities/docs/index";
35
- export * from "./models/entities/mails/index";
36
- export * from "./models/entities/products/index";
37
- export * from "./models/entities/utilities/index";
38
25
  export * from "./models/index";
39
26
  export * from "./pdfs/invoices/amountInvoice";
40
27
  export * from "./pdfs/invoices/infoInvoice";
@@ -45,4 +32,5 @@ export * from "./sale";
45
32
  export * from "./typeorm";
46
33
  export * from "./user";
47
34
  export * from "./utils";
35
+ export * from "./core/estates/index";
48
36
  export { AuthService, StorageService, HlpProduct, HlpEntry, StockPipe, AmountOnListBillPipe, AmountOnBillPipe };
package/lib/cjs/index.js CHANGED
@@ -52,19 +52,6 @@ require("./utils");
52
52
  __exportStar(require("./auth"), exports);
53
53
  __exportStar(require("./bill"), exports);
54
54
  __exportStar(require("./bootstrap"), exports);
55
- __exportStar(require("./models/entities/bills/index"), exports);
56
- __exportStar(require("./models/entities/buys/index"), exports);
57
- __exportStar(require("./models/entities/comptas/index"), exports);
58
- __exportStar(require("./models/entities/estates/index"), exports);
59
- __exportStar(require("./models/entities/sales/index"), exports);
60
- __exportStar(require("./models/entities/users/index"), exports);
61
- __exportStar(require("./models/entities/world/index"), exports);
62
- __exportStar(require("./models/entities/cashs/index"), exports);
63
- __exportStar(require("./models/entities/auth/index"), exports);
64
- __exportStar(require("./models/entities/docs/index"), exports);
65
- __exportStar(require("./models/entities/mails/index"), exports);
66
- __exportStar(require("./models/entities/products/index"), exports);
67
- __exportStar(require("./models/entities/utilities/index"), exports);
68
55
  __exportStar(require("./models/index"), exports);
69
56
  __exportStar(require("./pdfs/invoices/amountInvoice"), exports);
70
57
  __exportStar(require("./pdfs/invoices/infoInvoice"), exports);
@@ -75,3 +62,4 @@ __exportStar(require("./sale"), exports);
75
62
  __exportStar(require("./typeorm"), exports);
76
63
  __exportStar(require("./user"), exports);
77
64
  __exportStar(require("./utils"), exports);
65
+ __exportStar(require("./core/estates/index"), exports);
@@ -1,5 +1,5 @@
1
- import { Estate } from "../estates/Estate";
2
- import { Housing } from "../estates/Housing";
1
+ import { Estate } from "../../../core/estates/models/Estate";
2
+ import { Housing } from "../../../core/estates/models/Housing";
3
3
  import { UserAbs } from "./UserAbs";
4
4
  export interface UserNotarial extends UserAbs {
5
5
  estates?: Estate[];
@@ -2,4 +2,16 @@ import { NaAc } from "./shared/NaAc";
2
2
  import { NaCoAc } from "./shared/NaCoAc";
3
3
  import { NaCoShortAc } from "./shared/NaCoShortAc";
4
4
  import { colNa, colNaCo, colNaCoSh, FormProps, HeaderTableColumnType, IPath, MenuItemType } from "./types/Type";
5
- export { NaAc, NaCoAc, NaCoShortAc, MenuItemType, HeaderTableColumnType, IPath, colNa, colNaCo, colNaCoSh, FormProps, };
5
+ export * from "./entities/bills/index";
6
+ export * from "./entities/buys/index";
7
+ export * from "./entities/comptas/index";
8
+ export * from "./entities/sales/index";
9
+ export * from "./entities/users/index";
10
+ export * from "./entities/world/index";
11
+ export * from "./entities/cashs/index";
12
+ export * from "./entities/auth/index";
13
+ export * from "./entities/docs/index";
14
+ export * from "./entities/mails/index";
15
+ export * from "./entities/products/index";
16
+ export * from "./entities/utilities/index";
17
+ export { NaAc, NaCoAc, NaCoShortAc, MenuItemType, HeaderTableColumnType, IPath, colNa, colNaCo, colNaCoSh, FormProps };
@@ -1,7 +1,33 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
2
16
  Object.defineProperty(exports, "__esModule", { value: true });
3
17
  exports.colNaCoSh = exports.colNaCo = exports.colNa = void 0;
4
18
  const Type_1 = require("./types/Type");
5
19
  Object.defineProperty(exports, "colNa", { enumerable: true, get: function () { return Type_1.colNa; } });
6
20
  Object.defineProperty(exports, "colNaCo", { enumerable: true, get: function () { return Type_1.colNaCo; } });
7
21
  Object.defineProperty(exports, "colNaCoSh", { enumerable: true, get: function () { return Type_1.colNaCoSh; } });
22
+ __exportStar(require("./entities/bills/index"), exports);
23
+ __exportStar(require("./entities/buys/index"), exports);
24
+ __exportStar(require("./entities/comptas/index"), exports);
25
+ __exportStar(require("./entities/sales/index"), exports);
26
+ __exportStar(require("./entities/users/index"), exports);
27
+ __exportStar(require("./entities/world/index"), exports);
28
+ __exportStar(require("./entities/cashs/index"), exports);
29
+ __exportStar(require("./entities/auth/index"), exports);
30
+ __exportStar(require("./entities/docs/index"), exports);
31
+ __exportStar(require("./entities/mails/index"), exports);
32
+ __exportStar(require("./entities/products/index"), exports);
33
+ __exportStar(require("./entities/utilities/index"), exports);
@@ -0,0 +1,11 @@
1
+ import { Estate } from "./models/Estate";
2
+ import { Housing } from "./models/Housing";
3
+ declare class HlpEstate {
4
+ nbHousings(estate: Estate): number;
5
+ totalHousings(estates: Estate[]): number;
6
+ nbLodgers(housings: Housing[]): number;
7
+ totalLodgers(estates: Estate[]): number;
8
+ address(estate: Estate): string;
9
+ }
10
+ declare const _default: HlpEstate;
11
+ export default _default;
@@ -0,0 +1,35 @@
1
+ class HlpEstate {
2
+ nbHousings(estate) {
3
+ return estate.housings.length || 0;
4
+ }
5
+ totalHousings(estates) {
6
+ if (!estates.length) {
7
+ return 0;
8
+ }
9
+ let count = 0;
10
+ estates.map((estate) => {
11
+ count += this.nbHousings(estate);
12
+ });
13
+ return count;
14
+ }
15
+ nbLodgers(housings) {
16
+ let count = 0;
17
+ housings.map((housing) => {
18
+ if (housing.lodger) {
19
+ count++;
20
+ }
21
+ });
22
+ return count;
23
+ }
24
+ totalLodgers(estates) {
25
+ let count = 0;
26
+ estates.map((estate) => {
27
+ count += this.nbLodgers(estate.housings);
28
+ });
29
+ return count;
30
+ }
31
+ address(estate) {
32
+ return estate.region.name + ", " + estate.city.name + ", " + estate.quarter.name;
33
+ }
34
+ }
35
+ export default new HlpEstate();
@@ -0,0 +1,5 @@
1
+ import HlpEstate from "./hlpEstate";
2
+ import EstatePipe from "./pipes/estate-pipe";
3
+ import ListEstatePipe from "./pipes/estate-pipe";
4
+ export * from "../estates/models/index";
5
+ export { HlpEstate, EstatePipe, ListEstatePipe };
@@ -0,0 +1,5 @@
1
+ import HlpEstate from "./hlpEstate";
2
+ import EstatePipe from "./pipes/estate-pipe";
3
+ import ListEstatePipe from "./pipes/estate-pipe";
4
+ export * from "../estates/models/index";
5
+ export { HlpEstate, EstatePipe, ListEstatePipe };
@@ -0,0 +1,24 @@
1
+ import { User } from "../../../models/entities/users/User";
2
+ import { City } from "../../../models/entities/world/City";
3
+ import { Quarter } from "../../../models/entities/world/Quarter";
4
+ import { Region } from "../../../models/entities/world/Region";
5
+ import { EstateAsset } from "./EstateAsset";
6
+ import { EstateCat } from "./EstateCat";
7
+ import { EstatePor } from "./EstatePor";
8
+ import { Housing } from "./Housing";
9
+ export interface Estate {
10
+ id: number;
11
+ ref: string;
12
+ createdAt: Date;
13
+ description: string;
14
+ salePrice: number;
15
+ cat: EstateCat;
16
+ por: EstatePor;
17
+ region?: Region;
18
+ city?: City;
19
+ quarter?: Quarter;
20
+ prop?: User;
21
+ isActive?: boolean;
22
+ housings?: Housing[];
23
+ assets?: EstateAsset[];
24
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,7 @@
1
+ export interface EstateAsset {
2
+ id: number;
3
+ name: string;
4
+ elt: string;
5
+ qtity: number;
6
+ size: string;
7
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstateCat extends NaCoAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstateElt extends NaCoAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstateLevel extends NaCoAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,3 @@
1
+ import { NaCoAc } from "../../../models/shared/NaCoAc";
2
+ export interface EstatePor extends NaCoAc {
3
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,17 @@
1
+ import { User } from "../../../models/entities/users/User";
2
+ import { Estate } from "./Estate";
3
+ import { HousingRented } from "./HousingRented";
4
+ export interface Housing {
5
+ id: number;
6
+ createdAt: Date;
7
+ description: string;
8
+ ref: string;
9
+ price: number;
10
+ deposit: number;
11
+ chargesPrice: number;
12
+ isActive: boolean;
13
+ estate: Estate;
14
+ lodger: User;
15
+ encoder: User;
16
+ rented: HousingRented;
17
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,15 @@
1
+ import { User } from "../../../models/entities/users/User";
2
+ import { Housing } from "./Housing";
3
+ export interface HousingRented {
4
+ id: number;
5
+ dateIn: Date;
6
+ dateOut: Date;
7
+ price: number;
8
+ deposit: number;
9
+ prepaid: number;
10
+ lodger?: User;
11
+ lodgerId?: number;
12
+ housingId?: number;
13
+ housing?: Housing;
14
+ encoder?: User;
15
+ }
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,9 @@
1
+ import { Estate } from "./Estate";
2
+ import { EstateAsset } from "./EstateAsset";
3
+ import { EstateCat } from "./EstateCat";
4
+ import { EstateElt } from "./EstateElt";
5
+ import { EstateLevel } from "./EstateLevel";
6
+ import { EstatePor } from "./EstatePor";
7
+ import { Housing } from "./Housing";
8
+ import { HousingRented } from "./HousingRented";
9
+ export { Estate, EstateAsset, EstateCat, EstateElt, EstateLevel, EstatePor, Housing, HousingRented };
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1,6 @@
1
+ import { Estate } from "../models/Estate";
2
+ declare class EstatePipe {
3
+ transform(estate: Estate, params: "housings" | "lodgers"): number;
4
+ }
5
+ declare const _default: EstatePipe;
6
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import HlpEstate from "../hlpEstate";
2
+ class EstatePipe {
3
+ transform(estate, params) {
4
+ switch (params) {
5
+ case "housings":
6
+ return HlpEstate.nbHousings(estate);
7
+ case "lodgers":
8
+ return HlpEstate.nbLodgers(estate.housings);
9
+ }
10
+ }
11
+ }
12
+ export default new EstatePipe();
@@ -0,0 +1,6 @@
1
+ import { Estate } from "../models/Estate";
2
+ declare class ListEstatePipe {
3
+ transform(estates: Estate[], params: "housings" | "lodgers"): number;
4
+ }
5
+ declare const _default: ListEstatePipe;
6
+ export default _default;
@@ -0,0 +1,12 @@
1
+ import HlpEstate from "../hlpEstate";
2
+ class ListEstatePipe {
3
+ transform(estates, params) {
4
+ switch (params) {
5
+ case "housings":
6
+ return HlpEstate.totalHousings(estates);
7
+ case "lodgers":
8
+ return HlpEstate.totalLodgers(estates);
9
+ }
10
+ }
11
+ }
12
+ export default new ListEstatePipe();
@@ -22,19 +22,6 @@ import "./utils";
22
22
  export * from "./auth";
23
23
  export * from "./bill";
24
24
  export * from "./bootstrap";
25
- export * from "./models/entities/bills/index";
26
- export * from "./models/entities/buys/index";
27
- export * from "./models/entities/comptas/index";
28
- export * from "./models/entities/estates/index";
29
- export * from "./models/entities/sales/index";
30
- export * from "./models/entities/users/index";
31
- export * from "./models/entities/world/index";
32
- export * from "./models/entities/cashs/index";
33
- export * from "./models/entities/auth/index";
34
- export * from "./models/entities/docs/index";
35
- export * from "./models/entities/mails/index";
36
- export * from "./models/entities/products/index";
37
- export * from "./models/entities/utilities/index";
38
25
  export * from "./models/index";
39
26
  export * from "./pdfs/invoices/amountInvoice";
40
27
  export * from "./pdfs/invoices/infoInvoice";
@@ -45,4 +32,5 @@ export * from "./sale";
45
32
  export * from "./typeorm";
46
33
  export * from "./user";
47
34
  export * from "./utils";
35
+ export * from "./core/estates/index";
48
36
  export { AuthService, StorageService, HlpProduct, HlpEntry, StockPipe, AmountOnListBillPipe, AmountOnBillPipe };
package/lib/esm/index.js CHANGED
@@ -25,19 +25,6 @@ import "./utils";
25
25
  export * from "./auth";
26
26
  export * from "./bill";
27
27
  export * from "./bootstrap";
28
- export * from "./models/entities/bills/index";
29
- export * from "./models/entities/buys/index";
30
- export * from "./models/entities/comptas/index";
31
- export * from "./models/entities/estates/index";
32
- export * from "./models/entities/sales/index";
33
- export * from "./models/entities/users/index";
34
- export * from "./models/entities/world/index";
35
- export * from "./models/entities/cashs/index";
36
- export * from "./models/entities/auth/index";
37
- export * from "./models/entities/docs/index";
38
- export * from "./models/entities/mails/index";
39
- export * from "./models/entities/products/index";
40
- export * from "./models/entities/utilities/index";
41
28
  export * from "./models/index";
42
29
  export * from "./pdfs/invoices/amountInvoice";
43
30
  export * from "./pdfs/invoices/infoInvoice";
@@ -48,5 +35,6 @@ export * from "./sale";
48
35
  export * from "./typeorm";
49
36
  export * from "./user";
50
37
  export * from "./utils";
38
+ export * from "./core/estates/index";
51
39
  // export * from "./helpers/hlpProduct";
52
40
  export { AuthService, StorageService, HlpProduct, HlpEntry, StockPipe, AmountOnListBillPipe, AmountOnBillPipe };
@@ -1,5 +1,5 @@
1
- import { Estate } from "../estates/Estate";
2
- import { Housing } from "../estates/Housing";
1
+ import { Estate } from "../../../core/estates/models/Estate";
2
+ import { Housing } from "../../../core/estates/models/Housing";
3
3
  import { UserAbs } from "./UserAbs";
4
4
  export interface UserNotarial extends UserAbs {
5
5
  estates?: Estate[];
@@ -2,4 +2,16 @@ import { NaAc } from "./shared/NaAc";
2
2
  import { NaCoAc } from "./shared/NaCoAc";
3
3
  import { NaCoShortAc } from "./shared/NaCoShortAc";
4
4
  import { colNa, colNaCo, colNaCoSh, FormProps, HeaderTableColumnType, IPath, MenuItemType } from "./types/Type";
5
- export { NaAc, NaCoAc, NaCoShortAc, MenuItemType, HeaderTableColumnType, IPath, colNa, colNaCo, colNaCoSh, FormProps, };
5
+ export * from "./entities/bills/index";
6
+ export * from "./entities/buys/index";
7
+ export * from "./entities/comptas/index";
8
+ export * from "./entities/sales/index";
9
+ export * from "./entities/users/index";
10
+ export * from "./entities/world/index";
11
+ export * from "./entities/cashs/index";
12
+ export * from "./entities/auth/index";
13
+ export * from "./entities/docs/index";
14
+ export * from "./entities/mails/index";
15
+ export * from "./entities/products/index";
16
+ export * from "./entities/utilities/index";
17
+ export { NaAc, NaCoAc, NaCoShortAc, MenuItemType, HeaderTableColumnType, IPath, colNa, colNaCo, colNaCoSh, FormProps };
@@ -1,2 +1,14 @@
1
1
  import { colNa, colNaCo, colNaCoSh } from "./types/Type";
2
- export { colNa, colNaCo, colNaCoSh, };
2
+ export * from "./entities/bills/index";
3
+ export * from "./entities/buys/index";
4
+ export * from "./entities/comptas/index";
5
+ export * from "./entities/sales/index";
6
+ export * from "./entities/users/index";
7
+ export * from "./entities/world/index";
8
+ export * from "./entities/cashs/index";
9
+ export * from "./entities/auth/index";
10
+ export * from "./entities/docs/index";
11
+ export * from "./entities/mails/index";
12
+ export * from "./entities/products/index";
13
+ export * from "./entities/utilities/index";
14
+ export { colNa, colNaCo, colNaCoSh };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.2.18",
3
+ "version": "1.2.21",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",