Skip to content

Commit

Permalink
Cbrelease 3.0.1 (#22)
Browse files Browse the repository at this point in the history
* lib update

* redirection issues fixes

* migration add admin API

* migration add admin API

* bug fixes on several flow

* telemetry initail commit

* added new setof telemetery

* new name env conf added in environment

* new setup task

* code cleaning

* code cleaning

* new phase 2 items added

* build error fixes

* code cleaning

* code cleaning

* node version updated

* SPV fixes

* code cleaning and telemtry done

* telemetry issues fixes

* telemetry issues fixes

* fixes added

* fix: Task #56814 bug fixed

* Modertaion

* updating component imports

* inline css removed

* fix: block and unblock

* fix: message content

* Updated Styling

* Cbrelease 3.0.1 (#19)

* Modertaion

* updating component imports

* inline css removed

* Updated Styling

Co-authored-by: chelsacharles <[email protected]>

* Linting issue resolved

* linting issues resolved

* Unwanted files removed

* Cbrelease 3.0.1 (#20)

* Modertaion

* updating component imports

* inline css removed

* Updated Styling

* Linting issue resolved

* linting issues resolved

* Unwanted files removed

Co-authored-by: chelsacharles <[email protected]>

* fix: unblock auto update delay fix

* scroll issue resolved

* Api

* fixed lint issues

Co-authored-by: Jenifer Ramsingh <[email protected]>
Co-authored-by: gohilamariappan <[email protected]>
Co-authored-by: Vishali Sakar <[email protected]>
Co-authored-by: chelsacharles <[email protected]>
  • Loading branch information
5 people authored Mar 2, 2022
1 parent fe2f56b commit 5eb193d
Show file tree
Hide file tree
Showing 71 changed files with 4,547 additions and 223 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM node:10
FROM node:12

WORKDIR /app
COPY . .
Expand Down
4 changes: 2 additions & 2 deletions angular.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,8 @@
],
"scripts": [
"node_modules/jquery/dist/jquery.min.js",
"src/spv-assets/telemetry.min.js",
"node_modules/shepherd.js/dist/js/shepherd.min.js"
"node_modules/shepherd.js/dist/js/shepherd.min.js",
"node_modules/@project-sunbird/telemetry-sdk/index.js"
]
},
"configurations": {
Expand Down
13 changes: 8 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,14 @@
"@angular/pwa": "^0.803.14",
"@angular/router": "~8.2.1",
"@angular/service-worker": "~8.2.1",
"@sunbird-cb/collection": "^1.0.7",
"@sunbird-cb/collection": "^1.0.8",
"@sunbird-cb/resolver": "^0.0.3",
"@sunbird-cb/utils": "^1.0.2",
"@sunbird-cb/utils": "1.0.7",
"@types/file-saver": "^2.0.1",
"@types/lodash": "^4.14.161",
"@types/lodash": "^4.14.172",
"@types/video.js": "7.2.12",
"brace": "^0.11.1",
"lodash": "^4.17.21",
"chart.js": "^2.8.0",
"d3": "^5.9.7",
"file-saver": "^2.0.2",
Expand Down Expand Up @@ -80,7 +81,8 @@
"vis-network": "^5.2.4",
"vis-util": "^5.0.2",
"xlsx": "^0.16.1",
"zone.js": "~0.10.1"
"zone.js": "~0.10.1",
"@project-sunbird/telemetry-sdk": "0.0.26"
},
"devDependencies": {
"@angular-devkit/build-angular": "^0.803.23",
Expand All @@ -93,12 +95,13 @@
"@types/jasmine": "~3.4.0",
"@types/jasminewd2": "~2.0.6",
"@types/mustache": "^0.8.32",
"@types/node": "^12.7.12",
"@types/node": "^10.17.60",
"@types/pdfjs-dist": "^2.1.3",
"@types/quill": "^2.0.2",
"@types/video.js": "7.2.12",
"@types/vis": "^4.21.19",
"@types/zip.js": "2.0.28",
"@types/uuid": "^8.3.1",
"angular-cli-alias": "^1.0.9",
"codelyzer": "^5.1.0",
"gzipper": "^2.8.1",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import * as _ from 'lodash'

// import {IColums } from '../interface/interfaces'
import { Router } from '@angular/router'
import { EventService } from '@sunbird-cb/utils'

@Component({
selector: 'ws-widget-directory-table',
Expand Down Expand Up @@ -37,11 +38,10 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang
selection = new SelectionModel<any>(true, [])

constructor(
private router: Router) {
private router: Router, private events: EventService) {
this.dataSource = new MatTableDataSource<any>()
this.actionsClick = new EventEmitter()
this.clicked = new EventEmitter()

}

ngOnInit() {
Expand Down Expand Up @@ -132,8 +132,21 @@ export class UIDirectoryTableComponent implements OnInit, AfterViewInit, OnChang

onRowClick(e: any) {
this.eOnRowClick.emit(e)
this.raiseTelemetryForRow('row', e)
}
gotoCreateNew() {
this.router.navigate([`/app/home/${this.selectedDepartment}/create-department`, { needAddAdmin: true }])
}
raiseTelemetryForRow(sub: string, e: any) {
this.events.raiseInteractTelemetry({
type: 'click',
subType: sub,
},

{
id: e.id,
type: 'department',
},
)
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
<h1 mat-dialog-title style="font-weight: 600;
font-size: 20px; font-family: Montserrat;">Reason for rejection</h1>
<div mat-dialog-content>
<p style="font-family: Lato; font-weight: 700; font-size: 14px; color: RGBA(0, 0, 0, 0.87);">Please crop out the
profane
area</p>
<div style="display:flex; justify-content: center; padding-bottom: 3%;">
<image-cropper [imageChangedEvent]="imageChangedEvent" [imageURL]=data.text [maintainAspectRatio]="false"
(imageCropped)="imageCropped($event)" style="width: 300px;height: 200px;">
</image-cropper>
</div>
<!-- <img [src]="croppedImage" /> -->
<!-- <mat-radio-group
aria-labelledby="example-radio-group-label"
class="example-radio-group"
[(ngModel)]="favoriteSeason"> -->
<!-- <mat-radio-button class="example-radio-button" *ngFor="let season of seasons" [value]="season">
{{season}}
</mat-radio-button> -->
<!-- </mat-radio-group> -->

</div>

<div>
<label id="example-radio-group-label"
style="font-family: Lato; font-weight: 700; font-size: 14px; color: RGBA(0, 0, 0, 0.87);">Please chose a reason for
rejecting
this content.</label>
<mat-radio-group aria-labelledby="example-radio-group-label" class="example-radio-group" [(ngModel)]="favoriteSeason">
<mat-radio-button color="primary" class="example-radio-button" *ngFor="let season of data.seasons" [value]="season"
style="font-family: Lato; font-weight: 400; font-size: 14px; color: RGBA(0, 0, 0, 0.87);">
{{season}}

</mat-radio-button>
<br>
<!-- <br> -->
</mat-radio-group>
<!-- <mat-form-field appearance="none"> -->
<div>
<input type='text' placeholder="Comment (Optional)"
style="font-family: Lato; font-weight: 400; font-size: 14px; color: RGBA(0, 0, 0, 0.87);"
[(ngModel)]="playerName" />
</div>
<!-- </mat-form-field> -->
</div>

<div class=" col-12">
<div class="clearfix">
<div style="padding-top: 3%; padding-bottom: 7%; padding-left: 2%;">
<!-- <div class="float-start " style=" color: RGB(29, 137, 35);font-size: 14px;">
<b>Published</b>
</div> -->
<div class="float-end d-flex flex-row">

<button mat-raised-button type="button" class=" but"
style="border: 2px solid #0074b6; color:#0074b6; margin-right: 15px !important;font-family: Lato; font-size: 14px;"
(click)="onNoClick()">
<b i18n>Cancel</b>
</button>

<button mat-raised-button type="button" class=" ws-mat-primary-background but"
style="border: 2px solid #0074b6; font-family: Lato; font-size: 14px;"
[mat-dialog-close]="{id: data.id, profaneStrings: Tags, category: favoriteSeason, comment: playerName}">
<b class=" text-white" i18n>Submit</b>
</button>

</div>
</div>
</div>
</div>
<!-- <div mat-dialog-actions>
<button mat-button (click)="onNoClick()">No Thanks</button>
<button mat-button [mat-dialog-close]="data.animal" cdkFocusInitial>Ok</button>
</div> -->

<!-- <html>
<head>
<style>
textarea {
width: 94%;
padding: 12px 20px;
margin: 8px 0;
}
</style>
</head>
<body>
<h2>Reason for Rejection</h2>
<label for="w3review">Please select profane words</label>
<form>
<input type="text" id="fname" name="fname" value="">
<textarea id="w3review" name="w3review" rows="5" cols="50">At w3schools.com you will learn how to make a website. They offer free tutorials in all web development technologies.
</textarea>
<input type="text" id="fname" name="fname">
</form>
</body>
</html> -->
Original file line number Diff line number Diff line change
@@ -0,0 +1,84 @@
<h1 mat-dialog-title class="mat-heading-2" i18n>Reason for rejection</h1>
<div mat-dialog-content>
<div class="text-sm mat-subheading-2" i18n>
<p>Please select profane
words</p>
</div>
<mat-form-field appearance="outline">

<textarea readonly matInput rows='5' class=" mat-body-2" style="font-size: 14px; line-height: 1.5;" i18n> {{data.text}}
</textarea>
<!-- </mat-form-field> -->
</mat-form-field>


</div>

<div>
<mat-form-field class="input" appearance="none">
<!--this contains the list of tags-->

<mat-chip-list #taglist class="font-normal text-sm ">
<!--set the properties for the tags-->


<mat-chip selected color="primary" class='ws-mat-primary-tags mat-body-2' *ngFor="let Tag of TAGS"

[selectable]="selectable" [removable]="removable" (removed)="remove(Tag)" i18n>
{{Tag}}
<!--add icon with matChipRemove
directive to remove any tag-->

<mat-icon matChipRemove *ngIf="removable">cancel
</mat-icon>
</mat-chip>
<input type='text' class='input-tag mat-body-2 ' placeholder="Enter the profane words and press enter"
[matChipInputFor]="taglist" [matChipInputSeparatorKeyCodes]="separatorKeysCodes"
(matChipInputTokenEnd)="add($event)" />
</mat-chip-list>
</mat-form-field>
</div>
<div>
<label id="profane-category" class='font-bold text-sm mat-subheading-2' i18n>Please chose a
reason for
rejecting
this content.</label>
<mat-radio-group aria-labelledby="profane-category" class="profane-radio-group" [(ngModel)]="profaneCategorySelected">
<mat-radio-button color="primary" class="profane-radio-button mat-body-2"
*ngFor="let profaneCategory of data.profaneCategories" [value]="profaneCategory" i18n>
{{profaneCategory}}

</mat-radio-button>
<br>
<!-- <br> -->
</mat-radio-group>
<!-- <mat-form-field appearance="none"> -->
<div>
<input type='text' placeholder="Comment (Optional)" class=" mat-body-2" [(ngModel)]="comment" i18n />
</div>
<!-- </mat-form-field> -->
</div>

<div class=" col-12">
<div class="clearfix">
<div class="mat-mod-pd5">
<!-- <div class="float-start " style=" color: RGB(29, 137, 35);font-size: 14px;">
<b>Published</b>
</div> -->
<div class="float-end d-flex flex-row">

<button mat-raised-button type="button" class=" but text-sm mat-mod-button-bg mat-mod-border"
(click)="onNoClick()">
<b i18n>Cancel</b>
</button>

<button mat-raised-button type="button" class=" ws-mat-primary-background but text-sm mat-mod-border"
[mat-dialog-close]="{id: data.id, profaneStrings: TAGS, category: profaneCategorySelected, comment: comment}">

<b class=" text-white" i18n>Submit</b>
</button>

</div>
</div>
</div>
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
import {
Component,
Inject,
} from '@angular/core'

import * as _ from 'lodash'

import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'
import { COMMA, ENTER } from '@angular/cdk/keycodes'
import { MatChipInputEvent } from '@angular/material/chips'

export interface IDialogData {
profaneCategories: string[]
text: any
id: any
profaneString: any
}

@Component({
selector: 'discussion-popup.component',
templateUrl: 'discussion-popup.component.html',
styleUrls: ['./discussion-post.component.scss'],
})
export class DialogTextProfanityComponent {
constructor(
public dialogRef: MatDialogRef<DialogTextProfanityComponent>,
@Inject(MAT_DIALOG_DATA) public data: IDialogData,
) { }
visible = true
selectable = true
removable = true
profaneCategorySelected: any
comment: any
/*set the separator keys.*/

readonly separatorKeysCodes: number[] = [ENTER, COMMA]

/*create the tags list.*/

TAGS: string[] = []

/*our custom add method which will take
matChipInputTokenEnd event as input.*/
add(event: MatChipInputEvent): void {

/*we will store the input and value in local variables.*/

const input = event.input
const value = event.value

if ((value || '').trim()) {

/*the input string will be pushed to the tag list.*/

this.TAGS.push(value)
}

if (input) {

/*after storing the input we will clear the input field.*/

input.value = ''
}
}

/*custom method to remove a tag.*/

remove(tag: string): void {
const index = this.TAGS.indexOf(tag)

if (index >= 0) {

/*the tag of a particular index is removed from the tag list.*/

this.TAGS.splice(index, 1)
}
}
onNoClick(): void {
this.dialogRef.close()
}
}
Loading

0 comments on commit 5eb193d

Please sign in to comment.