Skip to content

Commit

Permalink
added work_type params
Browse files Browse the repository at this point in the history
  • Loading branch information
liron58 committed Apr 26, 2021
1 parent ab268e7 commit 9e3f59f
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 23 deletions.
18 changes: 8 additions & 10 deletions cloudapp/src/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ export class Constants {
"The circulation desk where the action is being performed. Send either this parameter or the department parameter. The circulation desk code should be entered";
departmentTip =
"The department where the action is being performed. Send either this parameter or the circulation desk parameter. The department code should be entered";
workOrderTip =
statusTip = "The work order status to which we want to move the item.";
doneTip = "Work order processing is completed on the item.";
autoPrintSlipTip = "Automatically print a slip.";
placeOnHoldShelfTip = "Place on hold shelf.";
confirmTip = "Confirm the action on the item.";
registerInHouseUseTip = "Register in house uses.";
externalIdTip = "External ID.";
workOrderTypeTip =
"The work order type which is to be performed, or is being performed on the scanned in item.";
statusTip =
"The work order status to which we want to move the item. Optional input is defined by the work order type.";
doneTip =
"Work order processing is completed on the item. Options: true or false. Only relevant when department parameter is sent.";
autoPrintSlipTip = "Automatically print a slip. Options: true or false.";
placeOnHoldShelfTip = "Place on hold shelf. Options: true or false.";
confirmTip = "Confirm the action on the item. Options: true or false.";
registerInHouseUseTip = "Register in house uses. Options: true or false.";
externalIdTip= "External ID. Options: true or false.";
}
8 changes: 7 additions & 1 deletion cloudapp/src/app/models/configuration.model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,14 @@ export class Configuration {
auto_print_slip: false,
register_in_house_use: true,
external_id: false,
work_order_type: "",
status: "",
done: false,
};
from: { circ_desk?: string; department?: string } = {
circ_desk: "",
department: "",
};
from: { circ_desk?: string; department?: string } = { circ_desk: "", department: "" };

departmentArgs: { done: boolean } = { done: false };
circArgs: { place_on_hold_shelf: boolean } = { place_on_hold_shelf: false };
Expand Down
68 changes: 56 additions & 12 deletions cloudapp/src/app/settings/settings.component.html
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@

<ng-template #loading_spinner>
<div class="loading-shade">
<mat-progress-spinner mode="indeterminate" diameter="50"></mat-progress-spinner>
<mat-progress-spinner
mode="indeterminate"
diameter="50"
></mat-progress-spinner>
</div>
</ng-template>
<section>
<form (ngSubmit)="onSubmit(form)" #form="ngForm" *ngIf="!loading; else loading_spinner">
<form
(ngSubmit)="onSubmit(form)"
#form="ngForm"
*ngIf="!loading; else loading_spinner"
>
<div class="eca-actions">
<a [routerLink]="['']" style="float: right">
<button mat-flat-button color="secondary"><mat-icon>arrow_back</mat-icon>Back</button>
</a>
<button
<button mat-flat-button color="secondary">
<mat-icon>arrow_back</mat-icon>Back
</button>
</a>
<button
mat-flat-button
color="secondary"
type="button"
Expand All @@ -19,10 +27,16 @@
>
Restore Defaults
</button>
<button mat-flat-button color="primary" type="submit" [disabled]="!form.valid">Save</button>

<button
mat-flat-button
color="primary"
type="submit"
[disabled]="!form.valid"
>
Save
</button>
</div>

<h1>Settings</h1>
<mat-form-field>
<mat-label>Library</mat-label>
Expand All @@ -34,10 +48,14 @@ <h1>Settings</h1>
#library="ngModel"
[(ngModel)]="config.mustConfig.library"
>
<mat-option *ngFor="let lib of libraries" [value]="lib.code">{{ lib.name }}</mat-option>
<mat-option *ngFor="let lib of libraries" [value]="lib.code">{{
lib.name
}}</mat-option>
</mat-select>
</mat-form-field>
<span *ngIf="!library.valid && library.touched"><p>Please choose a library</p></span>
<span *ngIf="!library.valid && library.touched"
><p>Please choose a library</p></span
>
<div class="from" ngModelGroup="from" appFromvalidator #from="ngModelGroup">
<mat-form-field>
<mat-label>Circulation desk</mat-label>
Expand Down Expand Up @@ -65,8 +83,34 @@ <h1>Settings</h1>
</mat-form-field>
</div>
<span *ngIf="!from.valid && from.touched"
><p>Please choose either circulation desk or department, but not both.</p></span
><p>
Please choose either circulation desk or department, but not both.
</p></span
>
<mat-form-field>
<mat-label>Work order type</mat-label>
<input
matInput
type="text"
[matTooltip]="constants.workOrderTypeTip"
ngModel
name="work_order_type"
[(ngModel)]="config.mustConfig.work_order_type"
#work_order_type
/>
</mat-form-field>
<mat-form-field>
<mat-label>Status</mat-label>
<input
matInput
type="text"
[matTooltip]="constants.statusTip"
ngModel
name="status"
[(ngModel)]="config.mustConfig.status"
/>
</mat-form-field>

<mat-slide-toggle
name="auto_print_slip"
[matTooltip]="constants.autoPrintSlipTip"
Expand Down

0 comments on commit 9e3f59f

Please sign in to comment.