taxtank-core 0.6.0 → 0.7.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.
@@ -12778,6 +12778,104 @@
12778
12778
  data.employee.fullName.toLowerCase().includes(filter);
12779
12779
  }
12780
12780
 
12781
+ var AbstractForm = /** @class */ (function (_super) {
12782
+ __extends(AbstractForm, _super);
12783
+ function AbstractForm() {
12784
+ return _super !== null && _super.apply(this, arguments) || this;
12785
+ }
12786
+ AbstractForm.prototype.submit = function () {
12787
+ this.markAllAsTouched();
12788
+ if (!this.valid) {
12789
+ return null;
12790
+ }
12791
+ return this.value;
12792
+ };
12793
+ return AbstractForm;
12794
+ }(forms.FormGroup));
12795
+
12796
+ var LoginForm = /** @class */ (function (_super) {
12797
+ __extends(LoginForm, _super);
12798
+ function LoginForm() {
12799
+ return _super.call(this, {
12800
+ email: new forms.FormControl(null, [forms.Validators.required, forms.Validators.email]),
12801
+ password: new forms.FormControl(null, forms.Validators.required)
12802
+ }) || this;
12803
+ }
12804
+ return LoginForm;
12805
+ }(AbstractForm));
12806
+
12807
+ var PasswordForm = /** @class */ (function (_super) {
12808
+ __extends(PasswordForm, _super);
12809
+ function PasswordForm() {
12810
+ return _super.call(this, {
12811
+ password: new forms.FormControl('', forms.Validators.required),
12812
+ confirm: new forms.FormControl('', forms.Validators.required),
12813
+ }) || this;
12814
+ }
12815
+ return PasswordForm;
12816
+ }(AbstractForm));
12817
+
12818
+ var RegisterClientForm = /** @class */ (function (_super) {
12819
+ __extends(RegisterClientForm, _super);
12820
+ function RegisterClientForm(referenceCode) {
12821
+ return _super.call(this, {
12822
+ firstName: new forms.FormControl('', [forms.Validators.required]),
12823
+ lastName: new forms.FormControl('', [forms.Validators.required]),
12824
+ email: new forms.FormControl('', [forms.Validators.required, forms.Validators.email]),
12825
+ password: new PasswordForm(),
12826
+ acceptTerms: new forms.FormControl(false, [forms.Validators.requiredTrue]),
12827
+ referenceCode: new forms.FormControl(referenceCode)
12828
+ }) || this;
12829
+ }
12830
+ RegisterClientForm.prototype.submit = function () {
12831
+ this.markAllAsTouched();
12832
+ if (!this.valid) {
12833
+ return null;
12834
+ }
12835
+ return {
12836
+ firstName: this.value.firstName,
12837
+ lastName: this.value.lastName,
12838
+ email: this.value.email,
12839
+ password: this.value.password.password,
12840
+ referenceCode: this.value.referenceCode
12841
+ };
12842
+ };
12843
+ return RegisterClientForm;
12844
+ }(AbstractForm));
12845
+
12846
+ var RegisterFirmForm = /** @class */ (function (_super) {
12847
+ __extends(RegisterFirmForm, _super);
12848
+ function RegisterFirmForm(firmType, referenceCode) {
12849
+ var _this = _super.call(this, {
12850
+ name: new forms.FormControl('', forms.Validators.required),
12851
+ abn: new forms.FormControl('', forms.Validators.required),
12852
+ tan: new forms.FormControl({ value: '', disabled: firmType !== exports.FirmTypeEnum.ACCOUNTANT }, forms.Validators.required),
12853
+ owner: new RegisterClientForm(referenceCode),
12854
+ type: new forms.FormControl(firmType)
12855
+ }) || this;
12856
+ _this.firmType = firmType;
12857
+ return _this;
12858
+ }
12859
+ RegisterFirmForm.prototype.submit = function () {
12860
+ this.markAllAsTouched();
12861
+ if (!this.valid) {
12862
+ return null;
12863
+ }
12864
+ return classTransformer.plainToClass(Firm, Object.assign({}, this.value, { owner: this.get('owner').submit() }));
12865
+ };
12866
+ return RegisterFirmForm;
12867
+ }(AbstractForm));
12868
+
12869
+ var ResetPasswordForm = /** @class */ (function (_super) {
12870
+ __extends(ResetPasswordForm, _super);
12871
+ function ResetPasswordForm() {
12872
+ return _super.call(this, {
12873
+ email: new forms.FormControl(null, [forms.Validators.required, forms.Validators.email]),
12874
+ }) || this;
12875
+ }
12876
+ return ResetPasswordForm;
12877
+ }(AbstractForm));
12878
+
12781
12879
  /**
12782
12880
  * Public API Surface of tt-core
12783
12881
  */
@@ -12786,6 +12884,7 @@
12786
12884
  * Generated bundle index. Do not edit.
12787
12885
  */
12788
12886
 
12887
+ exports.AbstractForm = AbstractForm;
12789
12888
  exports.Address = Address;
12790
12889
  exports.AddressService = AddressService;
12791
12890
  exports.AppEvent = AppEvent;
@@ -12891,6 +12990,7 @@
12891
12990
  exports.LoanService = LoanService;
12892
12991
  exports.LogbookCollection = LogbookCollection;
12893
12992
  exports.LogbookPeriod = LogbookPeriod;
12993
+ exports.LoginForm = LoginForm;
12894
12994
  exports.MODULE_URL_LIST = MODULE_URL_LIST;
12895
12995
  exports.MONTHS = MONTHS;
12896
12996
  exports.Message = Message;
@@ -12904,6 +13004,7 @@
12904
13004
  exports.NotificationService = NotificationService;
12905
13005
  exports.Occupation = Occupation;
12906
13006
  exports.OccupationService = OccupationService;
13007
+ exports.PasswordForm = PasswordForm;
12907
13008
  exports.PdfService = PdfService;
12908
13009
  exports.Phone = Phone;
12909
13010
  exports.PreloaderService = PreloaderService;
@@ -12927,7 +13028,10 @@
12927
13028
  exports.PropertyService = PropertyService;
12928
13029
  exports.PropertySubscription = PropertySubscription;
12929
13030
  exports.PropertyValuation = PropertyValuation;
13031
+ exports.RegisterClientForm = RegisterClientForm;
13032
+ exports.RegisterFirmForm = RegisterFirmForm;
12930
13033
  exports.RegistrationInvite = RegistrationInvite;
13034
+ exports.ResetPasswordForm = ResetPasswordForm;
12931
13035
  exports.SUBSCRIPTION_DESCRIPTION = SUBSCRIPTION_DESCRIPTION;
12932
13036
  exports.SUBSCRIPTION_TITLE = SUBSCRIPTION_TITLE;
12933
13037
  exports.SalaryForecast = SalaryForecast;