taxtank-core 0.22.2 → 0.23.1
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/bundles/taxtank-core.umd.js +3982 -3526
- package/bundles/taxtank-core.umd.js.map +1 -1
- package/esm2015/lib/db/Models/sole/sole-details.js +4 -0
- package/esm2015/lib/db/Models/transaction/transaction-base.js +16 -5
- package/esm2015/lib/db/Models/user/user.js +1 -1
- package/esm2015/lib/forms/index.js +2 -1
- package/esm2015/lib/forms/register/register-client.form.js +3 -6
- package/esm2015/lib/forms/sole/index.js +4 -0
- package/esm2015/lib/forms/sole/sole-business.form.js +15 -0
- package/esm2015/lib/forms/sole/sole-contact.form.js +20 -0
- package/esm2015/lib/forms/sole/sole-details.form.js +11 -0
- package/esm2015/lib/interfaces/photoable.js +1 -1
- package/esm2015/lib/models/bank/bank.js +2 -2
- package/esm2015/lib/models/chart-accounts/chart-accounts-category.e-collection.js +48 -0
- package/esm2015/lib/models/endpoint/endpoints.const.js +4 -1
- package/esm2015/lib/models/firm/firm.js +2 -2
- package/esm2015/lib/models/index.js +2 -0
- package/esm2015/lib/models/property/property.js +2 -2
- package/esm2015/lib/models/registration-invite/registration-invite.js +2 -2
- package/esm2015/lib/models/sole/index.js +9 -0
- package/esm2015/lib/models/sole/sole-business-allocation.js +14 -0
- package/esm2015/lib/models/sole/sole-business-loss.js +10 -0
- package/esm2015/lib/models/sole/sole-business.js +44 -0
- package/esm2015/lib/models/sole/sole-contact.js +33 -0
- package/esm2015/lib/models/sole/sole-details.js +10 -0
- package/esm2015/lib/models/sole/sole-invoice-item.js +14 -0
- package/esm2015/lib/models/sole/sole-invoice-template.js +14 -0
- package/esm2015/lib/models/sole/sole-invoice.js +32 -0
- package/esm2015/lib/models/tax-summary/tax-summary.js +5 -1
- package/esm2015/lib/models/user/user.js +6 -2
- package/esm2015/lib/services/http/index.js +2 -0
- package/esm2015/lib/services/http/rest/rest.service.js +6 -3
- package/esm2015/lib/services/http/sole/index.js +4 -0
- package/esm2015/lib/services/http/sole/sole-business/sole-business.service.js +21 -0
- package/esm2015/lib/services/http/sole/sole-contact/sole-contact.service.js +21 -0
- package/esm2015/lib/services/http/sole/sole-details/sole-details.service.js +59 -0
- package/esm2015/lib/services/http/user/user.service.js +1 -1
- package/esm2015/lib/services/index.js +2 -0
- package/esm2015/public-api.js +6 -1
- package/fesm2015/taxtank-core.js +3136 -2802
- package/fesm2015/taxtank-core.js.map +1 -1
- package/lib/db/Models/sole/sole-details.d.ts +11 -0
- package/lib/db/Models/transaction/transaction-base.d.ts +2 -0
- package/lib/db/Models/user/user.d.ts +2 -0
- package/lib/forms/index.d.ts +1 -0
- package/lib/forms/sole/index.d.ts +3 -0
- package/lib/forms/sole/sole-business.form.d.ts +5 -0
- package/lib/forms/sole/sole-contact.form.d.ts +5 -0
- package/lib/forms/sole/sole-details.form.d.ts +5 -0
- package/lib/interfaces/photoable.d.ts +1 -1
- package/lib/models/bank/bank.d.ts +1 -1
- package/lib/models/chart-accounts/chart-accounts-category.e-collection.d.ts +16 -0
- package/lib/models/firm/firm.d.ts +1 -1
- package/lib/models/index.d.ts +1 -0
- package/lib/models/property/property.d.ts +1 -1
- package/lib/models/registration-invite/registration-invite.d.ts +1 -1
- package/lib/models/sole/index.d.ts +8 -0
- package/lib/models/sole/sole-business-allocation.d.ts +7 -0
- package/lib/models/sole/sole-business-loss.d.ts +5 -0
- package/lib/models/sole/sole-business.d.ts +22 -0
- package/lib/models/sole/sole-contact.d.ts +15 -0
- package/lib/models/sole/sole-details.d.ts +5 -0
- package/lib/models/sole/sole-invoice-item.d.ts +7 -0
- package/lib/models/sole/sole-invoice-template.d.ts +7 -0
- package/lib/models/sole/sole-invoice.d.ts +15 -0
- package/lib/models/user/user.d.ts +3 -1
- package/lib/services/http/index.d.ts +1 -0
- package/lib/services/http/rest/rest.service.d.ts +5 -2
- package/lib/services/http/sole/index.d.ts +3 -0
- package/lib/services/http/sole/sole-business/sole-business.service.d.ts +11 -0
- package/lib/services/http/sole/sole-contact/sole-contact.service.d.ts +11 -0
- package/lib/services/http/sole/sole-details/sole-details.service.d.ts +19 -0
- package/lib/services/index.d.ts +1 -0
- package/package.json +1 -1
- package/public-api.d.ts +4 -0
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { User } from '../user/user';
|
|
2
|
+
import { AbstractModel } from '../abstract-model';
|
|
3
|
+
export declare class SoleDetails extends AbstractModel {
|
|
4
|
+
abn?: string;
|
|
5
|
+
id?: number;
|
|
6
|
+
isGST?: boolean;
|
|
7
|
+
createdAt?: Date;
|
|
8
|
+
updatedAt?: Date;
|
|
9
|
+
deletedAt?: Date;
|
|
10
|
+
user?: User;
|
|
11
|
+
}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import { Property } from '../property/property';
|
|
2
2
|
import { ChartAccounts } from '../chart-accounts/chart-accounts';
|
|
3
3
|
import { AbstractModel } from '../abstract-model';
|
|
4
|
+
import { SoleBusiness } from '../sole/sole-business';
|
|
4
5
|
export declare class TransactionBase extends AbstractModel {
|
|
5
6
|
id?: number;
|
|
6
7
|
amount?: number;
|
|
7
8
|
property?: Property;
|
|
9
|
+
business?: SoleBusiness;
|
|
8
10
|
date?: Date;
|
|
9
11
|
chartAccounts?: ChartAccounts;
|
|
10
12
|
description?: string;
|
|
@@ -14,6 +14,7 @@ import { ClientMovement } from '../firm/client-movement';
|
|
|
14
14
|
import { ClientDetails } from './client-details';
|
|
15
15
|
import { EmployeeDetails } from './employee-details';
|
|
16
16
|
import { AbstractModel } from '../abstract-model';
|
|
17
|
+
import { SoleDetails } from '../sole/sole-details';
|
|
17
18
|
export declare class User extends AbstractModel {
|
|
18
19
|
id?: number;
|
|
19
20
|
intercomId?: number;
|
|
@@ -49,4 +50,5 @@ export declare class User extends AbstractModel {
|
|
|
49
50
|
clientMovements?: ClientMovement[];
|
|
50
51
|
clientDetails?: ClientDetails;
|
|
51
52
|
employeeDetails?: EmployeeDetails;
|
|
53
|
+
soleDetails?: SoleDetails;
|
|
52
54
|
}
|
package/lib/forms/index.d.ts
CHANGED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ChartAccountsCategoryEnum } from '../../db/Enums/chart-accounts-category.enum';
|
|
2
|
+
/**
|
|
3
|
+
* @TODO Vik: we want to use enums from backend instead of declared types
|
|
4
|
+
*/
|
|
5
|
+
export declare type ChartAccountsType = 'income' | 'expense' | 'depreciation' | 'capital works';
|
|
6
|
+
export declare type ChartAccountsTankType = 'property' | 'work' | 'sole' | 'personal' | 'other';
|
|
7
|
+
/**
|
|
8
|
+
* @TODO Alex/Vik: think and create some new collection type
|
|
9
|
+
* @TODO Alex: research all constants and make the same structure
|
|
10
|
+
*/
|
|
11
|
+
export declare class ChartAccountsCategoryECollection {
|
|
12
|
+
items: ChartAccountsCategoryEnum[];
|
|
13
|
+
constructor(items?: ChartAccountsCategoryEnum[]);
|
|
14
|
+
getByType(types: ChartAccountsType | ChartAccountsType[]): ChartAccountsCategoryECollection;
|
|
15
|
+
getByTankType(tankTypes: ChartAccountsTankType | ChartAccountsTankType[]): ChartAccountsCategoryECollection;
|
|
16
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sole';
|
|
@@ -35,7 +35,7 @@ export declare class Property extends PropertyBase implements Photoable, Documen
|
|
|
35
35
|
/**
|
|
36
36
|
* Get initials of property. Required by Photoable interface
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
getPhotoPlaceholder(): string;
|
|
39
39
|
/**
|
|
40
40
|
* Get property photo. Required by Photoable interface
|
|
41
41
|
*/
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RegistrationInvite as RegistrationInviteBase } from '../../db/Models/user/registration-invite';
|
|
2
2
|
import { Photoable } from '../../interfaces/photoable';
|
|
3
3
|
export declare class RegistrationInvite extends RegistrationInviteBase implements Photoable {
|
|
4
|
-
|
|
4
|
+
getPhotoPlaceholder(): string;
|
|
5
5
|
getPhoto(): string;
|
|
6
6
|
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './sole-business';
|
|
2
|
+
export * from './sole-business-allocation';
|
|
3
|
+
export * from './sole-business-loss';
|
|
4
|
+
export * from './sole-contact';
|
|
5
|
+
export * from './sole-details';
|
|
6
|
+
export * from './sole-invoice';
|
|
7
|
+
export * from './sole-invoice-item';
|
|
8
|
+
export * from './sole-invoice-template';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SoleBusinessAllocation as SoleBusinessAllocationBase } from '../../db/Models/sole/sole-business-allocation';
|
|
2
|
+
import { BankAccount } from '../bank/bank-account';
|
|
3
|
+
import { SoleBusiness } from './sole-business';
|
|
4
|
+
export declare class SoleBusinessAllocation extends SoleBusinessAllocationBase {
|
|
5
|
+
bankAccount: BankAccount;
|
|
6
|
+
business: SoleBusiness;
|
|
7
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { SoleBusiness as SoleBusinessBase } from '../../db/Models/sole/sole-business';
|
|
2
|
+
import { User } from '../user/user';
|
|
3
|
+
import { SoleBusinessAllocation } from './sole-business-allocation';
|
|
4
|
+
import { SoleBusinessLoss } from './sole-business-loss';
|
|
5
|
+
import { SoleInvoice } from './sole-invoice';
|
|
6
|
+
import { SoleInvoiceTemplate } from './sole-invoice-template';
|
|
7
|
+
import { VehicleClaim } from '../logbook/vehicle-claim';
|
|
8
|
+
import { Depreciation } from '../depreciation/depreciation';
|
|
9
|
+
import { Transaction } from '../transaction/transaction';
|
|
10
|
+
import { Photoable } from '../../interfaces/photoable';
|
|
11
|
+
export declare class SoleBusiness extends SoleBusinessBase implements Photoable {
|
|
12
|
+
user: User;
|
|
13
|
+
allocations: SoleBusinessAllocation[];
|
|
14
|
+
losses: SoleBusinessLoss[];
|
|
15
|
+
invoices: SoleInvoice[];
|
|
16
|
+
invoiceTemplates: SoleInvoiceTemplate[];
|
|
17
|
+
vehicleClaims: VehicleClaim[];
|
|
18
|
+
transactions: Transaction[];
|
|
19
|
+
depreciations: Depreciation[];
|
|
20
|
+
getPhotoPlaceholder(): string;
|
|
21
|
+
getPhoto(): string;
|
|
22
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SoleContact as SoleContactBase } from '../../db/Models/sole/sole-contact';
|
|
2
|
+
import { User } from '../user/user';
|
|
3
|
+
import { Address } from '../address/address';
|
|
4
|
+
import { Phone } from '../phone/phone';
|
|
5
|
+
import { SoleInvoice } from './sole-invoice';
|
|
6
|
+
import { Photoable } from '../../interfaces/photoable';
|
|
7
|
+
export declare class SoleContact extends SoleContactBase implements Photoable {
|
|
8
|
+
user: User;
|
|
9
|
+
phone: Phone;
|
|
10
|
+
address: Address;
|
|
11
|
+
invoices: SoleInvoice[];
|
|
12
|
+
get fullName(): string;
|
|
13
|
+
getPhotoPlaceholder(): string;
|
|
14
|
+
getPhoto(): string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SoleInvoiceItem as SoleInvoiceItemBase } from '../../db/Models/sole/sole-invoice-item';
|
|
2
|
+
import { SoleInvoice } from './sole-invoice';
|
|
3
|
+
import { ChartAccounts } from '../chart-accounts/chart-accounts';
|
|
4
|
+
export declare class SoleInvoiceItem extends SoleInvoiceItemBase {
|
|
5
|
+
invoice: SoleInvoice;
|
|
6
|
+
chartAccounts: ChartAccounts;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SoleBusiness } from './sole-business';
|
|
2
|
+
import { BankAccount } from '../bank/bank-account';
|
|
3
|
+
import { SoleInvoiceTemplate as SoleInvoiceTemplateBase } from '../../db/Models/sole/sole-invoice-template';
|
|
4
|
+
export declare class SoleInvoiceTemplate extends SoleInvoiceTemplateBase {
|
|
5
|
+
business: SoleBusiness;
|
|
6
|
+
bankAccount: BankAccount;
|
|
7
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { SoleInvoice as SoleInvoiceBase } from '../../db/Models/sole/sole-invoice';
|
|
2
|
+
import { User } from '../user/user';
|
|
3
|
+
import { SoleBusiness } from './sole-business';
|
|
4
|
+
import { SoleInvoiceItem } from './sole-invoice-item';
|
|
5
|
+
import { SoleContact } from './sole-contact';
|
|
6
|
+
import { SoleInvoiceTemplate } from './sole-invoice-template';
|
|
7
|
+
export declare class SoleInvoice extends SoleInvoiceBase {
|
|
8
|
+
dateFrom: Date;
|
|
9
|
+
dateTo: Date;
|
|
10
|
+
user: User;
|
|
11
|
+
business: SoleBusiness;
|
|
12
|
+
items: SoleInvoiceItem[];
|
|
13
|
+
payer: SoleContact;
|
|
14
|
+
template: SoleInvoiceTemplate;
|
|
15
|
+
}
|
|
@@ -7,10 +7,12 @@ import { Phone } from '../phone/phone';
|
|
|
7
7
|
import { ServiceSubscription } from '../service-subscription/service-subscription';
|
|
8
8
|
import { ServiceSubscriptionItem } from '../service-subscription/service-subscription-item';
|
|
9
9
|
import { Photoable } from '../../interfaces/photoable';
|
|
10
|
+
import { SoleDetails } from '../sole';
|
|
10
11
|
export declare class User extends BaseUser implements Photoable {
|
|
11
12
|
subscriptions: ServiceSubscription[];
|
|
12
13
|
clientDetails: ClientDetails;
|
|
13
14
|
employeeDetails: EmployeeDetails;
|
|
15
|
+
soleDetails: SoleDetails;
|
|
14
16
|
address: Address;
|
|
15
17
|
phone: Phone;
|
|
16
18
|
createdAt: Date;
|
|
@@ -60,5 +62,5 @@ export declare class User extends BaseUser implements Photoable {
|
|
|
60
62
|
/**
|
|
61
63
|
* get user's initials
|
|
62
64
|
*/
|
|
63
|
-
|
|
65
|
+
getPhotoPlaceholder(): string;
|
|
64
66
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './sole';
|
|
@@ -9,8 +9,11 @@ import * as i0 from "@angular/core";
|
|
|
9
9
|
* and describe abstract methods/properties that have to be implemented in child services
|
|
10
10
|
* Model - entity service is working with
|
|
11
11
|
* BaseModel - base entity model that extends by Model
|
|
12
|
-
* @TODO Alex: refactor all services for work with collections instead of arrays
|
|
13
|
-
* @TODO Alex: implement smart system of default toast messages
|
|
12
|
+
* @TODO TT-1777 Alex: refactor all services for work with collections instead of arrays
|
|
13
|
+
* @TODO TT-1777 Alex: implement smart system of default toast messages
|
|
14
|
+
* @TODO TT-1777 Alex: work not only with array/collection but with single objects
|
|
15
|
+
* @TODO TT-1777 Alex: automatic events generation (eventDispatcher)
|
|
16
|
+
* @TODO TT-1777 Alex: optional rest methods (not all services have all 4 methods)
|
|
14
17
|
*/
|
|
15
18
|
export declare abstract class RestService<BaseModel, Model extends BaseModel> implements IEventListener {
|
|
16
19
|
protected http: HttpClient;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RestService } from '../../rest/rest.service';
|
|
2
|
+
import { SoleBusiness as SoleBusinessBase } from '../../../../db/Models/sole/sole-business';
|
|
3
|
+
import { SoleBusiness } from '../../../../models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SoleBusinessService extends RestService<SoleBusinessBase, SoleBusiness> {
|
|
6
|
+
modelClass: typeof SoleBusiness;
|
|
7
|
+
url: string;
|
|
8
|
+
isHydra: boolean;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SoleBusinessService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SoleBusinessService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { RestService } from '../../rest/rest.service';
|
|
2
|
+
import { SoleContact as SoleContactBase } from '../../../../db/Models/sole/sole-contact';
|
|
3
|
+
import { SoleContact } from '../../../../models';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class SoleContactService extends RestService<SoleContactBase, SoleContact> {
|
|
6
|
+
modelClass: typeof SoleContact;
|
|
7
|
+
url: string;
|
|
8
|
+
isHydra: boolean;
|
|
9
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SoleContactService, never>;
|
|
10
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SoleContactService>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SoleDetails } from '../../../../models';
|
|
2
|
+
import { Observable, ReplaySubject } from 'rxjs';
|
|
3
|
+
import { HttpClient } from '@angular/common/http';
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
/**
|
|
6
|
+
* @TODO TT-1777 Alex: extend from rest service when it refactored
|
|
7
|
+
*/
|
|
8
|
+
export declare class SoleDetailsService {
|
|
9
|
+
private http;
|
|
10
|
+
protected environment: any;
|
|
11
|
+
cache: SoleDetails;
|
|
12
|
+
cacheSubject: ReplaySubject<SoleDetails>;
|
|
13
|
+
constructor(http: HttpClient, environment: any);
|
|
14
|
+
get(): Observable<SoleDetails>;
|
|
15
|
+
add(soleDetails: SoleDetails): Observable<SoleDetails>;
|
|
16
|
+
update(soleDetails: SoleDetails): Observable<SoleDetails>;
|
|
17
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<SoleDetailsService, never>;
|
|
18
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<SoleDetailsService>;
|
|
19
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './http';
|
package/package.json
CHANGED
package/public-api.d.ts
CHANGED
|
@@ -44,6 +44,7 @@ export * from './lib/collections/exportable.collection';
|
|
|
44
44
|
*/
|
|
45
45
|
export * from './lib/db/Models/abstract-model';
|
|
46
46
|
export * from './lib/db/Models/transaction/transaction-base';
|
|
47
|
+
export * from './lib/models/chart-accounts/chart-accounts-category.e-collection';
|
|
47
48
|
/**
|
|
48
49
|
* DB enums
|
|
49
50
|
*/
|
|
@@ -137,6 +138,7 @@ export * from './lib/db/Enums/property/property-sale/tax-exemption-metadata.enum
|
|
|
137
138
|
/**
|
|
138
139
|
* Models and related enums and consts
|
|
139
140
|
*/
|
|
141
|
+
export * from './lib/models';
|
|
140
142
|
export * from './lib/models/account-setup/account-setup-item';
|
|
141
143
|
export * from './lib/models/address/address';
|
|
142
144
|
export * from './lib/models/address/country';
|
|
@@ -162,6 +164,7 @@ export * from './lib/models/chart/chart-data';
|
|
|
162
164
|
export * from './lib/models/chart/chart-serie';
|
|
163
165
|
export * from './lib/models/chart-accounts/chart-accounts';
|
|
164
166
|
export * from './lib/models/chart-accounts/chart-accounts-categories.const';
|
|
167
|
+
export * from './lib/models/chart-accounts/chart-accounts-category.e-collection';
|
|
165
168
|
export * from './lib/models/chart-accounts/chart-accounts-depreciation';
|
|
166
169
|
export * from './lib/models/chart-accounts/chart-accounts-heading';
|
|
167
170
|
export * from './lib/models/chart-accounts/chart-accounts-metadata';
|
|
@@ -293,6 +296,7 @@ export * from './lib/models/user-event/user-event-type';
|
|
|
293
296
|
/**
|
|
294
297
|
* Services
|
|
295
298
|
*/
|
|
299
|
+
export * from './lib/services';
|
|
296
300
|
export * from './lib/services/account-setup/account-setup.service';
|
|
297
301
|
export * from './lib/services/http/address/address.service';
|
|
298
302
|
export * from './lib/services/asset/assets.service';
|