Fix user and poster not showing in vouchers
This commit is contained in:
@@ -134,9 +134,9 @@
|
||||
<span class="flex">
|
||||
Created on <strong>{{ form.creationDate().value() | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ form.lastEditDate().value() | localTime }}</strong
|
||||
> by <strong>{{ form.userName() }}</strong
|
||||
> by <strong>{{ form.userName().value().name }}</strong
|
||||
>.
|
||||
{{ form.posted() ? 'Posted by ' + form.poster() : '' }}
|
||||
{{ form.posted().value() ? 'Posted by ' + form.poster().value() : '' }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -58,7 +58,7 @@ export interface IssueFormModel {
|
||||
posted: boolean;
|
||||
creationDate: string;
|
||||
lastEditDate: string;
|
||||
userName: string;
|
||||
userName: User;
|
||||
poster: string;
|
||||
}
|
||||
|
||||
@@ -139,7 +139,7 @@ export class IssueComponent {
|
||||
posted: voucher.posted,
|
||||
creationDate: voucher.creationDate,
|
||||
lastEditDate: voucher.lastEditDate,
|
||||
userName: voucher.user?.name ?? '',
|
||||
userName: voucher.user ?? new User(),
|
||||
poster: voucher.poster ?? '',
|
||||
};
|
||||
},
|
||||
|
||||
@@ -174,8 +174,8 @@
|
||||
<span class="flex">
|
||||
Created on <strong>{{ form.creationDate().value() | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ form.lastEditDate().value() | localTime }}</strong
|
||||
> by <strong>{{ form.userName() }}</strong
|
||||
>. {{ form.posted() ? 'Posted by ' + form.poster() : '' }}
|
||||
> by <strong>{{ form.userName().value().name }}</strong
|
||||
>. {{ form.posted().value() ? 'Posted by ' + form.poster().value() : '' }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -26,6 +26,7 @@ import { AccountService } from '../core/account.service';
|
||||
import { CostCentre } from '../core/cost-centre';
|
||||
import { DbFile } from '../core/db-file';
|
||||
import { Journal } from '../core/journal';
|
||||
import { User } from '../core/user';
|
||||
import { Voucher } from '../core/voucher';
|
||||
import { VoucherService } from '../core/voucher.service';
|
||||
import { AccountingPipe } from '../shared/accounting.pipe';
|
||||
@@ -64,7 +65,7 @@ export interface JournalFormModel {
|
||||
posted: boolean;
|
||||
creationDate: string;
|
||||
lastEditDate: string;
|
||||
userName: string;
|
||||
userName: User;
|
||||
poster: string;
|
||||
}
|
||||
|
||||
@@ -194,7 +195,7 @@ export class JournalComponent {
|
||||
posted: voucher.posted,
|
||||
creationDate: voucher.creationDate,
|
||||
lastEditDate: voucher.lastEditDate,
|
||||
userName: voucher.user?.name ?? '',
|
||||
userName: voucher.user ?? new User(),
|
||||
poster: voucher.poster,
|
||||
}),
|
||||
});
|
||||
|
||||
@@ -182,9 +182,9 @@
|
||||
<span class="flex">
|
||||
Created on <strong>{{ form.creationDate().value() | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ form.lastEditDate().value() | localTime }}</strong
|
||||
> by <strong>{{ form.userName() }}</strong
|
||||
> by <strong>{{ form.userName().value().name }}</strong
|
||||
>.
|
||||
{{ form.posted() ? 'Posted by ' + form.poster() : '' }}
|
||||
{{ form.posted().value() ? 'Posted by ' + form.poster().value() : '' }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -65,7 +65,7 @@ export interface PaymentFormModel {
|
||||
posted: boolean;
|
||||
creationDate: string;
|
||||
lastEditDate: string;
|
||||
userName: string;
|
||||
userName: User;
|
||||
poster: string;
|
||||
}
|
||||
|
||||
@@ -153,7 +153,7 @@ export class PaymentComponent {
|
||||
posted: voucher.posted,
|
||||
creationDate: voucher.creationDate,
|
||||
lastEditDate: voucher.lastEditDate,
|
||||
userName: voucher.user?.name ?? '',
|
||||
userName: voucher.user ?? new User(),
|
||||
poster: voucher.poster ?? '',
|
||||
};
|
||||
},
|
||||
|
||||
@@ -207,9 +207,9 @@
|
||||
<span class="flex">
|
||||
Created on <strong>{{ form.creationDate().value() | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ form.lastEditDate().value() | localTime }}</strong
|
||||
> by <strong>{{ form.userName() }}</strong
|
||||
> by <strong>{{ form.userName().value().name }}</strong
|
||||
>.
|
||||
{{ form.posted() ? 'Posted by ' + form.poster() : '' }}
|
||||
{{ form.posted().value() ? 'Posted by ' + form.poster().value() : '' }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -68,7 +68,7 @@ export interface PurchaseReturnFormModel {
|
||||
posted: boolean;
|
||||
creationDate: string;
|
||||
lastEditDate: string;
|
||||
userName: string;
|
||||
userName: User;
|
||||
poster: string;
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ export class PurchaseReturnComponent {
|
||||
posted: voucher.posted,
|
||||
creationDate: voucher.creationDate,
|
||||
lastEditDate: voucher.lastEditDate,
|
||||
userName: voucher.user?.name ?? '',
|
||||
userName: voucher.user ?? null,
|
||||
poster: voucher.poster ?? '',
|
||||
};
|
||||
},
|
||||
|
||||
@@ -227,9 +227,9 @@
|
||||
<span class="flex">
|
||||
Created on <strong>{{ form.creationDate().value() | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ form.lastEditDate().value() | localTime }}</strong
|
||||
> by <strong>{{ form.userName() }}</strong
|
||||
> by <strong>{{ form.userName().value().name }}</strong
|
||||
>.
|
||||
{{ form.posted() ? 'Posted by ' + form.poster() : '' }}
|
||||
{{ form.posted().value() ? 'Posted by ' + form.poster().value() : '' }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -73,7 +73,7 @@ export interface PurchaseFormModel {
|
||||
posted: boolean;
|
||||
creationDate: string;
|
||||
lastEditDate: string;
|
||||
userName: string;
|
||||
userName: User;
|
||||
poster: string;
|
||||
}
|
||||
|
||||
@@ -165,7 +165,7 @@ export class PurchaseComponent {
|
||||
posted: voucher.posted,
|
||||
creationDate: voucher.creationDate,
|
||||
lastEditDate: voucher.lastEditDate,
|
||||
userName: voucher.user?.name ?? '',
|
||||
userName: voucher.user ?? null,
|
||||
poster: voucher.poster ?? '',
|
||||
};
|
||||
},
|
||||
|
||||
@@ -177,8 +177,8 @@
|
||||
<span class="flex">
|
||||
Created on <strong>{{ form.creationDate().value() | localTime }}</strong
|
||||
> and Last Edited on <strong>{{ form.lastEditDate().value() | localTime }}</strong
|
||||
> by <strong>{{ form.userName() }}</strong
|
||||
>. {{ form.posted() ? 'Posted by ' + form.poster() : '' }}
|
||||
> by <strong>{{ form.userName().value().name }}</strong
|
||||
>. {{ form.posted().value() ? 'Posted by ' + form.poster().value() : '' }}
|
||||
</span>
|
||||
}
|
||||
</div>
|
||||
|
||||
@@ -65,7 +65,7 @@ export interface ReceiptFormModel {
|
||||
posted: boolean;
|
||||
creationDate: string;
|
||||
lastEditDate: string;
|
||||
userName: string;
|
||||
userName: User;
|
||||
poster: string;
|
||||
}
|
||||
|
||||
@@ -155,7 +155,7 @@ export class ReceiptComponent {
|
||||
posted: voucher.posted,
|
||||
creationDate: voucher.creationDate,
|
||||
lastEditDate: voucher.lastEditDate,
|
||||
userName: voucher.user?.name ?? '',
|
||||
userName: voucher.user ?? null,
|
||||
poster: voucher.poster ?? '',
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user