Skip to content

Added charge code and activities field in resubmitted case #375

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
72 changes: 61 additions & 11 deletions src/angular/hq/src/app/psr/psrtime-list/psrtime-list.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,15 +178,6 @@
>
}
</hq-select-input>
<!-- <select
[(ngModel)]="time.chargeCode"
(change)="updateChargeCode(time.id)"
class="w-[100%] px-2 focus:outline-none hover:cursor-pointer font-medium row-start-1 col-start-1 border border-steel-blue-600 text-gray-100 bg-blue-900 rounded h-[30px]"
>
<option *ngFor="let c of chargeCodes" [ngValue]="c.code">
{{ c.code }}: {{ c.projectName }}
</option>
</select> -->
}
</td>
<td class="border-b border-black py-2 px-2">
Expand Down Expand Up @@ -521,13 +512,72 @@
{{ time.date }}
</td>
<td class="border-b border-black py-2 px-2">
{{ time.chargeCode }}
@if (chargeCodes$ | async; as chargeCodes) {
<hq-select-input
(hqBlur)="updateChargeCode(time.id)"
[autocomplete]="true"
variant="pill"
[inline]="true"
[(ngModel)]="time.chargeCode"
>
<ng-template [hqSelectInputOption]="null"
>Chrge</ng-template
>
@for (code of chargeCodes; track code.id) {
<ng-template
[hqSelectInputOption]="code.code"
[hqSelectInputOptionSelectedDisplay]="code.code"
[hqSelectInputOptionSearch]="
code.code +
': ' +
code.clientName +
': ' +
code.projectName
"
>{{
code.code +
": " +
code.clientName +
": " +
code.projectName
}}</ng-template
>
}
</hq-select-input>
}
</td>
<td class="border-b border-black py-2 px-2">
{{ time.staffName }}
</td>
<td class="border-b border-black py-2 px-2">
{{ time.activityName || time.task || "None" }}
@if (projectActivities$ | async; as projectActivities) {
@if (projectActivities.length > 0) {
<select
[(ngModel)]="time.activityId"
(change)="updateProjectActivity(time.id)"
class="w-[100%] px-2 focus:outline-none hover:cursor-pointer font-medium row-start-1 col-start-1 border border-steel-blue-600 text-gray-100 bg-blue-900 rounded h-[30px]"
>
<option [ngValue]="null">Select Activity</option>
@for (activity of projectActivities; track $index) {
<option [ngValue]="activity.id">
{{ activity.name }}
</option>
}
</select>
} @else {
<input
class="w-full bg-blue-900 border border-black rounded py-1 px-2 mr-2"
[value]="time.task"
(change)="updateTask(time.id, $event)"
/>
}
} @else {
<input
class="w-full bg-blue-900 border border-black rounded py-1 px-2 mr-2"
[value]="time.task"
(change)="updateTask(time.id, $event)"
/>
}
</td>
<td class="border-b border-black py-2 px-2 w-full">
<input
Expand Down