Theme Done
This commit is contained in:
parent
8673cdd893
commit
7f3ceb5005
|
|
@ -15,9 +15,9 @@
|
|||
[valuePrimitive]="true"
|
||||
[(ngModel)]="selectedStatus"
|
||||
(valueChange)="selectedStatusChange($event)"
|
||||
class="form-control form-control-sm">
|
||||
class="form-control form-control-sm ct-toolbar-dd" kendoGridToolbarFocusable>
|
||||
</kendo-dropdownlist>
|
||||
<input placeholder="Search in all columns..." kendoTextBox (input)="onFilter($event.target.value)" style="width: 30%;"/>
|
||||
<input placeholder="Search in all columns..." kendoTextBox (input)="onFilter($event.target.value)" class="ct-toolbar-search" kendoGridToolbarFocusable/>
|
||||
<label style="font-weight: bold;">Total Course : {{courses.length}}</label>
|
||||
<kendo-grid-spacer></kendo-grid-spacer>
|
||||
<button class="gh-excel" type="button" kendoGridExcelCommand [svgIcon]="apiService.KendoSVGIcon['fileExcel']">Export to Excel</button>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
/* Grid toolbar: dropdown and search at a fixed width (same as Course Type) instead of stretching */
|
||||
.ct-toolbar-dd {
|
||||
width: 220px !important;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
.ct-toolbar-search {
|
||||
width: 260px !important;
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
|
|
@ -94,16 +94,15 @@
|
|||
<br />
|
||||
@if (showStepPopUp) {
|
||||
<kendo-dialog (close)="onPopUpClose()" title="Add/Modify a Step" [minWidth]="750"
|
||||
[width]="650" [maxHeight]="550">
|
||||
<div class="card">
|
||||
<!--<div class="row">
|
||||
[width]="650" [maxHeight]="550" class="wf-step-dialog">
|
||||
<!--<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="StepNo"> StepNo </label>
|
||||
<input kendoTextBox type="text" class="form-control" [(ngModel)]="currentStep.stepNo" id="StepNo" />
|
||||
</div>
|
||||
<label for="StepNo"> StepNo </label>
|
||||
<input kendoTextBox type="text" class="form-control" [(ngModel)]="currentStep.stepNo" id="StepNo" />
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
</div>-->
|
||||
<!--<div class="form-group col-md-4">
|
||||
<label for="EligibleCriteria"> Eligible Criteria</label>
|
||||
<kendo-dropdownlist id="EligibleCriteria"
|
||||
|
|
@ -116,16 +115,16 @@
|
|||
[valuePrimitive]="true">
|
||||
</kendo-dropdownlist>
|
||||
</div>-->
|
||||
<!--<div class="form-group col-md-4">
|
||||
<!--<div class="form-group col-md-4">
|
||||
<label for="stepListFieldName"> List-field-Name </label>
|
||||
<input kendoTextBox type="text" class="form-control" [(ngModel)]="currentStep.listActionFieldName" id="stepListFieldName" />
|
||||
</div>-->
|
||||
<!--<div class="form-group col-md-4">
|
||||
<!--<div class="form-group col-md-4">
|
||||
<label for="stepAmount"> Amount </label>
|
||||
<input type="checkbox" id="stepAmount" kendoCheckBox [(ngModel)]="allowApproveAmount" />
|
||||
<input kendoTextBox type="text" [disabled]="!allowApproveAmount" class="form-control" [(ngModel)]="currentStep.amount" id="stepAmount" />
|
||||
</div>-->
|
||||
<!--<div class="form-group col-md-4">
|
||||
<!--<div class="form-group col-md-4">
|
||||
<label for="ActionTaken"> action </label>
|
||||
<kendo-dropdownlist id="ActionTaken"
|
||||
[data]="wfStepAction"
|
||||
|
|
@ -136,90 +135,95 @@
|
|||
[valuePrimitive]="true">
|
||||
</kendo-dropdownlist>
|
||||
</div>-->
|
||||
<!--<div class="form-group col-md-4">
|
||||
<!--<div class="form-group col-md-4">
|
||||
<div *ngIf="this.allowGotoStep" class="form-group col-md-4">
|
||||
<label for="GoToStepNo"> Go-to-Step </label>
|
||||
<input kendoTextBox type="text" class="form-control" [(ngModel)]="currentStep.goToStepNo" id="GoToStepNo" />
|
||||
</div>
|
||||
</div>-->
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="k-grid">
|
||||
<div class="form-group col-md-4">
|
||||
<div class="form-group col-md-4">
|
||||
<label for="stepAmount"> Approve Limite Amount </label>
|
||||
<input type="checkbox" id="stepAmount" kendoCheckBox [(ngModel)]="allowApproveAmount" />
|
||||
<input kendoTextBox type="text" [disabled]="!allowApproveAmount" class="form-control" [(ngModel)]="currentStep.amount" id="stepAmount" />
|
||||
</div>
|
||||
<label for="InitiatorType"> Actor Type </label>
|
||||
<kendo-dropdownlist class="form-control form-control-sm input-sm"
|
||||
id="value"
|
||||
[data]="actorType"
|
||||
[(ngModel)]="currentStepActor.wfActorType"
|
||||
[textField]="'name'"
|
||||
[valueField]="'value'"
|
||||
(valueChange)="OnActorChangeChanged($event)"
|
||||
[valuePrimitive]="true">
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
@if (this.allowEmployeeSelect) {
|
||||
<div class="form-group col-md-4">
|
||||
<label for="employeeName">Search Emloyee</label>
|
||||
<div class="row col-md-12" id="employeeName">
|
||||
<app-employee-picker (ItemSelected)="GetSelectedEmployee($event)"></app-employee-picker>
|
||||
|
||||
<!-- Step: approve limit -->
|
||||
<section class="wf-section">
|
||||
<h6 class="wf-section-title">Step</h6>
|
||||
<div class="wf-fields">
|
||||
<div class="wf-field">
|
||||
<label for="stepAmount">Approve Limit Amount</label>
|
||||
<div class="wf-inline">
|
||||
<input type="checkbox" id="stepAmount" kendoCheckBox [(ngModel)]="allowApproveAmount" />
|
||||
<input kendoTextBox type="text" [disabled]="!allowApproveAmount" class="form-control" [(ngModel)]="currentStep.amount" id="stepAmount" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (this.allowpositiontype) {
|
||||
<div class="form-group col-md-4">
|
||||
<label for="InitiatorType"> Position-Type </label>
|
||||
<kendo-dropdownlist class="form-control form-control-sm input-sm"
|
||||
id="value"
|
||||
[data]="positiontypes"
|
||||
[(ngModel)]="currentStepActor.objectID"
|
||||
[textField]="'name'"
|
||||
[valueField]="'value'"
|
||||
[valuePrimitive]="true">
|
||||
</kendo-dropdownlist>
|
||||
</section>
|
||||
|
||||
<!-- Actors: pick the actor, add it, list of added actors -->
|
||||
<section class="wf-section">
|
||||
<h6 class="wf-section-title">Actors</h6>
|
||||
<div class="wf-fields">
|
||||
<div class="wf-field">
|
||||
<label for="InitiatorType">Actor Type</label>
|
||||
<kendo-dropdownlist class="form-control form-control-sm input-sm"
|
||||
id="value"
|
||||
[data]="actorType"
|
||||
[(ngModel)]="currentStepActor.wfActorType"
|
||||
[textField]="'name'"
|
||||
[valueField]="'value'"
|
||||
(valueChange)="OnActorChangeChanged($event)"
|
||||
[valuePrimitive]="true">
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
@if (this.allowEmployeeSelect) {
|
||||
<div class="wf-field">
|
||||
<label for="employeeName">Search Employee</label>
|
||||
<div id="employeeName">
|
||||
<app-employee-picker (ItemSelected)="GetSelectedEmployee($event)"></app-employee-picker>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (this.allowpositiontype) {
|
||||
<div class="wf-field">
|
||||
<label for="InitiatorType">Position Type</label>
|
||||
<kendo-dropdownlist class="form-control form-control-sm input-sm"
|
||||
id="value"
|
||||
[data]="positiontypes"
|
||||
[(ngModel)]="currentStepActor.objectID"
|
||||
[textField]="'name'"
|
||||
[valueField]="'value'"
|
||||
[valuePrimitive]="true">
|
||||
</kendo-dropdownlist>
|
||||
</div>
|
||||
}
|
||||
@if (this.allowListField) {
|
||||
<div class="wf-field">
|
||||
<label for="ActorListFieldName">List-Field-Employee</label>
|
||||
<input kendoTextBox type="text" class="form-control" [(ngModel)]="currentStepActor.listFieldName" id="ActorListFieldName" />
|
||||
</div>
|
||||
}
|
||||
@if (this.StepActors.length>1) {
|
||||
<div class="wf-field wf-field-check">
|
||||
<input type="checkbox" id="chkRequiredAll" kendoCheckBox [(ngModel)]="currentStep.reqAppAll" />
|
||||
<label for="chkRequiredAll">Required Approval All</label>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
}
|
||||
@if (this.allowListField) {
|
||||
<div class="form-group col-md-4">
|
||||
<input kendoTextBox type="text" class="form-control" [(ngModel)]="currentStepActor.listFieldName" id="ActorListFieldName" />
|
||||
<label for="ActorListFieldName"> Required Approval All </label>
|
||||
<div class="wf-add-row">
|
||||
<button kendoButton class="gh-add" [svgIcon]="apiService.KendoSVGIcon['plus']" (click)="AddActor()">Add Actor</button>
|
||||
</div>
|
||||
}
|
||||
@if (this.StepActors.length>1) {
|
||||
<div class="form-group col-md-4">
|
||||
<label for="chkRequiredAll"> List-Field-Employee </label>
|
||||
<input type="checkbox" id="chkRequiredAll" kendoCheckBox [(ngModel)]="currentStep.reqAppAll" />
|
||||
</div>
|
||||
}
|
||||
<div class="form-group col-md-2" style="float:right;">
|
||||
<button class="btn btn-primary pull-right" (click)="AddActor()"><i class="fa fa-floppy-o" aria-hidden="true"></i> Add Actor</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<kendo-grid [data]="StepActors"
|
||||
style="margin: 14px">
|
||||
<kendo-grid [data]="StepActors" class="wf-actor-grid">
|
||||
<kendo-grid-column field="actorName" title="Actor Name"></kendo-grid-column>
|
||||
<kendo-grid-command-column title="Action">
|
||||
<kendo-grid-command-column title="Action" [width]="90">
|
||||
<ng-template kendoGridCellTemplate let-dataItem let-rowIndex="rowIndex">
|
||||
<button class="btn btn-xs btn-info gh-delete" style="padding: 0.2rem 0.5rem;" (click)="RemoveActor(rowIndex);"><i class="fa fa-pencil-square-o" aria-hidden="true"></i> Remove</button>
|
||||
<button kendoButton class="kt-delete" [svgIcon]="apiService.KendoSVGIcon['delete']" title="Remove" (click)="RemoveActor(rowIndex);"></button>
|
||||
</ng-template>
|
||||
</kendo-grid-command-column>
|
||||
</kendo-grid>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="form-group col-md-4">
|
||||
<button class="btn btn-primary pull-right gh-close" (click)="CloseStep()"><i class="fa fa-floppy-o" aria-hidden="true"></i> Close</button>
|
||||
<button class="btn btn-primary pull-right gh-submit" (click)="AddStep()"><i class="fa fa-floppy-o" aria-hidden="true"></i> submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</kendo-dialog>
|
||||
</section>
|
||||
|
||||
<kendo-dialog-actions layout="end">
|
||||
<button kendoButton class="gh-close" (click)="CloseStep()">Close</button>
|
||||
<button kendoButton themeColor="primary" class="gh-submit" (click)="AddStep()">Submit</button>
|
||||
</kendo-dialog-actions>
|
||||
</kendo-dialog>
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,96 @@
|
|||
/* Add/Modify a Step dialog: layout only. Every binding, condition and handler stays in the template as it was. */
|
||||
.wf-step-dialog ::ng-deep .k-dialog-content {
|
||||
padding: 14px 16px;
|
||||
background-color: var(--gh-pb);
|
||||
}
|
||||
|
||||
.wf-section {
|
||||
background: var(--gh-tb);
|
||||
border: 1px solid var(--gh-bo);
|
||||
border-radius: 8px;
|
||||
padding: 12px 14px 14px;
|
||||
}
|
||||
.wf-section + .wf-section {
|
||||
margin-top: 12px;
|
||||
}
|
||||
.wf-section-title {
|
||||
margin: 0 0 10px;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 1px solid var(--gh-bo);
|
||||
font-size: calc(var(--gh-fz) * 13 / 14);
|
||||
font-weight: 700;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: .04em;
|
||||
color: var(--gh-btn);
|
||||
}
|
||||
|
||||
/* Two fields per line */
|
||||
.wf-fields {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
gap: 12px 16px;
|
||||
align-items: end;
|
||||
}
|
||||
/* A field left alone on its line takes the full width (e.g. Actor Type until a second field
|
||||
shows beside it, Approve Limit Amount always) */
|
||||
.wf-fields > .wf-field:last-child:nth-child(odd) {
|
||||
grid-column: 1 / -1;
|
||||
}
|
||||
.wf-field {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 5px;
|
||||
min-width: 0;
|
||||
}
|
||||
.wf-field > label {
|
||||
margin: 0;
|
||||
font-size: calc(var(--gh-fz) * 13 / 14);
|
||||
font-weight: 600;
|
||||
color: var(--gh-ht);
|
||||
}
|
||||
.wf-field :is(.k-dropdownlist, .k-textbox, input.form-control) {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
/* Checkbox in front of the amount box */
|
||||
.wf-inline {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
.wf-inline input[type=checkbox] {
|
||||
flex: 0 0 auto;
|
||||
margin: 0;
|
||||
}
|
||||
.wf-inline input:not([type=checkbox]) {
|
||||
flex: 1 1 auto;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
/* Checkbox field: box beside its label */
|
||||
.wf-field-check {
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-height: var(--gh-h, 34px);
|
||||
}
|
||||
.wf-field-check > label {
|
||||
order: 1;
|
||||
}
|
||||
.wf-field-check input[type=checkbox] {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wf-add-row {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin: 12px 0 10px;
|
||||
}
|
||||
|
||||
.wf-actor-grid {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.wf-step-dialog ::ng-deep .k-dialog-actions {
|
||||
gap: 8px;
|
||||
}
|
||||
|
|
@ -24,7 +24,8 @@ import { DatePickerModule } from '@progress/kendo-angular-dateinputs';
|
|||
|
||||
@Component({
|
||||
selector: 'app-workflow-rule',
|
||||
templateUrl: './workflow-rule.component.html'
|
||||
templateUrl: './workflow-rule.component.html',
|
||||
styleUrls: ['./workflow-rule.component.scss']
|
||||
,changeDetection: ChangeDetectionStrategy.Eager,
|
||||
standalone: false
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user