asv-hlps 1.2.19 → 1.2.22

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 (67) 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 -0
  28. package/lib/cjs/index.js +1 -0
  29. package/lib/cjs/models/entities/users/Address.d.ts +8 -8
  30. package/lib/cjs/models/entities/users/UserAbs.d.ts +1 -1
  31. package/lib/cjs/models/entities/users/UserNotatial.d.ts +2 -2
  32. package/lib/cjs/models/index.d.ts +0 -1
  33. package/lib/cjs/models/index.js +0 -1
  34. package/lib/esm/core/estates/hlpEstate.d.ts +11 -0
  35. package/lib/esm/core/estates/hlpEstate.js +35 -0
  36. package/lib/esm/core/estates/index.d.ts +5 -0
  37. package/lib/esm/core/estates/index.js +5 -0
  38. package/lib/esm/core/estates/models/Estate.d.ts +24 -0
  39. package/lib/esm/core/estates/models/Estate.js +1 -0
  40. package/lib/esm/core/estates/models/EstateAsset.d.ts +7 -0
  41. package/lib/esm/core/estates/models/EstateAsset.js +1 -0
  42. package/lib/esm/core/estates/models/EstateCat.d.ts +3 -0
  43. package/lib/esm/core/estates/models/EstateCat.js +1 -0
  44. package/lib/esm/core/estates/models/EstateElt.d.ts +3 -0
  45. package/lib/esm/core/estates/models/EstateElt.js +1 -0
  46. package/lib/esm/core/estates/models/EstateLevel.d.ts +3 -0
  47. package/lib/esm/core/estates/models/EstateLevel.js +1 -0
  48. package/lib/esm/core/estates/models/EstatePor.d.ts +3 -0
  49. package/lib/esm/core/estates/models/EstatePor.js +1 -0
  50. package/lib/esm/core/estates/models/Housing.d.ts +17 -0
  51. package/lib/esm/core/estates/models/Housing.js +1 -0
  52. package/lib/esm/core/estates/models/HousingRented.d.ts +15 -0
  53. package/lib/esm/core/estates/models/HousingRented.js +1 -0
  54. package/lib/esm/core/estates/models/index.d.ts +9 -0
  55. package/lib/esm/core/estates/models/index.js +1 -0
  56. package/lib/esm/core/estates/pipes/estate-pipe.d.ts +6 -0
  57. package/lib/esm/core/estates/pipes/estate-pipe.js +12 -0
  58. package/lib/esm/core/estates/pipes/list-estate-pipe.d.ts +6 -0
  59. package/lib/esm/core/estates/pipes/list-estate-pipe.js +12 -0
  60. package/lib/esm/index.d.ts +1 -0
  61. package/lib/esm/index.js +1 -0
  62. package/lib/esm/models/entities/users/Address.d.ts +8 -8
  63. package/lib/esm/models/entities/users/UserAbs.d.ts +1 -1
  64. package/lib/esm/models/entities/users/UserNotatial.d.ts +2 -2
  65. package/lib/esm/models/index.d.ts +0 -1
  66. package/lib/esm/models/index.js +0 -1
  67. 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();
@@ -32,4 +32,5 @@ export * from "./sale";
32
32
  export * from "./typeorm";
33
33
  export * from "./user";
34
34
  export * from "./utils";
35
+ export * from "./core/estates/index";
35
36
  export { AuthService, StorageService, HlpProduct, HlpEntry, StockPipe, AmountOnListBillPipe, AmountOnBillPipe };
package/lib/cjs/index.js CHANGED
@@ -62,3 +62,4 @@ __exportStar(require("./sale"), exports);
62
62
  __exportStar(require("./typeorm"), exports);
63
63
  __exportStar(require("./user"), exports);
64
64
  __exportStar(require("./utils"), exports);
65
+ __exportStar(require("./core/estates/index"), exports);
@@ -2,12 +2,12 @@ import { City } from "../world/City";
2
2
  import { Country } from "../world/Country";
3
3
  import { Region } from "../world/Region";
4
4
  export interface Address {
5
- phoneP: string;
6
- phoneS: string;
7
- address: string;
8
- city: City;
9
- country: Country;
10
- region: Region;
11
- email: string;
12
- cp: number;
5
+ phoneP?: string;
6
+ phoneS?: string;
7
+ address?: string;
8
+ city?: City;
9
+ country?: Country;
10
+ region?: Region;
11
+ email?: string;
12
+ cp?: number;
13
13
  }
@@ -14,7 +14,7 @@ export interface UserAbs extends Address {
14
14
  birthday?: Date | string;
15
15
  password?: string;
16
16
  ip?: string;
17
- isActive: boolean;
17
+ isActive?: boolean;
18
18
  disabled?: boolean;
19
19
  foto?: string;
20
20
  clp?: string;
@@ -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[];
@@ -5,7 +5,6 @@ import { colNa, colNaCo, colNaCoSh, FormProps, HeaderTableColumnType, IPath, Men
5
5
  export * from "./entities/bills/index";
6
6
  export * from "./entities/buys/index";
7
7
  export * from "./entities/comptas/index";
8
- export * from "./entities/estates/index";
9
8
  export * from "./entities/sales/index";
10
9
  export * from "./entities/users/index";
11
10
  export * from "./entities/world/index";
@@ -22,7 +22,6 @@ Object.defineProperty(exports, "colNaCoSh", { enumerable: true, get: function ()
22
22
  __exportStar(require("./entities/bills/index"), exports);
23
23
  __exportStar(require("./entities/buys/index"), exports);
24
24
  __exportStar(require("./entities/comptas/index"), exports);
25
- __exportStar(require("./entities/estates/index"), exports);
26
25
  __exportStar(require("./entities/sales/index"), exports);
27
26
  __exportStar(require("./entities/users/index"), exports);
28
27
  __exportStar(require("./entities/world/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();
@@ -32,4 +32,5 @@ export * from "./sale";
32
32
  export * from "./typeorm";
33
33
  export * from "./user";
34
34
  export * from "./utils";
35
+ export * from "./core/estates/index";
35
36
  export { AuthService, StorageService, HlpProduct, HlpEntry, StockPipe, AmountOnListBillPipe, AmountOnBillPipe };
package/lib/esm/index.js CHANGED
@@ -35,5 +35,6 @@ export * from "./sale";
35
35
  export * from "./typeorm";
36
36
  export * from "./user";
37
37
  export * from "./utils";
38
+ export * from "./core/estates/index";
38
39
  // export * from "./helpers/hlpProduct";
39
40
  export { AuthService, StorageService, HlpProduct, HlpEntry, StockPipe, AmountOnListBillPipe, AmountOnBillPipe };
@@ -2,12 +2,12 @@ import { City } from "../world/City";
2
2
  import { Country } from "../world/Country";
3
3
  import { Region } from "../world/Region";
4
4
  export interface Address {
5
- phoneP: string;
6
- phoneS: string;
7
- address: string;
8
- city: City;
9
- country: Country;
10
- region: Region;
11
- email: string;
12
- cp: number;
5
+ phoneP?: string;
6
+ phoneS?: string;
7
+ address?: string;
8
+ city?: City;
9
+ country?: Country;
10
+ region?: Region;
11
+ email?: string;
12
+ cp?: number;
13
13
  }
@@ -14,7 +14,7 @@ export interface UserAbs extends Address {
14
14
  birthday?: Date | string;
15
15
  password?: string;
16
16
  ip?: string;
17
- isActive: boolean;
17
+ isActive?: boolean;
18
18
  disabled?: boolean;
19
19
  foto?: string;
20
20
  clp?: string;
@@ -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[];
@@ -5,7 +5,6 @@ import { colNa, colNaCo, colNaCoSh, FormProps, HeaderTableColumnType, IPath, Men
5
5
  export * from "./entities/bills/index";
6
6
  export * from "./entities/buys/index";
7
7
  export * from "./entities/comptas/index";
8
- export * from "./entities/estates/index";
9
8
  export * from "./entities/sales/index";
10
9
  export * from "./entities/users/index";
11
10
  export * from "./entities/world/index";
@@ -2,7 +2,6 @@ import { colNa, colNaCo, colNaCoSh } from "./types/Type";
2
2
  export * from "./entities/bills/index";
3
3
  export * from "./entities/buys/index";
4
4
  export * from "./entities/comptas/index";
5
- export * from "./entities/estates/index";
6
5
  export * from "./entities/sales/index";
7
6
  export * from "./entities/users/index";
8
7
  export * from "./entities/world/index";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asv-hlps",
3
- "version": "1.2.19",
3
+ "version": "1.2.22",
4
4
  "description": "helpers",
5
5
  "main": "./lib/cjs/index.js",
6
6
  "module": "./lib/esm/index.js",