Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -124,4 +124,8 @@ export class EmployeeParkingPlaceMappingService {
observe: 'response',
});
}

activateOrDeActivateSignature(data: any) {
return this.http.post(environment.signatureStatus, data);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ import { WrapupTimeConfigurationService } from 'src/app/core/services/ProviderAd
import { CoreModule } from 'src/app/core/core.module';
import { EmailConfigurationComponent } from './email-configuration/email-configuration.component';
import { EmailConfigurationService } from 'src/app/core/services/ProviderAdminServices/email-configuration-services.service';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatSortModule } from '@angular/material/sort';
import { MatInputModule } from '@angular/material/input';

@NgModule({
declarations: [
Expand Down Expand Up @@ -83,6 +86,9 @@ import { EmailConfigurationService } from 'src/app/core/services/ProviderAdminSe
MatIconModule,
MatNativeDateModule,
CoreModule,
MatPaginatorModule,
MatSortModule,
MatInputModule,
],
providers: [
SnomedMasterService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,12 +186,12 @@ <h4 class="f-s-b m-t-20 m-b-20">Create SMS Template</h4>
required
[readonly]="isReadonly"
minlength="20"
maxlength="200"
maxlength="300"
#sms
name="smsTemplate"
></textarea>
<mat-hint align="end"
>{{ sms.value.length ? sms.value.length : 0 }}/200</mat-hint
>{{ sms.value.length ? sms.value.length : 0 }}/300</mat-hint
>
</mat-form-field>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ export class SmsTemplateComponent implements OnInit, AfterViewInit {

saveSMStemplate(form_values: any) {
const requestObject = {
createdBy: this.commonData.Userdata.userName,
createdBy: this.commonData.uname,
providerServiceMapID: this.providerServiceMapID,
smsParameterMaps: this.smsParameterData.data,
smsTemplate: form_values.smsTemplate,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,49 @@
border:none;
margin:0;
padding:0;
}
.mat-header-cell,
.mat-cell {
text-align: left; /* or left/right depending on need */
vertical-align: middle;
}
.title {
margin: 0;
padding: 10px;
margin-bottom: 10px;
color: white;
font-weight:700;
font-size: 18px;
background-color: #0277bd !important;
}

.message {
font: 500 20px / 32px Roboto, "Helvetica Neue", sans-serif;
padding:0px 24px 0px 24px;

}

.info {
background: #0277bd;
}

.signature-container {
display: flex;
justify-content: center; /* center image horizontally */
margin: 20px 0; /* space top & bottom */
}

.signature-img {
max-width: 100%;
max-height: 200px;
}

.action {
display: flex;
justify-content: flex-end; /* align button right */
margin: 20px 20px 10px 0; /* spacing: top right bottom left */
}

.ok-btn {
margin-right: 10px; /* small gap from edge */
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,79 +8,117 @@ <h4>User Signature Mapping</h4>
<div class="col-3">
<mat-form-field [style.width]="'100%'">
<mat-label>Designation</mat-label>
<mat-select
name="designation"
formControlName="designation"
(selectionChange)="getUserNames()"
>
<mat-select name="designation" formControlName="designation" (selectionChange)="getUserNames()">
<mat-option *ngFor="let item of designations" [value]="item">
{{ item.designationName }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-3">
<mat-form-field [style.width]="'100%'">
<mat-label>UserName</mat-label>
<mat-select
name="username"
formControlName="username"
(selectionChange)="checkUsersignExist()"
>
<mat-option *ngFor="let item of userNames" [value]="item">
{{ item.userName }}
</mat-option>
</mat-select>
</mat-form-field>
</div>
<div class="col-3">
<button
mat-raised-button
color="primary"
class="pull-right mat_blue"
[disabled]="!signExist"
(click)="file.click()"
>
Select Sign
</button>
<span class="span-style">
<input
type="file"
#file
(change)="preview(file.files)"
accept="image/*"
class="pull-right"
/>
</span>
</div>
</div>
<div
class="col-xs-12 col-sm-12 col-md-12 col-lg-12 m-t-50"
*ngIf="imgURL"
>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 m-t-50" *ngIf="imgURL">
<img [src]="imgURL" alt="img" height="80" />
<button
mat-raised-button
color="primary"
class="m-l-50 mat_blue"
(click)="uploadSign()"
>
<button mat-raised-button color="primary" class="mat_blue" (click)="uploadSign()">
Upload
</button>
</div>
<div
class="col-xs-12 col-sm-12 col-md-12 col-lg-12 m-t-50"
*ngIf="enableDownloadButton"
>
<button
mat-raised-button
color="primary"
class="m-l-50 pull-right mat_blue"
(click)="downloadSign()"
>
Download signature
</button>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 m-t-50" *ngIf="enableDownloadButton">
</div>
</form>
</div>
</div>


<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12 m-t-10" *ngIf="userSignatureTable.length > 0">

<div style="text-align: end">
<mat-form-field id="filterbox">
<input matInput placeholder="Search by user name" #filterTerm (keyup)="applyFilter($event)" />
<mat-icon matSuffix>search</mat-icon>
</mat-form-field>
</div>
<div class="table-responsive">
<table mat-table [dataSource]="dataSource" class="table table-striped table-hover" matSort
aria-label="User Signature Table">

<!-- Role Column -->
<ng-container matColumnDef="role">
<th mat-header-cell *matHeaderCellDef> Role </th>
<td mat-cell *matCellDef="let element"> {{ element.role }} </td>
</ng-container>

<!-- Username Column -->
<ng-container matColumnDef="username">
<th mat-header-cell *matHeaderCellDef> Username </th>
<td mat-cell *matCellDef="let element"> {{ element.username }} </td>
</ng-container>

<!-- Upload Column -->
<ng-container matColumnDef="upload">
<th mat-header-cell *matHeaderCellDef> Upload </th>
<td mat-cell *matCellDef="let element">
<button mat-raised-button color="primary" class="mat_blue" (click)="fileInput.click()">Upload
Signature</button>
<input type="file" #fileInput hidden (change)="preview(fileInput.files, element)" accept="image/*" />
</td>
</ng-container>

<!-- Download Column -->
<ng-container matColumnDef="download">
<th mat-header-cell *matHeaderCellDef> Download </th>
<td mat-cell *matCellDef="let element">
<button mat-raised-button color="primary" class="mat_blue" (click)="downloadSign(element)"
[disabled]="!element.signExist">
Download
</button>
</td>
</ng-container>

<!-- View Column -->
<ng-container matColumnDef="view">
<th mat-header-cell *matHeaderCellDef> View </th>
<td mat-cell *matCellDef="let element">
<button mat-raised-button color="primary" class="mat_blue" (click)="openSignatureDialog(element)"
[disabled]="!element.signExist">View</button>
</td>
</ng-container>

<!-- Active Toggle Column -->
<ng-container matColumnDef="active">
<th mat-header-cell *matHeaderCellDef> Active </th>
<td mat-cell *matCellDef="let element">
<button *ngIf="element.signatureStatus === 'InActive'" mat-raised-button color="accent" class="mat_green"
(click)="toggleActive(element,true)" [disabled]="!element.signExist">
Activate
</button>
<button *ngIf="element.signatureStatus === 'Active'" mat-raised-button class="mat_blue" color="primary"
(click)="toggleActive(element,false)">
Deactivate
</button>
</td>
</ng-container>

<!-- Header + Row -->
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>

</table>

</div>
<mat-paginator #paginator [pageSizeOptions]="[5, 10, 20]" [pageSize]="5" showFirstLastButtons>
</mat-paginator>

<ng-template #signatureDialog let-data>
<h3 class="title info">{{ data.username }}'s Signature</h3>

<div class="signature-container">
<img [src]="data.signatureUrl" alt="signature" class="signature-img" />
</div>

<div class="action">
<button mat-raised-button class="mat_blue ok-btn" (click)="closeDialog()">
OK
</button>
</div>
</ng-template>

</div>
Loading
Loading