face bg issue and enitity field added
This commit is contained in:
parent
852fc83db2
commit
a24209c8d9
@ -317,7 +317,7 @@ drawRectangle(file)
|
||||
for(let k=0;k<file.length;k++){
|
||||
|
||||
console.log(file[k]['Left_coordinate'],file[k]['Top_coordinate'],file[k]['Face_width'],file[k]['Face_height'])
|
||||
context.rect(file[k]['Left_coordinate'],file[k]['Top_coordinate'],file[k]['Face_width'],file[k]['Face_height']);
|
||||
// context.rect(file[k]['Left_coordinate'],file[k]['Top_coordinate'],file[k]['Face_width'],file[k]['Face_height']);
|
||||
|
||||
|
||||
|
||||
@ -363,21 +363,24 @@ drawRectangle(file)
|
||||
context.font = "75px Times New Roman"
|
||||
var width = context.measureText(this.similarity+'%').width;
|
||||
var height = context.measureText(this.similarity+'%').height;
|
||||
console.log(width,height)
|
||||
context.fillStyle = 'rgb(255 255 255 / 70%)';
|
||||
/// draw text on top
|
||||
let heightValueCode = file[k]['Top_coordinate'] - 4
|
||||
let heightValueCode = file[k]['Top_coordinate'] - 50
|
||||
console.log(heightValueCode)
|
||||
// context.textAlign = "end";
|
||||
// context.textAlign = 'center';
|
||||
context.fillText("\u23F9",file[k]['Left_coordinate'],heightValueCode,width,height);
|
||||
// context.fillText("\u23F9",file[k]['Left_coordinate'],heightValueCode,width,height);
|
||||
context.rect(file[k]['Left_coordinate'],heightValueCode,50,50);
|
||||
context.fill();
|
||||
// ctx.fillText(txt, x, y);
|
||||
// context.restore();
|
||||
console.log(file[k]['Top_coordinate'])
|
||||
let heightValue = file[k]['Top_coordinate'] - 15
|
||||
console.log(heightValue)
|
||||
let widthValue = file[k]['Left_coordinate'] + 10
|
||||
let widthValue = file[k]['Left_coordinate'] + 7
|
||||
context.fillStyle = this.color[k]['color']
|
||||
// context.fill();
|
||||
|
||||
/// get width of text
|
||||
// var width = context.measureText(this.similarity+'%').width;
|
||||
|
||||
|
||||
@ -9,63 +9,85 @@
|
||||
type="button" (click)="onNoClick()"><mat-icon>close</mat-icon></button>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<mat-select placeholder="Entity Type" formControlName="fk_entity_type_id">
|
||||
<mat-option *ngFor="let enti of entityOptions" [value]="enti.entity_type_id">{{ enti.name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_entity_type_id.hasError('required')" class="mat-text-warn">Entity Type Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="Entity Type" formControlName="fk_entity_type_id">
|
||||
<mat-option *ngFor="let enti of entityOptions" [value]="enti.entity_type_id">{{ enti.name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.fk_entity_type_id.hasError('required')" class="mat-text-warn">Entity Type Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<input matInput placeholder="Full Name" formControlName="full_name">
|
||||
<mat-error *ngIf="submitted && f.full_name.hasError('required')" class="mat-text-warn">You must Include Full Name.</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<input matInput placeholder="Short Name" formControlName="short_name">
|
||||
<mat-error *ngIf="submitted && f.short_name.hasError('required')" class="mat-text-warn">You must Include Short Name.</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayoutGap="32px" fxLayoutAlign="flex-start">
|
||||
<mat-form-field fxFlex="1 1 auto" class="ml-xs">
|
||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="Score Card (Yes/No)" formControlName="is_score_card_enabled">
|
||||
<mat-option *ngFor="let opt of scoreCardOptions" [value]="opt.score_option_value">{{ opt.score_option_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_score_card_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlex="1 1 auto" class="ml-xs">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="OTP (Yes/No)" formControlName="is_otp_enabled">
|
||||
<mat-option *ngFor="let opt of scoreCardOptions" [value]="opt.score_option_value">{{ opt.score_option_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_otp_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="SMS (Yes/No)" formControlName="is_sms_enabled">
|
||||
<mat-option *ngFor="let opt of scoreCardOptions" [value]="opt.score_option_value">{{ opt.score_option_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_sms_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="0 1 auto" class="ml-xs">
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="mail (Yes/No)" formControlName="is_mail_enabled">
|
||||
<mat-option *ngFor="let opt of scoreCardOptions" [value]="opt.score_option_value">{{ opt.score_option_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_mail_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<mat-form-field fxFlex="1 1 auto" class="ml-xs">
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="App Notify (Yes/No)" formControlName="is_app_notify_enabled">
|
||||
<mat-option *ngFor="let opt of scoreCardOptions" [value]="opt.score_option_value">{{ opt.score_option_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_app_notify_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div fxFlex="30%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="Facial Recognition Enabled" formControlName="is_face_api_enabled">
|
||||
<mat-option *ngFor="let face of faceOption" [value]="face.face_option_value">{{face.face_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_face_api_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" style="text-align:right;">
|
||||
<button mat-raised-button mat-icon-button class="mr-1 mb-1 hover-icon" matTooltip="Reset" matTooltipPosition="above" type="reset"><mat-icon>settings_backup_restore</mat-icon></button>
|
||||
|
||||
@ -43,6 +43,7 @@ export class EntityAddComponent implements OnInit {
|
||||
public _addQuesFrom: FormGroup;
|
||||
public submitted = false;
|
||||
public entityOptions: any = [];
|
||||
public faceOption: any = [{'face_name':'Yes','face_option_value':'1'},{'face_name':'No','face_option_value':'0'}];
|
||||
public scoreCardOptions: any = [{'score_option_name':'Yes','score_option_value':'1'},{'score_option_name':'No','score_option_value':'0'}];
|
||||
|
||||
errorMessage: string;
|
||||
@ -71,6 +72,7 @@ export class EntityAddComponent implements OnInit {
|
||||
fk_entity_type_id: [null, Validators.compose([Validators.required])],
|
||||
full_name: [null, Validators.compose([Validators.required])],
|
||||
short_name: [null, Validators.compose([Validators.required])],
|
||||
is_face_api_enabled: [null, Validators.compose([Validators.required])],
|
||||
is_score_card_enabled: [null, Validators.compose([Validators.required])],
|
||||
is_otp_enabled: [null, Validators.compose([Validators.required])],
|
||||
is_sms_enabled: [null, Validators.compose([Validators.required])],
|
||||
@ -120,7 +122,7 @@ export class EntityAddComponent implements OnInit {
|
||||
|
||||
//To Remove The "Null" With Key also
|
||||
Object.keys(entityFormValues).forEach((key) => (entityFormValues[key] == null) && delete entityFormValues[key]);
|
||||
|
||||
console.log(entityFormValues)
|
||||
//Add BRANCH data with help Service File
|
||||
this.entityService.addEntityMasterDetails(entityFormValues).subscribe(
|
||||
dataresult => {
|
||||
|
||||
@ -238,15 +238,25 @@
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_mail_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
<div fxFlex="30%">
|
||||
</div>
|
||||
</div>
|
||||
<div fxLayout="row wrap" fxLayout.xs="column" fxLayoutGap="2%" fxLayoutAlign="center center">
|
||||
<div fxFlex="40%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="App Notify (Yes/No)" formControlName="is_app_notify_enabled">
|
||||
<mat-option *ngFor="let opt of scoreCardOptions" [value]="opt.score_option_value">{{ opt.score_option_name }}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_app_notify_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
<div fxFlex="40%">
|
||||
<mat-form-field class="ml-xs" style="width:100%">
|
||||
<mat-select placeholder="Facial Recognition" formControlName="is_face_api_enabled">
|
||||
<mat-option *ngFor="let face of faceOption" [value]="face.face_option_value">{{face.face_name}}</mat-option>
|
||||
</mat-select>
|
||||
<mat-error *ngIf="submitted && f.is_face_api_enabled.hasError('required')" class="mat-text-warn">Field Required.</mat-error>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div></div>
|
||||
|
||||
@ -35,6 +35,8 @@ import { EntityListComponent } from './../entity-list/entity.list.component';
|
||||
export class EntityEditComponent implements OnInit, OnDestroy {
|
||||
|
||||
@Input() public childMessage: any;
|
||||
public faceOption: any = [{'face_name':'Yes','face_option_value':'1'},{'face_name':'No','face_option_value':'0'}];
|
||||
|
||||
public scoreCardOptions: any = [{'score_option_name':'Yes','score_option_value':'1'},{'score_option_name':'No','score_option_value':'0'}];
|
||||
|
||||
public entity_id: number;
|
||||
@ -98,6 +100,7 @@ export class EntityEditComponent implements OnInit, OnDestroy {
|
||||
entity_id: [this.entityNameRecord.entity_id],
|
||||
full_name: [this.entityNameRecord.full_name, Validators.compose([Validators.required]) ],
|
||||
short_name: [this.entityNameRecord.short_name, Validators.compose([Validators.required]) ],
|
||||
is_face_api_enabled: [this.entityNameRecord.is_face_api_enabled, Validators.compose([Validators.required])],
|
||||
is_score_card_enabled:[this.entityNameRecord.is_score_card_enabled || '',Validators.compose([Validators.required])],
|
||||
is_otp_enabled:[this.entityNameRecord.is_otp_enabled || '',Validators.compose([Validators.required])],
|
||||
is_sms_enabled:[this.entityNameRecord.is_sms_enabled || '',Validators.compose([Validators.required])],
|
||||
@ -130,7 +133,7 @@ export class EntityEditComponent implements OnInit, OnDestroy {
|
||||
var entityFormValues = this._editEntityNameFrom.value;
|
||||
|
||||
Object.keys(entityFormValues).forEach((key) => (entityFormValues[key] == null) && delete entityFormValues[key]);
|
||||
|
||||
console.log(entityFormValues)
|
||||
this.entityService.updateEntityMasterDetails(entityFormValues).subscribe(
|
||||
dataresult => {
|
||||
if (dataresult.status == 200) {
|
||||
|
||||
@ -180,7 +180,10 @@ export class EntityListComponent implements OnInit {
|
||||
addNewEntity(): void {
|
||||
const dialogRef = this.dialog.open(EntityAddComponent, {
|
||||
disableClose: true,
|
||||
data: { }
|
||||
data: { },
|
||||
minWidth: '70%',
|
||||
maxWidth: '70%',
|
||||
height: '80%',
|
||||
});
|
||||
|
||||
dialogRef.afterClosed().subscribe(result => {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user