|
@@ -78,7 +78,7 @@ export class PersonPageComponent implements OnInit {
|
|
showCreditDialog(account: AccountInfo) {
|
|
showCreditDialog(account: AccountInfo) {
|
|
this.personService.getCurrentPerson().subscribe(person => {
|
|
this.personService.getCurrentPerson().subscribe(person => {
|
|
let ref = this.matDialog.open(PersonCreditDialogComponent, {
|
|
let ref = this.matDialog.open(PersonCreditDialogComponent, {
|
|
- width: '480px', height: '640px', data: <PersonCreditData>{
|
|
|
|
|
|
+ width: '480px', height: '400px', data: <PersonCreditData>{
|
|
accounts: this.accounts,
|
|
accounts: this.accounts,
|
|
account: account,
|
|
account: account,
|
|
personId: person.auth.id
|
|
personId: person.auth.id
|
|
@@ -123,25 +123,6 @@ export class PersonDebitDialogComponent {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
-abstract class PersonAccountData {
|
|
|
|
- account: AccountInfo
|
|
|
|
- accounts: AccountInfo[]
|
|
|
|
- personId: string
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-export class PersonCreditData extends PersonAccountData {
|
|
|
|
- code: string
|
|
|
|
- amount: number
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
-export class PersonDebitData extends PersonAccountData {
|
|
|
|
- amount: number
|
|
|
|
- time: number
|
|
|
|
- once: boolean
|
|
|
|
- limited: boolean
|
|
|
|
- code: string
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
@Component({
|
|
@Component({
|
|
selector: 'person-credit-dialog',
|
|
selector: 'person-credit-dialog',
|
|
templateUrl: 'person.credit.dialog.component.html',
|
|
templateUrl: 'person.credit.dialog.component.html',
|
|
@@ -187,3 +168,23 @@ export class PersonCreditDialogComponent {
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+abstract class PersonAccountData {
|
|
|
|
+ account: AccountInfo
|
|
|
|
+ accounts: AccountInfo[]
|
|
|
|
+ personId: string
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class PersonCreditData extends PersonAccountData {
|
|
|
|
+ code: string
|
|
|
|
+ amount: number
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+export class PersonDebitData extends PersonAccountData {
|
|
|
|
+ amount: number
|
|
|
|
+ time: number
|
|
|
|
+ once: boolean
|
|
|
|
+ limited: boolean
|
|
|
|
+ code: string
|
|
|
|
+}
|