Skip to content

Commit

Permalink
Merge pull request #142 from KB-iGOT/sync-with-19
Browse files Browse the repository at this point in the history
Sync with 19
  • Loading branch information
vishnubansaltarento authored Dec 30, 2024
2 parents 37dee4d + 89a918f commit 8c75528
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@
</div>
<ng-container>
<ws-widget-directory-table [selectedDepartment]='currentDepartment' [tableData]='tabledata' [data]='data'
[needCreate]="isAllowed(allowedCreateRoles)" (eOnRowClick)="onRoleClick($event)"
(actionsClick)="actionClick($event)" (searchByEnterKey)="onEnterkySearch($event)"
(pageChangeEvent)="onPageChange($event)">
[needCreate]="currentFilter === 'mdo' || currentFilter === 'state' ? false : true"
(eOnRowClick)="onRoleClick($event)" (actionsClick)="actionClick($event)"
(searchByEnterKey)="onEnterkySearch($event)">
</ws-widget-directory-table>
</ng-container>
</mat-card-content>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@
<mat-form-field appearance="outline" class="margin-top-xs">
<input id="eventTitle" matInput #eventTitle formControlName="eventTitle"
placeholder="Type here" aria-label="Event Title input" class="form-input"
(keypress)="omit_special_char($event)" maxlength="250" />
(paste)="omit_special_char($event)" (keypress)="omit_special_char($event)"
maxlength="250" />
<mat-error [hidden]="false"
aria-label="Event title Error|Explains event title is required "
*ngIf="createEventForm?.controls['eventTitle']?.touched && createEventForm?.controls['eventTitle'].errors?.required">
Expand Down Expand Up @@ -231,7 +232,7 @@
Date
</label>
<ng-container
*ngIf="createEventForm.get('eventType')?.value === 'Karmayogi Saptah'">
*ngIf="allowedCurrentDates?.includes(createEventForm.get('eventType')?.value)">
<mat-form-field color="accent" appearance="outline">
<input matInput [matDatepicker]="eventDate" formControlName="eventDate"
[min]="currentDate" [max]="maxDate" [(ngModel)]="todayDate"
Expand All @@ -254,7 +255,7 @@
</mat-form-field>
</ng-container>
<ng-container
*ngIf="!(createEventForm.get('eventType')?.value === 'Karmayogi Saptah')">
*ngIf="!allowedCurrentDates?.includes(createEventForm.get('eventType')?.value)">
<mat-form-field color="accent" appearance="outline">
<input matInput [matDatepicker]="eventDate" formControlName="eventDate"
[max]="maxDate" [(ngModel)]="todayDate"
Expand Down Expand Up @@ -447,6 +448,11 @@
</div>
</div>
</div>
<div class="page_title_flex ">
<span class="required"></span>
<span class="flex font-bold mr-2 ">Note:</span>
<span class="flex bold">Event will be visible after 30 minutes in the learner portal.</span>
</div>

<div class="page_title_flex">
<span class="spacer"></span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export class CreateEventComponent implements OnInit {
participantsArr: any = []
// presentersArr: any = []
displayedColumns: string[] = ['fullname', 'email', 'type']
allowedCurrentDates: any = ['Karmayogi Talks', 'Karmayogi Saptah']
@Input() tableData!: ITableData | undefined
@Input() data?: []
@Input() isUpload?: boolean
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
export const sectorConstants = {
nameRegex: /^[a-zA-Z0-9.\-_$/:[\]' '!]+$/,
nameRegex: /^[a-zA-Z0-9.,\-_$/:[\]' '!]+$/,
fileSize: 1024,
fileCount: 1,
width: 24,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { AbstractControl, ValidationErrors, ValidatorFn } from '@angular/forms'
export function preventHtmlAndJs(): ValidatorFn {
return (control: AbstractControl): ValidationErrors | null => {
const value = control.value
if (value && value.match(/<[^>]*>|(function[^\s]+)|(javascript:[^\s]+)/i)) {
if (value && value.match(/<[^>]*>|(function\s*\([^)]*\))|(javascript:[^\s]+)/i)) {
return { noHtml: true }
}
return null
Expand Down

0 comments on commit 8c75528

Please sign in to comment.