taxtank-core 0.33.40 → 0.33.41

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  export function compareMatOptions(option, value) {
2
- if (!option) {
2
+ if (!option || !value) {
3
3
  return false;
4
4
  }
5
5
  return option.id === value.id;
@@ -10,4 +10,4 @@ export function displayMatOptions(option) {
10
10
  }
11
11
  return option['name'];
12
12
  }
13
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibWF0LW9wdGlvbnMtZnVuY3Rpb25zLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vLi4vLi4vLi4vLi4vLi4vcHJvamVjdHMvdHQtY29yZS9zcmMvbGliL2Z1bmN0aW9ucy9tYXQtb3B0aW9ucy1mdW5jdGlvbnMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxVQUFVLGlCQUFpQixDQUFDLE1BQVcsRUFBRSxLQUFVO0lBQ3ZELElBQUksQ0FBQyxNQUFNLEVBQUU7UUFDWCxPQUFPLEtBQUssQ0FBQztLQUNkO0lBRUQsT0FBTyxNQUFNLENBQUMsRUFBRSxLQUFLLEtBQUssQ0FBQyxFQUFFLENBQUM7QUFDaEMsQ0FBQztBQUVELE1BQU0sVUFBVSxpQkFBaUIsQ0FBQyxNQUFjO0lBQzlDLElBQUksQ0FBQyxNQUFNLEVBQUU7UUFDWCxPQUFPLEVBQUUsQ0FBQztLQUNYO0lBRUQsT0FBTyxNQUFNLENBQUMsTUFBTSxDQUFDLENBQUM7QUFDeEIsQ0FBQyIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBmdW5jdGlvbiBjb21wYXJlTWF0T3B0aW9ucyhvcHRpb246IGFueSwgdmFsdWU6IGFueSk6IGJvb2xlYW4ge1xyXG4gIGlmICghb3B0aW9uKSB7XHJcbiAgICByZXR1cm4gZmFsc2U7XHJcbiAgfVxyXG5cclxuICByZXR1cm4gb3B0aW9uLmlkID09PSB2YW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zZTtcclxuICB9XHJcblxyXG4gIHJldHVybiBvcHRpb24uaWQgPT09IHZhbHVlLmlkO1xyXG59XHJcblxyXG5leHBvcnQgZnVuY3Rpb24gZGlzcGxheU1hdE9wdGlvbnMob3B0aW9uOiBvYmplY3QpOiBzdHJpbmcge1xyXG4gIGlmICghb3B0aW9uKSB7XHJcbiAgICByZXR1cm4gJyc7XHJcbiAgfVxyXG5cclxuICByZXR1cm4gb3B0aW9uWyduYW1lJ107XHJcbn1cclxuIl19
@@ -2,5 +2,8 @@ export var PropertyMessagesEnum;
2
2
  (function (PropertyMessagesEnum) {
3
3
  PropertyMessagesEnum["PHOTO_UPDATED"] = "Property photo updated";
4
4
  PropertyMessagesEnum["PROPERTY_UPDATED"] = "Property updated";
5
+ PropertyMessagesEnum["DELETE_CONFIRM"] = "Are you sure you want to delete property?";
6
+ PropertyMessagesEnum["DELETE"] = "Property deleted";
7
+ PropertyMessagesEnum["DELETE_500"] = "Only properties without transactions can be removed";
5
8
  })(PropertyMessagesEnum || (PropertyMessagesEnum = {}));
6
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHktbWVzc2FnZXMuZW51bS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4uLy4uLy4uLy4uL3Byb2plY3RzL3R0LWNvcmUvc3JjL2xpYi9zZXJ2aWNlcy9odHRwL3Byb3BlcnR5L3Byb3BlcnR5LW1lc3NhZ2VzLmVudW0udHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsTUFBTSxDQUFOLElBQVksb0JBR1g7QUFIRCxXQUFZLG9CQUFvQjtJQUM5QixnRUFBd0MsQ0FBQTtJQUN4Qyw2REFBcUMsQ0FBQTtBQUN2QyxDQUFDLEVBSFcsb0JBQW9CLEtBQXBCLG9CQUFvQixRQUcvQiIsInNvdXJjZXNDb250ZW50IjpbImV4cG9ydCBlbnVtIFByb3B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dHJhbnNhY3Rpb25zIGNhbiBiZSByZW1vdmVkJ1xufVxuIl19
@@ -1,10 +1,12 @@
1
1
  import { Inject, Injectable } from '@angular/core';
2
- import { map } from 'rxjs/operators';
2
+ import { throwError } from 'rxjs';
3
+ import { catchError, map } from 'rxjs/operators';
3
4
  import { plainToClass } from 'class-transformer';
4
5
  import { AppEvent, AppEventTypeEnum, Property, PropertyCategoryMovement, PropertySale, PropertyShare, PropertySubscription, PropertyValuation } from '../../../models';
5
6
  import { RestService } from '../rest';
6
7
  import { PropertyCollection } from '../../../collections';
7
8
  import { UserRolesEnum } from 'taxtank-core/common';
9
+ import { PropertyMessagesEnum } from './property-messages.enum';
8
10
  import * as i0 from "@angular/core";
9
11
  /**
10
12
  * @Todo Alex remove functionality related to PropertyShare
@@ -80,6 +82,14 @@ export class PropertyService extends RestService {
80
82
  this.updateCache([deactivatedProperty], 'put');
81
83
  }));
82
84
  }
85
+ delete(property) {
86
+ return super.delete(property).pipe(catchError((error) => {
87
+ if (error.status === 500) {
88
+ this.toastService.error(PropertyMessagesEnum.DELETE_500);
89
+ }
90
+ return throwError(() => error);
91
+ }));
92
+ }
83
93
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
84
94
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, providedIn: 'root' }); }
85
95
  }
@@ -92,4 +102,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
92
102
  type: Inject,
93
103
  args: ['environment']
94
104
  }] }] });
95
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJvcGVydHkuc2VydmljZS5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uLy4u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50LmFwaVYyfS9wcm9wZXJ0eS1zdWJzY3JpcHRpb25zLyR7cHJvcGVydHkuZ2V0Q3VycmVudFN1YnNjcmlwdGlvbigpLmlkfWApXG4gICAgICAucGlwZShcbiAgICAgICAgbWFwKCgpID0+IHtcbiAgICAgICAgICBjb25zdCBkZWFjdGl2YXRlZFByb3BlcnR5OiBQcm9wZXJ0eSA9IHBsYWluVG9DbGFzcyhQcm9wZXJ0eSwgT2JqZWN0LmFzc2lnbih7fSwgcHJvcGVydHksIHsgc3Vic2NyaXB0aW9uczogW10gfSkpO1xuXG4gICAgICAgICAgdGhpcy51cGRhdGVDYWNoZShbZGVhY3RpdmF0ZWRQcm9wZXJ0eV0sICdwdXQnKTtcbiAgICAgICAgfSlcbiAgICAgICk7XG4gIH1cblxuICBkZWxldGUocHJvcGVydHk6IFByb3BlcnR5KTogT2JzZXJ2YWJsZTx2b2lkPiB7XG4gICAgcmV0dXJuIHN1cGVyLmRlbGV0ZShwcm9wZXJ0eSkucGlwZShcbiAgICAgIGNhdGNoRXJyb3IoKGVycm9yOiBIdHRwRXJyb3JSZXNwb25zZSkgPT4ge1xuICAgICAgICBpZiAoZXJyb3Iuc3RhdHVzID09PSA1MDApIHtcbiAgICAgICAgICB0aGlzLnRvYXN0U2VydmljZS5lcnJvcihQcm9wZXJ0eU1lc3NhZ2VzRW51bS5ERUxFVEVfNTAwKTtcbiAgICAgICAgfVxuXG4gICAgICAgIHJldHVybiB0aHJvd0Vycm9yKCgpID0+IGVycm9yKTtcbiAgICAgIH0pLFxuICAgIClcbiAgfVxufVxuIl19
@@ -13946,6 +13946,9 @@ var PropertyMessagesEnum;
13946
13946
  (function (PropertyMessagesEnum) {
13947
13947
  PropertyMessagesEnum["PHOTO_UPDATED"] = "Property photo updated";
13948
13948
  PropertyMessagesEnum["PROPERTY_UPDATED"] = "Property updated";
13949
+ PropertyMessagesEnum["DELETE_CONFIRM"] = "Are you sure you want to delete property?";
13950
+ PropertyMessagesEnum["DELETE"] = "Property deleted";
13951
+ PropertyMessagesEnum["DELETE_500"] = "Only properties without transactions can be removed";
13949
13952
  })(PropertyMessagesEnum || (PropertyMessagesEnum = {}));
13950
13953
 
13951
13954
  /**
@@ -14022,6 +14025,14 @@ class PropertyService extends RestService$1 {
14022
14025
  this.updateCache([deactivatedProperty], 'put');
14023
14026
  }));
14024
14027
  }
14028
+ delete(property) {
14029
+ return super.delete(property).pipe(catchError((error) => {
14030
+ if (error.status === 500) {
14031
+ this.toastService.error(PropertyMessagesEnum.DELETE_500);
14032
+ }
14033
+ return throwError(() => error);
14034
+ }));
14035
+ }
14025
14036
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, deps: [{ token: 'environment' }], target: i0.ɵɵFactoryTarget.Injectable }); }
14026
14037
  static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PropertyService, providedIn: 'root' }); }
14027
14038
  }
@@ -20454,7 +20465,7 @@ function getDocIcon(file) {
20454
20465
  }
20455
20466
 
20456
20467
  function compareMatOptions(option, value) {
20457
- if (!option) {
20468
+ if (!option || !value) {
20458
20469
  return false;
20459
20470
  }
20460
20471
  return option.id === value.id;