portal-www
Version:
Nova Portal Website. Based on Next starter by Ueno
42 lines (36 loc) • 1.06 kB
text/typescript
import { observable, makeObservable } from 'mobx';
import { IClaim, IInvoice } from 'typings';
export default class Claim {
constructor(state: IClaim) {
this.claimNumber = state.claimNumber;
this.dueDate = state.dueDate;
this.finalDueDate = state.finalDueDate;
this.updated = state.updated;
this.amount = state.amount;
this.initialAmount = state.initialAmount;
this.penalty = state.penalty;
this.defaultCharges = state.defaultCharges;
this.otherCharges = state.otherCharges;
this.motusCharge = state.motusCharge;
this.totalCharge = state.totalCharge;
this.invoices = state.invoices;
makeObservable(this, {
selected: observable,
showMoreInvoices: observable,
});
}
claimNumber: string;
dueDate: Date;
finalDueDate: Date;
updated: Date;
amount: number;
initialAmount: number;
penalty: number;
defaultCharges: number;
otherCharges: number;
motusCharge: number;
totalCharge: number;
invoices: Array<IInvoice>;
selected = false;
showMoreInvoices = false;
}