Remove ng2-currency-mask
This was a cool feature but my wife didn't like it and it's been a huge headache every time I need to update my angular versions so it's time for it to go
This commit is contained in:
parent
037ade50c5
commit
27b5e80a2b
6 changed files with 6 additions and 39 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -42,3 +42,4 @@ Thumbs.db
|
|||
|
||||
# Firebase
|
||||
.firebase/
|
||||
.angular/
|
||||
|
|
21
package-lock.json
generated
21
package-lock.json
generated
|
@ -23,7 +23,6 @@
|
|||
"core-js": "^2.6.12",
|
||||
"dexie": "^2.0.4",
|
||||
"ng2-charts": "^2.4.2",
|
||||
"ng2-currency-mask": "^11.0.0",
|
||||
"rxjs": "^6.6.3",
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.11.4"
|
||||
|
@ -10904,18 +10903,6 @@
|
|||
"rxjs": "^6.3.3"
|
||||
}
|
||||
},
|
||||
"node_modules/ng2-currency-mask": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ng2-currency-mask/-/ng2-currency-mask-11.0.0.tgz",
|
||||
"integrity": "sha512-+jSqTMP7eKISA+PUFEFYfi2zlpP/JuYcKrVxcD0gTIflBlbr8GoD3Iace/Z5/s0zZmSvPJk2eGQB0X05GAf1ug==",
|
||||
"dependencies": {
|
||||
"tslib": "^2.0.0"
|
||||
},
|
||||
"peerDependencies": {
|
||||
"@angular/common": "^11.2.8",
|
||||
"@angular/core": "^11.2.8"
|
||||
}
|
||||
},
|
||||
"node_modules/nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
|
@ -26725,14 +26712,6 @@
|
|||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"ng2-currency-mask": {
|
||||
"version": "11.0.0",
|
||||
"resolved": "https://registry.npmjs.org/ng2-currency-mask/-/ng2-currency-mask-11.0.0.tgz",
|
||||
"integrity": "sha512-+jSqTMP7eKISA+PUFEFYfi2zlpP/JuYcKrVxcD0gTIflBlbr8GoD3Iace/Z5/s0zZmSvPJk2eGQB0X05GAf1ug==",
|
||||
"requires": {
|
||||
"tslib": "^2.0.0"
|
||||
}
|
||||
},
|
||||
"nice-try": {
|
||||
"version": "1.0.5",
|
||||
"resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
|
||||
|
|
|
@ -29,7 +29,6 @@
|
|||
"core-js": "^2.6.12",
|
||||
"dexie": "^2.0.4",
|
||||
"ng2-charts": "^2.4.2",
|
||||
"ng2-currency-mask": "^11.0.0",
|
||||
"rxjs": "^6.6.3",
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.11.4"
|
||||
|
|
|
@ -38,7 +38,6 @@ import { NewBudgetComponent } from './budgets/new-budget/new-budget.component';
|
|||
import { BudgetDetailsComponent } from './budgets/budget-details/budget-details.component';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import { CurrencyMaskModule, CurrencyMaskConfig, CURRENCY_MASK_CONFIG } from 'ng2-currency-mask';
|
||||
import { ServiceWorkerModule } from '@angular/service-worker';
|
||||
import { CategoryBreakdownComponent } from './categories/category-breakdown/category-breakdown.component';
|
||||
import { ChartsModule } from 'ng2-charts';
|
||||
|
@ -50,16 +49,6 @@ import { TransactionListComponent } from './transactions/transaction-list/transa
|
|||
import { EditCategoryComponent } from './categories/edit-category/edit-category.component';
|
||||
import { EditBudgetComponent } from './budgets/edit-budget/edit-budget.component';
|
||||
|
||||
export const CustomCurrencyMaskConfig: CurrencyMaskConfig = {
|
||||
align: 'left',
|
||||
precision: 2,
|
||||
prefix: '',
|
||||
thousands: ',',
|
||||
decimal: '.',
|
||||
suffix: '',
|
||||
allowNegative: false,
|
||||
};
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
|
@ -104,13 +93,11 @@ export const CustomCurrencyMaskConfig: CurrencyMaskConfig = {
|
|||
FormsModule,
|
||||
ServiceWorkerModule.register('ngsw-worker.js', { enabled: environment.production }),
|
||||
HttpClientModule,
|
||||
CurrencyMaskModule,
|
||||
ChartsModule,
|
||||
MatCheckboxModule,
|
||||
MatCardModule,
|
||||
],
|
||||
providers: [
|
||||
{ provide: CURRENCY_MASK_CONFIG, useValue: CustomCurrencyMaskConfig },
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: AuthInterceptor, multi: true },
|
||||
{ provide: TWIGS_SERVICE, useClass: TwigsHttpService },
|
||||
{ provide: Storage, useValue: window.localStorage },
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
<textarea matInput [(ngModel)]="currentCategory.description" placeholder="Description"></textarea>
|
||||
</mat-form-field>
|
||||
<mat-form-field (keyup.enter)="doAction()">
|
||||
<input matInput type="text" [(ngModel)]="currentCategory.amount" placeholder="Amount" required currencyMask>
|
||||
<input matInput type="text" [(ngModel)]="currentCategory.amount" placeholder="Amount" required>
|
||||
</mat-form-field>
|
||||
<mat-radio-group [(ngModel)]="currentCategory.expense">
|
||||
<mat-radio-button [value]="true">Expense</mat-radio-button>
|
||||
|
|
|
@ -9,10 +9,11 @@
|
|||
<textarea matInput [(ngModel)]="currentTransaction.description" placeholder="Description"></textarea>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="text" [(ngModel)]="currentTransaction.amount" placeholder="Amount" required currencyMask>
|
||||
<input matInput type="text" [(ngModel)]="currentTransaction.amount" placeholder="Amount" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="date" [ngModel]="transactionDate | date:'yyyy-MM-dd'" (ngModelChange)="transactionDate = $event" placeholder="Date" required>
|
||||
<input matInput type="date" [ngModel]="transactionDate | date:'yyyy-MM-dd'"
|
||||
(ngModelChange)="transactionDate = $event" placeholder="Date" required>
|
||||
</mat-form-field>
|
||||
<mat-form-field>
|
||||
<input matInput type="time" [(ngModel)]="currentTime" placeholder="Time" required>
|
||||
|
@ -30,4 +31,4 @@
|
|||
</mat-form-field>
|
||||
<button mat-raised-button color="accent" (click)="save()">Save</button>
|
||||
<button class="button-delete" mat-raised-button color="warn" *ngIf="!create" (click)="delete()">Delete</button>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in a new issue