v1.0.0
This commit is contained in:
commit
2e1234e7c5
146
.gitignore
vendored
Normal file
146
.gitignore
vendored
Normal file
@ -0,0 +1,146 @@
|
||||
# Dependencies
|
||||
node_modules/
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
|
||||
# Production builds
|
||||
dist/
|
||||
build/
|
||||
out/
|
||||
|
||||
# Environment variables
|
||||
.env
|
||||
.env.local
|
||||
.env.development.local
|
||||
.env.test.local
|
||||
.env.production.local
|
||||
|
||||
# IDE and Editor files
|
||||
.idea/
|
||||
.vscode/
|
||||
*.swp
|
||||
*.swo
|
||||
*~
|
||||
|
||||
# OS generated files
|
||||
.DS_Store
|
||||
.DS_Store?
|
||||
._*
|
||||
.Spotlight-V100
|
||||
.Trashes
|
||||
ehthumbs.db
|
||||
Thumbs.db
|
||||
|
||||
# Logs
|
||||
logs
|
||||
*.log
|
||||
npm-debug.log*
|
||||
yarn-debug.log*
|
||||
yarn-error.log*
|
||||
lerna-debug.log*
|
||||
|
||||
# Runtime data
|
||||
pids
|
||||
*.pid
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage/
|
||||
*.lcov
|
||||
|
||||
# nyc test coverage
|
||||
.nyc_output
|
||||
|
||||
# Dependency directories
|
||||
jspm_packages/
|
||||
|
||||
# Optional npm cache directory
|
||||
.npm
|
||||
|
||||
# Optional eslint cache
|
||||
.eslintcache
|
||||
|
||||
# Microbundle cache
|
||||
.rpt2_cache/
|
||||
.rts2_cache_cjs/
|
||||
.rts2_cache_es/
|
||||
.rts2_cache_umd/
|
||||
|
||||
# Optional REPL history
|
||||
.node_repl_history
|
||||
|
||||
# Output of 'npm pack'
|
||||
*.tgz
|
||||
|
||||
# Yarn Integrity file
|
||||
.yarn-integrity
|
||||
|
||||
# parcel-bundler cache (https://parceljs.org/)
|
||||
.cache
|
||||
.parcel-cache
|
||||
|
||||
# Next.js build output
|
||||
.next
|
||||
|
||||
# Nuxt.js build / generate output
|
||||
.nuxt
|
||||
|
||||
# Gatsby files
|
||||
.cache/
|
||||
public
|
||||
|
||||
# Storybook build outputs
|
||||
.out
|
||||
.storybook-out
|
||||
|
||||
# Temporary folders
|
||||
tmp/
|
||||
temp/
|
||||
|
||||
# Angular specific
|
||||
.angular/
|
||||
|
||||
# Compiled Java class files
|
||||
*.class
|
||||
|
||||
# Compiled Python bytecode
|
||||
*.py[cod]
|
||||
|
||||
# Package files
|
||||
*.jar
|
||||
|
||||
# Maven
|
||||
target/
|
||||
|
||||
# JetBrains IDE
|
||||
.idea/
|
||||
|
||||
# Unit test reports
|
||||
TEST*.xml
|
||||
|
||||
# Applications
|
||||
*.app
|
||||
*.exe
|
||||
*.war
|
||||
|
||||
# Large media files
|
||||
*.mp4
|
||||
*.tiff
|
||||
*.avi
|
||||
*.flv
|
||||
*.mov
|
||||
*.wmv
|
||||
|
||||
# Database files
|
||||
*.sqlite
|
||||
*.db
|
||||
|
||||
# Backup files
|
||||
*.bak
|
||||
*.backup
|
||||
|
||||
# Lock files (keep package-lock.json for npm)
|
||||
# package-lock.json
|
||||
yarn.lock
|
||||
16
E-Learning-Admin-frontend-main/.editorconfig
Normal file
16
E-Learning-Admin-frontend-main/.editorconfig
Normal file
@ -0,0 +1,16 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.ts]
|
||||
quote_type = single
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
50
E-Learning-Admin-frontend-main/.gitignore
vendored
Normal file
50
E-Learning-Admin-frontend-main/.gitignore
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
# These are some examples of commonly ignored file patterns.
|
||||
# You should customize this list as applicable to your project.
|
||||
# Learn more about .gitignore:
|
||||
# https://www.atlassian.com/git/tutorials/saving-changes/gitignore
|
||||
|
||||
# Node artifact files
|
||||
node_modules/
|
||||
dist/
|
||||
|
||||
# Compiled Java class files
|
||||
*.class
|
||||
|
||||
# Compiled Python bytecode
|
||||
*.py[cod]
|
||||
|
||||
# Log files
|
||||
*.log
|
||||
|
||||
# Package files
|
||||
*.jar
|
||||
|
||||
# Maven
|
||||
target/
|
||||
dist/
|
||||
|
||||
# JetBrains IDE
|
||||
.idea/
|
||||
|
||||
# Unit test reports
|
||||
TEST*.xml
|
||||
|
||||
# Generated by MacOS
|
||||
.DS_Store
|
||||
|
||||
# Generated by Windows
|
||||
Thumbs.db
|
||||
|
||||
# Applications
|
||||
*.app
|
||||
*.exe
|
||||
*.war
|
||||
|
||||
# Large media files
|
||||
*.mp4
|
||||
*.tiff
|
||||
*.avi
|
||||
*.flv
|
||||
*.mov
|
||||
*.wmv
|
||||
|
||||
29
E-Learning-Admin-frontend-main/README.md
Normal file
29
E-Learning-Admin-frontend-main/README.md
Normal file
@ -0,0 +1,29 @@
|
||||
# E-Learning-Admin-frontend
|
||||
# https://admin.a-phy.com
|
||||
|
||||
Step 1: Install Node.js
|
||||
|
||||
To use Angular, Node.js must be installed on your machine. Please download the latest version of Node.js from the official website: https://nodejs.org/en/download/ (select Node.js version 16 or higher).
|
||||
|
||||
Step 2: Install Angular CLI
|
||||
|
||||
The Angular CLI (Command Line Interface) is a tool used for creating and managing Angular projects. To install the Angular CLI, simply open a terminal or command prompt and enter the following command:
|
||||
npm install -g @angular/cli (currently our angular version is 9.1.11)
|
||||
|
||||
Step 3: Install project dependencies
|
||||
|
||||
Go to the project directory and execute the following command to install the necessary project dependencies:
|
||||
npm install
|
||||
|
||||
Step 4: Run the project
|
||||
|
||||
Once the dependencies are installed, run the project using the following command:
|
||||
ng serve
|
||||
This will compile the project and start a local development server at http://localhost:4200/. Open a web browser and navigate to http://localhost:4200/ to view the application
|
||||
That's it! You should now be able to run the existing Angular code on your local machine.
|
||||
|
||||
Step 5: Build Angular Project
|
||||
|
||||
Build your Angular application using the CLI. Run the following command:
|
||||
npm run prod
|
||||
This command will generate a build of your application in the 'dist' folder within your project directory. After the build process is complete, you can deploy your application by copying the contents of the 'dist' folder to your web server or cloud hosting service.
|
||||
128
E-Learning-Admin-frontend-main/angular.json
Normal file
128
E-Learning-Admin-frontend-main/angular.json
Normal file
@ -0,0 +1,128 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"CisspAdmin": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-devkit/build-angular:browser",
|
||||
"options": {
|
||||
"outputPath": "dist/CisspAdmin",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"aot": true,
|
||||
"assets": ["src/favicon.ico", "src/assets", "src/web.config"],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
||||
"node_modules/sweetalert2/src/sweetalert2.scss",
|
||||
"node_modules/ngx-toastr/toastr.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"extractCss": true,
|
||||
"namedChunks": false,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "80mb",
|
||||
"maximumError": "80mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "80mb",
|
||||
"maximumError": "80mb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-devkit/build-angular:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "CisspAdmin:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "CisspAdmin:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "CisspAdmin:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-devkit/build-angular:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": ["src/favicon.ico", "src/assets", "src/web.config"],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/deeppurple-amber.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": []
|
||||
}
|
||||
},
|
||||
"lint": {
|
||||
"builder": "@angular-devkit/build-angular:tslint",
|
||||
"options": {
|
||||
"tsConfig": [
|
||||
"tsconfig.app.json",
|
||||
"tsconfig.spec.json",
|
||||
"e2e/tsconfig.json"
|
||||
],
|
||||
"exclude": ["**/node_modules/**"]
|
||||
}
|
||||
},
|
||||
"e2e": {
|
||||
"builder": "@angular-devkit/build-angular:protractor",
|
||||
"options": {
|
||||
"protractorConfig": "e2e/protractor.conf.js",
|
||||
"devServerTarget": "CisspAdmin:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "CisspAdmin:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "CisspAdmin",
|
||||
"cli": {
|
||||
"analytics": "519e2d8b-c59d-4768-ba6e-b413909df5a5"
|
||||
}
|
||||
}
|
||||
12
E-Learning-Admin-frontend-main/browserslist
Normal file
12
E-Learning-Admin-frontend-main/browserslist
Normal file
@ -0,0 +1,12 @@
|
||||
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
|
||||
# For additional information regarding the format and rule options, please see:
|
||||
# https://github.com/browserslist/browserslist#queries
|
||||
|
||||
# You can see what browsers were selected by your queries by running:
|
||||
# npx browserslist
|
||||
|
||||
> 0.5%
|
||||
last 2 versions
|
||||
Firefox ESR
|
||||
not dead
|
||||
not IE 9-11 # For IE 9-11 support, remove 'not'.
|
||||
32
E-Learning-Admin-frontend-main/e2e/protractor.conf.js
Normal file
32
E-Learning-Admin-frontend-main/e2e/protractor.conf.js
Normal file
@ -0,0 +1,32 @@
|
||||
// @ts-check
|
||||
// Protractor configuration file, see link for more information
|
||||
// https://github.com/angular/protractor/blob/master/lib/config.ts
|
||||
|
||||
const { SpecReporter } = require('jasmine-spec-reporter');
|
||||
|
||||
/**
|
||||
* @type { import("protractor").Config }
|
||||
*/
|
||||
exports.config = {
|
||||
allScriptsTimeout: 11000,
|
||||
specs: [
|
||||
'./src/**/*.e2e-spec.ts'
|
||||
],
|
||||
capabilities: {
|
||||
browserName: 'chrome'
|
||||
},
|
||||
directConnect: true,
|
||||
baseUrl: 'http://localhost:4200/',
|
||||
framework: 'jasmine',
|
||||
jasmineNodeOpts: {
|
||||
showColors: true,
|
||||
defaultTimeoutInterval: 30000,
|
||||
print: function () { }
|
||||
},
|
||||
onPrepare() {
|
||||
require('ts-node').register({
|
||||
project: require('path').join(__dirname, './tsconfig.json')
|
||||
});
|
||||
jasmine.getEnv().addReporter(new SpecReporter({ spec: { displayStacktrace: true } }));
|
||||
}
|
||||
};
|
||||
23
E-Learning-Admin-frontend-main/e2e/src/app.e2e-spec.ts
Normal file
23
E-Learning-Admin-frontend-main/e2e/src/app.e2e-spec.ts
Normal file
@ -0,0 +1,23 @@
|
||||
import { AppPage } from './app.po';
|
||||
import { browser, logging } from 'protractor';
|
||||
|
||||
describe('workspace-project App', () => {
|
||||
let page: AppPage;
|
||||
|
||||
beforeEach(() => {
|
||||
page = new AppPage();
|
||||
});
|
||||
|
||||
it('should display welcome message', () => {
|
||||
page.navigateTo();
|
||||
expect(page.getTitleText()).toEqual('CisspAdmin app is running!');
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
// Assert that there are no errors emitted from the browser
|
||||
const logs = await browser.manage().logs().get(logging.Type.BROWSER);
|
||||
expect(logs).not.toContain(jasmine.objectContaining({
|
||||
level: logging.Level.SEVERE,
|
||||
} as logging.Entry));
|
||||
});
|
||||
});
|
||||
11
E-Learning-Admin-frontend-main/e2e/src/app.po.ts
Normal file
11
E-Learning-Admin-frontend-main/e2e/src/app.po.ts
Normal file
@ -0,0 +1,11 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo(): Promise<unknown> {
|
||||
return browser.get(browser.baseUrl) as Promise<unknown>;
|
||||
}
|
||||
|
||||
getTitleText(): Promise<string> {
|
||||
return element(by.css('app-root .content span')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
13
E-Learning-Admin-frontend-main/e2e/tsconfig.json
Normal file
13
E-Learning-Admin-frontend-main/e2e/tsconfig.json
Normal file
@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es5",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
32
E-Learning-Admin-frontend-main/karma.conf.js
Normal file
32
E-Learning-Admin-frontend-main/karma.conf.js
Normal file
@ -0,0 +1,32 @@
|
||||
// Karma configuration file, see link for more information
|
||||
// https://karma-runner.github.io/1.0/config/configuration-file.html
|
||||
|
||||
module.exports = function (config) {
|
||||
config.set({
|
||||
basePath: '',
|
||||
frameworks: ['jasmine', '@angular-devkit/build-angular'],
|
||||
plugins: [
|
||||
require('karma-jasmine'),
|
||||
require('karma-chrome-launcher'),
|
||||
require('karma-jasmine-html-reporter'),
|
||||
require('karma-coverage-istanbul-reporter'),
|
||||
require('@angular-devkit/build-angular/plugins/karma')
|
||||
],
|
||||
client: {
|
||||
clearContext: false // leave Jasmine Spec Runner output visible in browser
|
||||
},
|
||||
coverageIstanbulReporter: {
|
||||
dir: require('path').join(__dirname, './coverage/CisspAdmin'),
|
||||
reports: ['html', 'lcovonly', 'text-summary'],
|
||||
fixWebpackSourcePaths: true
|
||||
},
|
||||
reporters: ['progress', 'kjhtml'],
|
||||
port: 9876,
|
||||
colors: true,
|
||||
logLevel: config.LOG_INFO,
|
||||
autoWatch: true,
|
||||
browsers: ['Chrome'],
|
||||
singleRun: false,
|
||||
restartOnFileChange: true
|
||||
});
|
||||
};
|
||||
38098
E-Learning-Admin-frontend-main/package-lock.json
generated
Normal file
38098
E-Learning-Admin-frontend-main/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
84
E-Learning-Admin-frontend-main/package.json
Normal file
84
E-Learning-Admin-frontend-main/package.json
Normal file
@ -0,0 +1,84 @@
|
||||
{
|
||||
"name": "cissp-admin",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"prod": "node --max_old_space_size=16000 ./node_modules/@angular/cli/bin/ng build --prod --build-optimizer --output-hashing=none",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~9.1.11",
|
||||
"@angular/cdk": "^9.2.4",
|
||||
"@angular/common": "~9.1.11",
|
||||
"@angular/compiler": "~9.1.11",
|
||||
"@angular/core": "~9.1.11",
|
||||
"@angular/forms": "~9.1.11",
|
||||
"@angular/http": "^7.2.16",
|
||||
"@angular/localize": "~9.1.11",
|
||||
"@angular/material": "^9.2.4",
|
||||
"@angular/platform-browser": "~9.1.11",
|
||||
"@angular/platform-browser-dynamic": "~9.1.11",
|
||||
"@angular/router": "~9.1.11",
|
||||
"@blowstack/ckeditor5-full-free-build": "^27.0.1",
|
||||
"@ckeditor/ckeditor5-angular": "^2.0.1",
|
||||
"@ng-select/ng-select": "^4.0.4",
|
||||
"@techiediaries/ngx-qrcode": "^9.1.0",
|
||||
"amazon-chime-sdk-js": "^2.13.0",
|
||||
"angularx-qrcode": "^11.0.0",
|
||||
"aws-amplify": "^3.0.17",
|
||||
"aws-amplify-angular": "^5.0.17",
|
||||
"aws-sdk": "^2.983.0",
|
||||
"chart.js": "^2.9.4",
|
||||
"ckeditor4": "^4.20.1",
|
||||
"ckeditor4-angular": "^3.2.1",
|
||||
"crypto-js": "^3.3.0",
|
||||
"exceljs": "^4.3.0",
|
||||
"file-saver": "^2.0.5",
|
||||
"html-to-image": "^1.6.2",
|
||||
"html2canvas": "^1.4.1",
|
||||
"jspdf": "^2.5.1",
|
||||
"lib-jitsi-meet-dist": "^2.1.5",
|
||||
"moment-timezone-picker": "^2.1.1",
|
||||
"ng-otp-input": "^1.8.1",
|
||||
"ng2-charts": "^2.4.3",
|
||||
"ngx-dropzone": "^3.0.0",
|
||||
"ngx-emoji-picker": "^0.1.6",
|
||||
"ngx-infinite-scroll": "^10.0.1",
|
||||
"ngx-kjua": "^1.12.3",
|
||||
"ngx-spinner": "^9.0.2",
|
||||
"ngx-toastr": "^13.0.0",
|
||||
"rxjs": "~6.5.4",
|
||||
"sweetalert2": "^9.15.1",
|
||||
"tslib": "^1.10.0",
|
||||
"twemoji": "^13.1.0",
|
||||
"uuid": "^9.0.0",
|
||||
"xlsx": "^0.16.8",
|
||||
"zone.js": "~0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-devkit/build-angular": "^0.901.13",
|
||||
"@angular/cli": "~9.1.8",
|
||||
"@angular/compiler-cli": "~9.1.11",
|
||||
"@types/crypto-js": "^4.0.2",
|
||||
"@types/jasmine": "~3.5.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "^12.11.1",
|
||||
"codelyzer": "^5.1.2",
|
||||
"jasmine-core": "~3.5.0",
|
||||
"jasmine-spec-reporter": "~4.2.1",
|
||||
"karma": "~5.0.0",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~2.1.0",
|
||||
"karma-jasmine": "~3.0.1",
|
||||
"karma-jasmine-html-reporter": "^1.4.2",
|
||||
"protractor": "~7.0.0",
|
||||
"ts-node": "~8.3.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~3.8.3"
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,59 @@
|
||||
<div class="main-addstudent">
|
||||
<p>
|
||||
Add Student In <span>{{ CohortName }}</span>
|
||||
</p>
|
||||
<div class="pagesearch">
|
||||
<input type="search" name="search" id="SearchTeamName" [(ngModel)]="SearchUser" class="search" placeholder="Search" (ngModelChange)="search()" />
|
||||
<button *ngIf="Userlistdata.length == 0" (click)="AddStudent()">+</button>
|
||||
</div>
|
||||
<div class="select-cohort">
|
||||
<div class="div-body">
|
||||
<p>All Students</p>
|
||||
<div class="all-select">
|
||||
<label class="container-checkbox">Select All
|
||||
<input
|
||||
type="checkbox"
|
||||
(change)="selectall($event)"
|
||||
id="selectcheck"
|
||||
/>
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
</div>
|
||||
|
||||
<label class="container-checkbox" *ngFor="let item of Userlistdata; let i = index">{{ item.name }}({{ item.email }})
|
||||
<input
|
||||
type="checkbox"
|
||||
id="Addstudnet{{ i }}"
|
||||
(change)="UserSelect($event, item)"
|
||||
[checked]="item.check"
|
||||
/>
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
</div>
|
||||
<div class="div-body">
|
||||
<p>Selected Students</p>
|
||||
<label class="container-checkbox" *ngFor="let item of SelectedUsers; let i = index">{{ item.name }}({{ item.email }})
|
||||
<input
|
||||
type="checkbox"
|
||||
id="Addstudnet{{ i }}"
|
||||
(change)="UserSelect($event, item)"
|
||||
[checked]="item.check"
|
||||
/>
|
||||
<span class="checkmark"></span>
|
||||
</label>
|
||||
<br />
|
||||
<br />
|
||||
<br />
|
||||
<p *ngIf="SelectedUsers.length <= 0">
|
||||
There is no students in this cohort
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="btn-div">
|
||||
<button mat-button color="primary" (click)="submit()">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b" type="line-spin-fade" [fullScreen]="true">
|
||||
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,208 @@
|
||||
.mat-button.mat-primary {
|
||||
background-color: #3f51b5 !important;
|
||||
color: #fff;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.main-addstudent {
|
||||
padding: 10px;
|
||||
margin: 10px;
|
||||
}
|
||||
|
||||
.main-addstudent {
|
||||
background-color: #766daa36;
|
||||
border-radius: 5px;
|
||||
.div-body {
|
||||
|
||||
height: 63vh;
|
||||
overflow-y: scroll;
|
||||
&::-webkit-scrollbar {
|
||||
width: 5px;
|
||||
}
|
||||
&::-webkit-scrollbar-track {
|
||||
background-color: #ebebeb;
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
&::-webkit-scrollbar-thumb {
|
||||
-webkit-border-radius: 0;
|
||||
border-radius: 0;
|
||||
background: #090d28c0;
|
||||
}
|
||||
}
|
||||
p {
|
||||
font-size: 24px;
|
||||
color: #E684AD;
|
||||
span{
|
||||
color: #db84e6;
|
||||
}
|
||||
}
|
||||
.pagesearch {
|
||||
margin-bottom: 10px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
input {
|
||||
background: transparent;
|
||||
border: 1px solid #766daa;
|
||||
padding: 7px 10px;
|
||||
border-left: 3px solid #766daa;
|
||||
color: #fff;
|
||||
outline: none;
|
||||
width: 50%;
|
||||
}
|
||||
button{
|
||||
border: none;
|
||||
padding: 3px 10px;
|
||||
margin: 0 10px;
|
||||
font-size: 23px;
|
||||
background: #766daa54;
|
||||
border-radius: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
.select-cohort{
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.div-body{
|
||||
width: 49%;
|
||||
p{
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
.ng-star-inserted {
|
||||
margin: 6px 30px 6px 0;
|
||||
background: #766daa54;
|
||||
padding: 5px;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
transition: all .2s;
|
||||
align-items: center;
|
||||
&:hover {
|
||||
background: #e684ad52;
|
||||
box-shadow: 0px 0px 10px -5px #E684AD;
|
||||
}
|
||||
}
|
||||
.btn-div {
|
||||
button {
|
||||
margin: 5px 0;
|
||||
}
|
||||
}
|
||||
.all-select {
|
||||
.container-checkbox .checkmark {
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
/* The container */
|
||||
.container-checkbox {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-left: 35px;
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
/* Hide the browser's default checkbox */
|
||||
.container-checkbox input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
left: 8px;
|
||||
}
|
||||
/* Create a custom checkbox */
|
||||
.container-checkbox .checkmark {
|
||||
position: absolute;
|
||||
top: 5px;
|
||||
left: 8px;
|
||||
height: 20px;
|
||||
width: 20px;
|
||||
background-color: #766daa;
|
||||
border-radius: 5px;
|
||||
}
|
||||
/* On mouse-over, add a grey background color */
|
||||
.container-checkbox:hover input~.checkmark {
|
||||
background-color: #ccc;
|
||||
}
|
||||
/* When the checkbox is checked, add a blue background */
|
||||
.container-checkbox input:checked~.checkmark {
|
||||
background-color: #E684AD;
|
||||
}
|
||||
/* Create the checkmark/indicator (hidden when not checked) */
|
||||
.container-checkbox .checkmark:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
/* Show the checkmark when checked */
|
||||
.container-checkbox input:checked~.checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
/* Style the checkmark/indicator */
|
||||
.container-checkbox .checkmark:after {
|
||||
left: 7px;
|
||||
top: 4px;
|
||||
width: 3px;
|
||||
height: 8px;
|
||||
border: solid white;
|
||||
border-width: 0 3px 3px 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
/* The container */
|
||||
.container-radio {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-left: 35px;
|
||||
margin-bottom: 12px;
|
||||
cursor: pointer;
|
||||
font-size: 22px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
/* Hide the browser's default radio button */
|
||||
.container-radio input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
/* Create a custom radio button */
|
||||
.container-radio .checkmark {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 25px;
|
||||
width: 25px;
|
||||
background-color: #eee;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
/* When the radio button is checked, add a blue background */
|
||||
.container-radio input:checked~.checkmark {
|
||||
background-color: #2196F3;
|
||||
}
|
||||
/* Create the indicator (the dot/circle - hidden when not checked) */
|
||||
.container-radio .checkmark:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
/* Show the indicator (dot/circle) when checked */
|
||||
.container-radio input:checked~.checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
/* Style the indicator (dot/circle) */
|
||||
.container-radio .checkmark:after {
|
||||
top: 9px;
|
||||
left: 9px;
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
border-radius: 50%;
|
||||
background: white;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AddstudentcohortComponent } from './addstudentcohort.component';
|
||||
|
||||
describe('AddstudentcohortComponent', () => {
|
||||
let component: AddstudentcohortComponent;
|
||||
let fixture: ComponentFixture<AddstudentcohortComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AddstudentcohortComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AddstudentcohortComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,246 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { ServicesService } from '../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { AuthorizationService } from '../service/authorization.service';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { ClientService } from '../services/client/client.service';
|
||||
import { CohortService } from '../services/cohort/cohort.service';
|
||||
import { EmailService } from '../services/email/email.service';
|
||||
@Component({
|
||||
selector: 'app-addstudentcohort',
|
||||
templateUrl: './addstudentcohort.component.html',
|
||||
styleUrls: ['./addstudentcohort.component.scss']
|
||||
})
|
||||
export class AddstudentcohortComponent implements OnInit {
|
||||
id: any;
|
||||
Userlistdata = [];
|
||||
Search: any;
|
||||
idcohort = [];
|
||||
SearchFilter = [];
|
||||
selectallcheck = false;
|
||||
SearchUser: any
|
||||
SelectedUsers = [];
|
||||
CohortName: any;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
constructor(public emailService: EmailService, public cohortService: CohortService, public clientService: ClientService, public ActiveRoute: ActivatedRoute, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService) {
|
||||
var setlogin = this.auth.isLoggedIn();
|
||||
if (!setlogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
this.ActiveRoute.params.subscribe(async (params) => {
|
||||
try {
|
||||
this.id = params['id'];
|
||||
} catch (error) {
|
||||
this.router.navigate(['/main/liveclass']);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
async ngOnInit() {
|
||||
await this.spinner.show();
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.listuser();
|
||||
await this.cohortService.IdCohort(this.id, token).then(async (value) => {
|
||||
var idcohort = JSON.parse(<string>value[0].json)
|
||||
this.CohortName = idcohort.data[0].cohort_name;
|
||||
this.idcohort = idcohort.data[0].userslist
|
||||
if (this.Userlistdata.length > 0) {
|
||||
await this.Userlistdata.forEach(async (element) => {
|
||||
var count = 0;
|
||||
if (this.idcohort.length > 0) {
|
||||
await this.idcohort.forEach(elementuser => {
|
||||
if (elementuser == element.id) {
|
||||
count = 1;
|
||||
}
|
||||
});
|
||||
if (count == 1) {
|
||||
element['check'] = true;
|
||||
}
|
||||
else {
|
||||
element['check'] = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
this.SearchFilter = [];
|
||||
this.SearchFilter = this.Userlistdata;
|
||||
this.SelectedUsers = this.Userlistdata.filter(function (e) {
|
||||
return e.check == true;
|
||||
});
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async listuser() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.clientService.Listuser(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Userlistdata = list.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
async selectall(event) {
|
||||
if (event.target.checked) {
|
||||
this.Userlistdata.forEach(element => {
|
||||
element['check'] = true;
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.Userlistdata.forEach(element => {
|
||||
element['check'] = false;
|
||||
});
|
||||
}
|
||||
this.SelectedUsers = this.Userlistdata.filter(function (e) {
|
||||
return e.check == true;
|
||||
});
|
||||
}
|
||||
async UserSelect(event, data) {
|
||||
if (event.target.checked) {
|
||||
data.check = true;
|
||||
}
|
||||
else {
|
||||
data.check = false;
|
||||
}
|
||||
var count = 0;
|
||||
for (let i = 0; i < this.Userlistdata.length; i++) {
|
||||
if (this.Userlistdata[i].check == false) {
|
||||
count = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (count == 1) {
|
||||
this.selectallcheck = false;
|
||||
}
|
||||
else {
|
||||
this.selectallcheck = true;
|
||||
}
|
||||
this.SelectedUsers = this.Userlistdata.filter(function (e) {
|
||||
return e.check == true;
|
||||
});
|
||||
}
|
||||
search() {
|
||||
if (this.SearchUser && this.SearchUser.trim() != '') {
|
||||
this.Userlistdata = this.SearchFilter.filter((item) => {
|
||||
if (item.email != "" && item.email != undefined && item.email != null) {
|
||||
return (
|
||||
item.email.toLowerCase().indexOf(this.SearchUser.toLowerCase()) > -1 ||
|
||||
item.name.toLowerCase().indexOf(this.SearchUser.toLowerCase()) > -1
|
||||
);
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
this.Userlistdata = this.SearchFilter;
|
||||
}
|
||||
}
|
||||
async submit() {
|
||||
try {
|
||||
this.spinner.show();
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var UserpushId = "";
|
||||
var Emails = "";
|
||||
await this.SearchFilter.forEach(element => {
|
||||
if (element.check == true) {
|
||||
UserpushId = UserpushId + element.id + ',';
|
||||
Emails = Emails + element.email + ', ';
|
||||
}
|
||||
});
|
||||
if (UserpushId.endsWith(",") == true) {
|
||||
UserpushId = UserpushId.substring(0, UserpushId.length - 1);
|
||||
}
|
||||
if (Emails.endsWith(",") == true) {
|
||||
Emails = Emails.substring(0, Emails.length - 2);
|
||||
}
|
||||
await this.cohortService.EditCohortuser(UserpushId, this.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "Following users <span>" + Emails + "</span> is updated in " + this.CohortName + " by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "addstudentcohort", this.id, token);
|
||||
}
|
||||
});
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess(list.message);
|
||||
this.router.navigate(['main/liveclass']);
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async AddStudent() {
|
||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
if (!re.test(this.SearchUser)) {
|
||||
this.service.ShowError("Please enter a valid email!")
|
||||
return
|
||||
}
|
||||
else {
|
||||
await this.spinner.show();
|
||||
await this.auth.CreateUser(this.SearchUser).then(async (data) => {
|
||||
if (data[0].StatusCode == 1) {
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(data[0].message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
getOrdinal(n) {
|
||||
let ord = [, 'st', 'nd', 'rd'];
|
||||
let exceptions = [11, 12, 13];
|
||||
let nth = ((ord[n % 100] == undefined) || (exceptions.includes(n % 100))) ? 'th' : ord[n % 100];
|
||||
return n + nth;
|
||||
}
|
||||
}
|
||||
22
E-Learning-Admin-frontend-main/src/app/app-routing.module.ts
Normal file
22
E-Learning-Admin-frontend-main/src/app/app-routing.module.ts
Normal file
@ -0,0 +1,22 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { Routes, RouterModule } from '@angular/router';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { AuthorizationService } from './service/authorization.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { ServicesService } from './services.service';
|
||||
const routes: Routes = [
|
||||
{ path: '', component: LoginComponent },
|
||||
{ path: 'login', component: LoginComponent },
|
||||
];
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes,{useHash:true})],
|
||||
exports: [RouterModule]
|
||||
})
|
||||
export class AppRoutingModule {
|
||||
constructor(public router: Router, public auth: AuthorizationService, public service: ServicesService) {
|
||||
var login = window.sessionStorage.getItem("logintrue");
|
||||
if (!login) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
}
|
||||
310
E-Learning-Admin-frontend-main/src/app/app.component.html
Normal file
310
E-Learning-Admin-frontend-main/src/app/app.component.html
Normal file
@ -0,0 +1,310 @@
|
||||
<style>
|
||||
:host {
|
||||
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
|
||||
font-size: 14px;
|
||||
color: #333;
|
||||
box-sizing: border-box;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
}
|
||||
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4,
|
||||
h5,
|
||||
h6 {
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.spacer {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 60px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
background-color: #1976d2;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.toolbar img {
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.toolbar #twitter-logo {
|
||||
height: 40px;
|
||||
margin: 0 16px;
|
||||
}
|
||||
|
||||
.toolbar #twitter-logo:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
|
||||
.content {
|
||||
display: flex;
|
||||
margin: 82px auto 32px;
|
||||
padding: 0 16px;
|
||||
max-width: 960px;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
svg.material-icons {
|
||||
height: 24px;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
svg.material-icons:not(:last-child) {
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.card svg.material-icons path {
|
||||
fill: #888;
|
||||
}
|
||||
|
||||
.card-container {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
margin-top: 16px;
|
||||
}
|
||||
|
||||
.card {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #eee;
|
||||
background-color: #fafafa;
|
||||
height: 40px;
|
||||
width: 200px;
|
||||
margin: 0 8px 16px;
|
||||
padding: 16px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
transition: all 0.2s ease-in-out;
|
||||
line-height: 24px;
|
||||
}
|
||||
|
||||
.card-container .card:not(:last-child) {
|
||||
margin-right: 0;
|
||||
}
|
||||
|
||||
.card.card-small {
|
||||
height: 16px;
|
||||
width: 168px;
|
||||
}
|
||||
|
||||
.card-container .card:not(.highlight-card) {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.card-container .card:not(.highlight-card):hover {
|
||||
transform: translateY(-3px);
|
||||
box-shadow: 0 4px 17px rgba(0, 0, 0, 0.35);
|
||||
}
|
||||
|
||||
.card-container .card:not(.highlight-card):hover .material-icons path {
|
||||
fill: rgb(105, 103, 103);
|
||||
}
|
||||
|
||||
.card.highlight-card {
|
||||
background-color: #1976d2;
|
||||
color: white;
|
||||
font-weight: 600;
|
||||
border: none;
|
||||
width: auto;
|
||||
min-width: 30%;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.card.card.highlight-card span {
|
||||
margin-left: 60px;
|
||||
}
|
||||
|
||||
svg#rocket {
|
||||
width: 80px;
|
||||
position: absolute;
|
||||
left: -10px;
|
||||
top: -24px;
|
||||
}
|
||||
|
||||
svg#rocket-smoke {
|
||||
height: calc(100vh - 95px);
|
||||
position: absolute;
|
||||
top: 10px;
|
||||
right: 180px;
|
||||
z-index: -10;
|
||||
}
|
||||
|
||||
a,
|
||||
a:visited,
|
||||
a:hover {
|
||||
color: #1976d2;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #125699;
|
||||
}
|
||||
|
||||
.terminal {
|
||||
position: relative;
|
||||
width: 80%;
|
||||
max-width: 600px;
|
||||
border-radius: 6px;
|
||||
padding-top: 45px;
|
||||
margin-top: 8px;
|
||||
overflow: hidden;
|
||||
background-color: rgb(15, 15, 16);
|
||||
}
|
||||
|
||||
.terminal::before {
|
||||
content: "\2022 \2022 \2022";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 4px;
|
||||
background: rgb(58, 58, 58);
|
||||
color: #c2c3c4;
|
||||
width: 100%;
|
||||
font-size: 2rem;
|
||||
line-height: 0;
|
||||
padding: 14px 0;
|
||||
text-indent: 4px;
|
||||
}
|
||||
|
||||
.terminal pre {
|
||||
font-family: SFMono-Regular, Consolas, Liberation Mono, Menlo, monospace;
|
||||
color: white;
|
||||
padding: 0 1rem 1rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.circle-link {
|
||||
height: 40px;
|
||||
width: 40px;
|
||||
border-radius: 40px;
|
||||
margin: 8px;
|
||||
background-color: white;
|
||||
border: 1px solid #eeeeee;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
cursor: pointer;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
|
||||
transition: 1s ease-out;
|
||||
}
|
||||
|
||||
.circle-link:hover {
|
||||
transform: translateY(-0.25rem);
|
||||
box-shadow: 0px 3px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
|
||||
footer {
|
||||
margin-top: 8px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
|
||||
footer a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.github-star-badge {
|
||||
color: #24292e;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
font-size: 12px;
|
||||
padding: 3px 10px;
|
||||
border: 1px solid rgba(27, 31, 35, .2);
|
||||
border-radius: 3px;
|
||||
background-image: linear-gradient(-180deg, #fafbfc, #eff3f6 90%);
|
||||
margin-left: 4px;
|
||||
font-weight: 600;
|
||||
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol;
|
||||
}
|
||||
|
||||
.github-star-badge:hover {
|
||||
background-image: linear-gradient(-180deg, #f0f3f6, #e6ebf1 90%);
|
||||
border-color: rgba(27, 31, 35, .35);
|
||||
background-position: -.5em;
|
||||
}
|
||||
|
||||
.github-star-badge .material-icons {
|
||||
height: 16px;
|
||||
width: 16px;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
svg#clouds {
|
||||
position: fixed;
|
||||
bottom: -160px;
|
||||
left: -230px;
|
||||
z-index: -10;
|
||||
width: 1920px;
|
||||
}
|
||||
|
||||
/* Responsive Styles */
|
||||
|
||||
@media screen and (max-width: 767px) {
|
||||
|
||||
.card-container>*:not(.circle-link),
|
||||
.terminal {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.card:not(.highlight-card) {
|
||||
height: 16px;
|
||||
margin: 8px 0;
|
||||
}
|
||||
|
||||
.card.highlight-card span {
|
||||
margin-left: 72px;
|
||||
}
|
||||
|
||||
svg#rocket-smoke {
|
||||
right: 120px;
|
||||
transform: rotate(-5deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 575px) {
|
||||
svg#rocket-smoke {
|
||||
display: none;
|
||||
visibility: hidden;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
<router-outlet></router-outlet>
|
||||
<div class="reset-result" *ngIf="service.ErrorPopup">
|
||||
<div class="result-body">
|
||||
<div class="containt">
|
||||
<span class="material-icons-outlined">
|
||||
<img src="../assets/images/Error-icon.png">
|
||||
</span>
|
||||
<h4>
|
||||
Oops!
|
||||
</h4>
|
||||
<p>
|
||||
{{service.ErrorMessage}}
|
||||
</p>
|
||||
<div class="reset-btns">
|
||||
<button (click)="service.ErrorPopup=false">Ok</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
76
E-Learning-Admin-frontend-main/src/app/app.component.scss
Normal file
76
E-Learning-Admin-frontend-main/src/app/app.component.scss
Normal file
@ -0,0 +1,76 @@
|
||||
.reset-result {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
background: transparent;
|
||||
z-index: 111111111;
|
||||
.result-body {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, -50%);
|
||||
width: 330px;
|
||||
min-height: 275px;
|
||||
padding: 27px 35px 15px;
|
||||
border: 1px solid #000000;
|
||||
background: #fff;
|
||||
border-radius: 10px;
|
||||
box-shadow: 0px 9px 46px -20px #DF166A;
|
||||
padding-top: 60px;
|
||||
.containt {
|
||||
text-align: center;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
span {
|
||||
img {
|
||||
width: 85px;
|
||||
}
|
||||
}
|
||||
}
|
||||
h4 {
|
||||
color: #DF166A;
|
||||
font-size: 23px;
|
||||
font-weight: 500;
|
||||
margin: 18px 0 8px;
|
||||
span {
|
||||
color: #DF166A;
|
||||
}
|
||||
}
|
||||
p {
|
||||
color: #000000;
|
||||
font-size: 14px;
|
||||
margin-bottom: 25px;
|
||||
letter-spacing: 1px;
|
||||
font-weight: 600;
|
||||
}
|
||||
.reset-btns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
button {
|
||||
border: 1px solid #595590;
|
||||
padding: 10px 41px;
|
||||
border-radius: 0px;
|
||||
font-size: 15px;
|
||||
cursor: pointer;
|
||||
min-width: 140px;
|
||||
&:first-child {
|
||||
background: none;
|
||||
color: #595590;
|
||||
}
|
||||
&:last-child {
|
||||
// background: linear-gradient(94deg, rgba(238, 77, 126, 1) 0%, rgba(238, 131, 80, 1) 100%);
|
||||
background: #DF166A;
|
||||
border-color: transparent;
|
||||
color: #fff;
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
35
E-Learning-Admin-frontend-main/src/app/app.component.spec.ts
Normal file
35
E-Learning-Admin-frontend-main/src/app/app.component.spec.ts
Normal file
@ -0,0 +1,35 @@
|
||||
import { TestBed, async } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'CisspAdmin'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.componentInstance;
|
||||
expect(app.title).toEqual('CisspAdmin');
|
||||
});
|
||||
|
||||
it('should render title', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.nativeElement;
|
||||
expect(compiled.querySelector('.content span').textContent).toContain('CisspAdmin app is running!');
|
||||
});
|
||||
});
|
||||
14
E-Learning-Admin-frontend-main/src/app/app.component.ts
Normal file
14
E-Learning-Admin-frontend-main/src/app/app.component.ts
Normal file
@ -0,0 +1,14 @@
|
||||
import { Component, OnInit } from '@angular/core'
|
||||
import { ServicesService } from './services.service';
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
})
|
||||
export class AppComponent implements OnInit {
|
||||
title = 'Destination Certification - Admin';
|
||||
constructor(public service: ServicesService) { }
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
}
|
||||
444
E-Learning-Admin-frontend-main/src/app/app.module.ts
Normal file
444
E-Learning-Admin-frontend-main/src/app/app.module.ts
Normal file
@ -0,0 +1,444 @@
|
||||
import { BrowserModule } from '@angular/platform-browser';
|
||||
import { NgModule } from '@angular/core';
|
||||
|
||||
import { AppRoutingModule } from './app-routing.module';
|
||||
import { AppComponent } from './app.component';
|
||||
import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { MatListModule } from '@angular/material/list';
|
||||
import { MatSidenavModule } from '@angular/material/sidenav';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { MatToolbarModule } from '@angular/material/toolbar';
|
||||
import { MatInputModule } from '@angular/material/input';
|
||||
|
||||
import { RouterModule, Routes } from '@angular/router';
|
||||
import { LoginLayoutComponent } from './login-layout/login-layout.component';
|
||||
import { HomeLayoutComponent } from './home-layout/home-layout.component';
|
||||
import { LoginComponent } from './login/login.component';
|
||||
import { NavigationComponent } from './navigation/navigation.component';
|
||||
import { StudentComponent } from './pages/student/student.component';
|
||||
import { FlashcardComponent } from './pages/flashcard/flashcard.component';
|
||||
import { StudymaterialComponent } from './pages/studymaterial/studymaterial.component';
|
||||
import { MatTableModule } from '@angular/material/table';
|
||||
import { MatPaginatorModule } from '@angular/material/paginator';
|
||||
import { MatSortModule } from '@angular/material/sort';
|
||||
import { MatCheckboxModule } from '@angular/material/checkbox';
|
||||
|
||||
import { CKEditorModule } from 'ckeditor4-angular';
|
||||
import { CertificateComponent } from './pages/certificate/certificate.component';
|
||||
import { CoursesComponent } from './pages/courses/courses.component';
|
||||
import { CohortsComponent } from './pages/cohorts/cohorts.component';
|
||||
import { DomainsComponent } from './pages/domains/domains.component';
|
||||
import { SubdomainsComponent } from './pages/subdomains/subdomains.component';
|
||||
import { TopicsComponent } from './pages/topics/topics.component';
|
||||
import { SendmailComponent } from './pages/sendmail/sendmail.component';
|
||||
import { PracticeappqueComponent } from './pages/practiceappque/practiceappque.component';
|
||||
import { CreatepracticequeComponent } from './pages/practiceappque/createpracticeque/createpracticeque.component';
|
||||
import { DashboardComponent } from './pages/dashboard/dashboard.component';
|
||||
import { HttpClientModule } from '@angular/common/http';
|
||||
import { HttpModule } from '@angular/http';
|
||||
import { ServicesService } from './services.service';
|
||||
import { NgxSpinnerModule } from 'ngx-spinner';
|
||||
import { FormsModule } from '@angular/forms';
|
||||
import { ReactiveFormsModule } from '@angular/forms';
|
||||
import { ToastrModule } from 'ngx-toastr';
|
||||
import { KnowlegeassComponent } from './pages/knowlegeass/knowlegeass.component';
|
||||
import { KnowlegeassquesComponent } from './pages/knowlegeassques/knowlegeassques.component';
|
||||
import { MatAutocompleteModule } from '@angular/material/autocomplete';
|
||||
import { MatChipsModule } from '@angular/material/chips';
|
||||
import { PracticetestsComponent } from './pages/practicetests/practicetests.component';
|
||||
import { PracticetestsqueComponent } from './pages/practicetests/practicetestsque/practicetestsque.component';
|
||||
import { PracticequestionComponent } from './pages/practicequestion/practicequestion.component';
|
||||
import { AuthorizationService } from './service/authorization.service';
|
||||
import { NgSelectModule } from '@ng-select/ng-select';
|
||||
import { AddstudentcohortComponent } from './addstudentcohort/addstudentcohort.component';
|
||||
import { CateexamtestComponent } from './pages/cateexamtest/cateexamtest.component';
|
||||
import { CateexamtestquestionComponent } from './pages/cateexamtestquestion/cateexamtestquestion.component';
|
||||
import { LivequestionComponent } from './pages/livequestion/livequestion.component';
|
||||
import { AddlivequestionComponent } from './pages/livequestion/addlivequestion/addlivequestion.component';
|
||||
import { AcronymsComponent } from './pages/acronyms/acronyms.component';
|
||||
import { ApplicationVersionComponent } from './pages/application-version/application-version.component';
|
||||
import { AdminlistComponent } from './pages/adminlist/adminlist.component';
|
||||
|
||||
import { VideolessonComponent } from './pages/videolesson/videolesson.component';
|
||||
|
||||
import { ScheduletestComponent } from './pages/scheduletest/scheduletest.component';
|
||||
import { LiveresultComponent } from './pages/livequestion/liveresult/liveresult.component';
|
||||
import { TeacherscreenComponent } from './pages/livequestion/teacherscreen/teacherscreen.component';
|
||||
import { UserAnalysisComponent } from './user-analysis/user-analysis.component';
|
||||
import { SubtopicsComponent } from './pages/subtopics/subtopics.component';
|
||||
import { ClientcohortComponent } from './pages/clientcohort/clientcohort.component';
|
||||
import { TemplatesComponent } from './pages/templates/templates.component';
|
||||
import { AdminlogsComponent } from './pages/adminlogs/adminlogs.component';
|
||||
import { ClientlogsComponent } from './pages/clientlogs/clientlogs.component';
|
||||
import { ReferencesComponent } from './pages/references/references.component';
|
||||
import { ManuallysendComponent } from './pages/manuallysend/manuallysend.component';
|
||||
import { VariablesComponent } from './pages/variables/variables.component';
|
||||
import { RecordingsComponent } from './pages/recordings/recordings.component';
|
||||
import { MindmapsComponent } from './pages/mindmaps/mindmaps.component';
|
||||
import { SupportComponent } from './pages/support/support.component';
|
||||
import { BooksComponent } from './pages/books/books.component';
|
||||
import { CompaniesComponent } from './pages/companies/companies.component';
|
||||
import { TeachersComponent } from './pages/teachers/teachers.component';
|
||||
import { GamificationComponent } from './pages/gamification/gamification.component';
|
||||
import { NewchnagepassComponent } from './newchnagepass/newchnagepass.component';
|
||||
import { FeedbackComponent } from './pages/feedback/feedback.component';
|
||||
import { DiscussionComponent } from './pages/discussion/discussion.component';
|
||||
import { UrlShortenerComponent } from './pages/url-shortener/url-shortener.component';
|
||||
import { ReportsComponent } from './pages/reports/reports.component';
|
||||
import { MomentTimezonePickerModule } from 'moment-timezone-picker';
|
||||
import { LivesessionComponent } from './pages/livesession/livesession.component';
|
||||
import { MatDatepickerModule } from '@angular/material/datepicker';
|
||||
import { MatNativeDateModule, MAT_DATE_LOCALE } from '@angular/material/core';
|
||||
import { StudentreportComponent } from './pages/studentreport/studentreport.component';
|
||||
import { QRCodeModule } from 'angularx-qrcode';
|
||||
import { NgxKjuaModule } from 'ngx-kjua';
|
||||
import { CohortreportComponent } from './pages/cohortreport/cohortreport.component';
|
||||
import { LiveeventComponent } from './pages/liveevent/liveevent.component';
|
||||
import { SelfpacedComponent } from './pages/selfpaced/selfpaced.component';
|
||||
import { DragDropModule } from '@angular/cdk/drag-drop';
|
||||
import { FailedemailsComponent } from './pages/failedemails/failedemails.component';
|
||||
import { PaymentTransactionsComponent } from './pages/payment-transactions/payment-transactions.component';
|
||||
import { MeetingsComponent } from './pages/meetings/meetings.component';
|
||||
import { AssignedMaterialsComponent } from './pages/assigned-materials/assigned-materials.component';
|
||||
import { JoinmeetingComponent } from './pages/joinmeeting/joinmeeting.component';
|
||||
import { NgxEmojiPickerModule } from 'ngx-emoji-picker';
|
||||
import { PaymentreceiptComponent } from './pages/paymentreceipt/paymentreceipt.component';
|
||||
import { NgxDropzoneModule } from 'ngx-dropzone';
|
||||
import { AuthypasswordComponent } from './pages/authypassword/authypassword.component';
|
||||
import { NgxQRCodeModule } from '@techiediaries/ngx-qrcode';
|
||||
import { SuccessemailsComponent } from './pages/successemails/successemails.component';
|
||||
import { VerifyauthyComponent } from './verifyauthy/verifyauthy.component';
|
||||
import { NgOtpInputModule } from 'ng-otp-input';
|
||||
import { InfiniteScrollModule } from 'ngx-infinite-scroll';
|
||||
import { StylePaginatorDirective } from './directive/style-paginator.directive';
|
||||
import { HybridtemplatesComponent } from './pages/hybridtemplates/hybridtemplates.component';
|
||||
import { HybridclassComponent } from './pages/hybridclass/hybridclass.component';
|
||||
import { ForgotpasswordComponent } from './forgotpassword/forgotpassword.component';
|
||||
import { ResetpassauthComponent } from './resetpassauth/resetpassauth.component';
|
||||
import { StudentExamResultComponent } from './pages/student-exam-result/student-exam-result.component';
|
||||
import { MiniMasterClassComponent } from './pages/mini-master-class/mini-master-class.component';
|
||||
import { SelfpacedSummaryComponent } from './pages/selfpaced-summary/selfpaced-summary.component';
|
||||
import { SelfpacedStudyProgressComponent } from './pages/selfpaced-study-progress/selfpaced-study-progress.component';
|
||||
import { StudyTimeComponent } from './pages/study-time/study-time.component';
|
||||
import { ChartsModule } from 'ng2-charts';
|
||||
const appRoutes: Routes = [
|
||||
{
|
||||
path: '',
|
||||
redirectTo: 'login',
|
||||
data: { title: 'First Component' },
|
||||
pathMatch: 'full',
|
||||
},
|
||||
{
|
||||
path: 'login',
|
||||
component: LoginLayoutComponent,
|
||||
data: { title: 'First Component' },
|
||||
children: [{ path: '', component: LoginComponent }],
|
||||
},
|
||||
{
|
||||
path: 'Changepassword/:email',
|
||||
component: NewchnagepassComponent,
|
||||
data: { title: 'First Component' },
|
||||
children: [{ path: '', component: NewchnagepassComponent }],
|
||||
},
|
||||
{
|
||||
path: 'reports/:id',
|
||||
component: StudentreportComponent,
|
||||
children: [{ path: '', component: StudentreportComponent }],
|
||||
},
|
||||
{
|
||||
path: 'result/:id',
|
||||
loadChildren: () =>
|
||||
import('./pages/student-exam-result/student-exam-result.module').then((m) => m.StudentExamResultModule),
|
||||
},
|
||||
{
|
||||
path: 'test',
|
||||
loadChildren: () =>
|
||||
import('./pages/student-knowledge-result/student-knowledge-result.module').then((m) => m.StudentKnowledgeResultModule),
|
||||
},
|
||||
{
|
||||
path: 'paymentreceipt/:id',
|
||||
component: PaymentreceiptComponent,
|
||||
children: [{ path: '', component: PaymentreceiptComponent }],
|
||||
},
|
||||
{
|
||||
path: 'cohortreports/:id',
|
||||
component: CohortreportComponent,
|
||||
children: [{ path: '', component: CohortreportComponent }],
|
||||
},
|
||||
{
|
||||
path: 'joinmeeting/:id',
|
||||
component: JoinmeetingComponent,
|
||||
children: [{ path: '', component: JoinmeetingComponent }],
|
||||
},
|
||||
{
|
||||
path: 'selfpaced-summary/:id', component: SelfpacedSummaryComponent
|
||||
},
|
||||
{
|
||||
path: 'selfpaced-study-progress/:id', component: SelfpacedStudyProgressComponent
|
||||
},
|
||||
|
||||
{ path: 'authypassword/:data', component: AuthypasswordComponent },
|
||||
{ path: 'verifyauthy/:data', component: VerifyauthyComponent },
|
||||
{ path: 'forgotpassword', component: ForgotpasswordComponent },
|
||||
{ path: 'resetpassauth/:email', component: ResetpassauthComponent },
|
||||
{
|
||||
path: 'main',
|
||||
component: HomeLayoutComponent,
|
||||
children: [
|
||||
{ path: '', redirectTo: 'first', pathMatch: 'full' },
|
||||
{ path: 'dashboard', component: DashboardComponent },
|
||||
{ path: 'students', component: StudentComponent },
|
||||
{ path: 'Admin', component: AdminlistComponent },
|
||||
|
||||
{ path: 'clients', component: ClientcohortComponent },
|
||||
|
||||
{ path: 'flashcard', component: FlashcardComponent },
|
||||
{ path: 'studymaterial', component: StudymaterialComponent },
|
||||
{ path: 'certificate', component: CertificateComponent },
|
||||
{ path: 'courses', component: CoursesComponent },
|
||||
{ path: 'liveclass', component: CohortsComponent },
|
||||
|
||||
{ path: 'templates', component: TemplatesComponent },
|
||||
|
||||
{ path: 'domains', component: DomainsComponent },
|
||||
{ path: 'subdomains', component: SubdomainsComponent },
|
||||
|
||||
{ path: 'topics', component: TopicsComponent },
|
||||
|
||||
{ path: 'subtopics', component: SubtopicsComponent },
|
||||
|
||||
{ path: 'Knowlegeass', component: KnowlegeassComponent },
|
||||
|
||||
{ path: 'sendmail', component: SendmailComponent },
|
||||
{ path: 'manuallysend', component: ManuallysendComponent },
|
||||
{ path: 'variables', component: VariablesComponent },
|
||||
{ path: 'recordings', component: RecordingsComponent },
|
||||
|
||||
{ path: 'meetings', component: MeetingsComponent },
|
||||
{ path: 'class-materials', component: AssignedMaterialsComponent },
|
||||
|
||||
{ path: 'practiceappques', component: PracticeappqueComponent },
|
||||
{
|
||||
path: 'practiceappques/createpracticeappques',
|
||||
component: CreatepracticequeComponent,
|
||||
},
|
||||
|
||||
{
|
||||
path: 'practiceappques/createpracticeappques/:id',
|
||||
component: CreatepracticequeComponent,
|
||||
},
|
||||
|
||||
{ path: 'knowlegeassques', component: KnowlegeassquesComponent },
|
||||
{
|
||||
path: 'knowlegeassques/:id',
|
||||
component: KnowlegeassquesComponent,
|
||||
},
|
||||
{ path: 'Practicetest', component: PracticetestsComponent },
|
||||
{
|
||||
path: 'Practicetest/createpractice',
|
||||
component: PracticetestsqueComponent,
|
||||
},
|
||||
{
|
||||
path: 'Practicetest/createpractice/:id',
|
||||
component: PracticetestsqueComponent,
|
||||
},
|
||||
|
||||
{ path: 'PracticetestQuestion', component: PracticequestionComponent },
|
||||
{
|
||||
path: 'PracticetestQuestion/:id',
|
||||
component: PracticequestionComponent,
|
||||
},
|
||||
|
||||
{ path: 'acronyms', component: AcronymsComponent },
|
||||
{ path: 'application-version', component: ApplicationVersionComponent },
|
||||
|
||||
{ path: 'cohorts/Addstudent/:id', component: AddstudentcohortComponent },
|
||||
|
||||
{ path: 'CateExamTest', component: CateexamtestComponent },
|
||||
|
||||
{ path: 'CateExamQuestion', component: CateexamtestquestionComponent },
|
||||
{
|
||||
path: 'CateExamQuestion/:id',
|
||||
component: CateexamtestquestionComponent,
|
||||
},
|
||||
|
||||
{ path: 'livequestion', component: LivequestionComponent },
|
||||
{
|
||||
path: 'livequestion/addlivequestion/:id',
|
||||
component: AddlivequestionComponent,
|
||||
},
|
||||
{ path: 'livequestion/liveresult/:id', component: LiveresultComponent },
|
||||
{ path: 'livequestion/teacher/:id', component: TeacherscreenComponent },
|
||||
|
||||
{ path: 'livesession', component: LivesessionComponent },
|
||||
|
||||
{ path: 'videolesson', component: VideolessonComponent },
|
||||
{ path: 'scheduletest', component: ScheduletestComponent },
|
||||
|
||||
{ path: 'students/useranalysis/:id', component: UserAnalysisComponent },
|
||||
|
||||
{ path: 'subtopics', component: SubtopicsComponent },
|
||||
|
||||
{ path: 'adminlogs', component: AdminlogsComponent },
|
||||
{ path: 'clientlogs', component: ClientlogsComponent },
|
||||
|
||||
{ path: 'references', component: ReferencesComponent },
|
||||
{ path: 'references/:id', component: ReferencesComponent },
|
||||
{ path: 'mindmaps', component: MindmapsComponent },
|
||||
|
||||
{ path: 'support', component: SupportComponent },
|
||||
{ path: 'books', component: BooksComponent },
|
||||
|
||||
{ path: 'companies', component: CompaniesComponent },
|
||||
{ path: 'teachers', component: TeachersComponent },
|
||||
{ path: 'gamification', component: GamificationComponent },
|
||||
{ path: 'discussion', component: DiscussionComponent },
|
||||
{ path: 'reports', component: ReportsComponent },
|
||||
{ path: 'urlshortener', component: UrlShortenerComponent },
|
||||
{ path: 'feedback', component: FeedbackComponent },
|
||||
{ path: 'liveevent', component: LiveeventComponent },
|
||||
{ path: 'selfpaced', component: SelfpacedComponent },
|
||||
{ path: 'failedemails', component: FailedemailsComponent },
|
||||
{ path: 'payment-transactions', component: PaymentTransactionsComponent },
|
||||
{ path: 'successemails', component: SuccessemailsComponent },
|
||||
{ path: 'hybridtemplates', component: HybridtemplatesComponent },
|
||||
{ path: 'hybridclass', component: HybridclassComponent },
|
||||
{ path: 'mini-master-class', component: MiniMasterClassComponent },
|
||||
{ path: 'study-time', component: StudyTimeComponent },
|
||||
{ path: '**', component: AppComponent },
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
LoginLayoutComponent,
|
||||
HomeLayoutComponent,
|
||||
LoginComponent,
|
||||
NavigationComponent,
|
||||
StudentComponent,
|
||||
FlashcardComponent,
|
||||
StudymaterialComponent,
|
||||
CertificateComponent,
|
||||
CoursesComponent,
|
||||
CohortsComponent,
|
||||
DomainsComponent,
|
||||
SubdomainsComponent,
|
||||
TopicsComponent,
|
||||
SendmailComponent,
|
||||
PracticeappqueComponent,
|
||||
CreatepracticequeComponent,
|
||||
DashboardComponent,
|
||||
KnowlegeassComponent,
|
||||
KnowlegeassquesComponent,
|
||||
PracticetestsComponent,
|
||||
PracticetestsqueComponent,
|
||||
PracticequestionComponent,
|
||||
AddstudentcohortComponent,
|
||||
CateexamtestComponent,
|
||||
CateexamtestquestionComponent,
|
||||
LivequestionComponent,
|
||||
AddlivequestionComponent,
|
||||
LiveresultComponent,
|
||||
TeacherscreenComponent,
|
||||
AddlivequestionComponent,
|
||||
AcronymsComponent,
|
||||
AdminlistComponent,
|
||||
VideolessonComponent,
|
||||
ScheduletestComponent,
|
||||
UserAnalysisComponent,
|
||||
SubtopicsComponent,
|
||||
ClientcohortComponent,
|
||||
TemplatesComponent,
|
||||
AdminlogsComponent,
|
||||
ClientlogsComponent,
|
||||
ReferencesComponent,
|
||||
ManuallysendComponent,
|
||||
VariablesComponent,
|
||||
RecordingsComponent,
|
||||
MindmapsComponent,
|
||||
SupportComponent,
|
||||
BooksComponent,
|
||||
CompaniesComponent,
|
||||
TeachersComponent,
|
||||
GamificationComponent,
|
||||
NewchnagepassComponent,
|
||||
FeedbackComponent,
|
||||
DiscussionComponent,
|
||||
UrlShortenerComponent,
|
||||
ReportsComponent,
|
||||
LivesessionComponent,
|
||||
StudentreportComponent,
|
||||
CohortreportComponent,
|
||||
LiveeventComponent,
|
||||
SelfpacedComponent,
|
||||
FailedemailsComponent,
|
||||
PaymentTransactionsComponent,
|
||||
MeetingsComponent,
|
||||
AssignedMaterialsComponent,
|
||||
JoinmeetingComponent,
|
||||
PaymentreceiptComponent,
|
||||
AuthypasswordComponent,
|
||||
SuccessemailsComponent,
|
||||
VerifyauthyComponent,
|
||||
StylePaginatorDirective,
|
||||
HybridtemplatesComponent,
|
||||
HybridclassComponent,
|
||||
ForgotpasswordComponent,
|
||||
ResetpassauthComponent,
|
||||
MiniMasterClassComponent,
|
||||
SelfpacedSummaryComponent,
|
||||
SelfpacedStudyProgressComponent,
|
||||
ApplicationVersionComponent,
|
||||
StudyTimeComponent
|
||||
// StudentExamResultComponent
|
||||
],
|
||||
imports: [
|
||||
ChartsModule,
|
||||
DragDropModule,
|
||||
QRCodeModule,
|
||||
NgxQRCodeModule,
|
||||
NgxKjuaModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
MatTableModule,
|
||||
MatPaginatorModule,
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
BrowserAnimationsModule,
|
||||
MatToolbarModule,
|
||||
MatInputModule,
|
||||
MatSidenavModule,
|
||||
MatListModule,
|
||||
MatButtonModule,
|
||||
MatIconModule,
|
||||
CKEditorModule,
|
||||
HttpClientModule,
|
||||
HttpModule,
|
||||
NgxSpinnerModule,
|
||||
NgSelectModule,
|
||||
MatChipsModule,
|
||||
MatAutocompleteModule,
|
||||
MatSortModule,
|
||||
MatCheckboxModule,
|
||||
MatDatepickerModule,
|
||||
MatNativeDateModule,
|
||||
MomentTimezonePickerModule,
|
||||
NgxEmojiPickerModule,
|
||||
ToastrModule.forRoot({
|
||||
timeOut: 3000,
|
||||
positionClass: 'toast-bottom-right',
|
||||
closeButton: true,
|
||||
}),
|
||||
RouterModule.forRoot(appRoutes,{useHash:true}),
|
||||
NgxDropzoneModule,
|
||||
NgOtpInputModule,
|
||||
InfiniteScrollModule,
|
||||
|
||||
],
|
||||
providers: [ServicesService, AuthorizationService, { provide: MAT_DATE_LOCALE, useValue: 'en-GB' }],
|
||||
bootstrap: [AppComponent],
|
||||
})
|
||||
export class AppModule { }
|
||||
@ -0,0 +1,16 @@
|
||||
import { FormGroup } from '@angular/forms';
|
||||
|
||||
export function ConfirmedValidator(controlName: string, matchingControlName: string) {
|
||||
return (formGroup: FormGroup) => {
|
||||
const control = formGroup.controls[controlName];
|
||||
const matchingControl = formGroup.controls[matchingControlName];
|
||||
if (matchingControl.errors && !matchingControl.errors.confirmedValidator) {
|
||||
return;
|
||||
}
|
||||
if (control.value !== matchingControl.value) {
|
||||
matchingControl.setErrors({ confirmedValidator: true });
|
||||
} else {
|
||||
matchingControl.setErrors(null);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,282 @@
|
||||
import {
|
||||
ElementRef,
|
||||
AfterViewInit,
|
||||
Directive,
|
||||
Host,
|
||||
Optional,
|
||||
Renderer2,
|
||||
Self,
|
||||
ViewContainerRef,
|
||||
Input
|
||||
} from "@angular/core";
|
||||
import { MatPaginator } from "@angular/material/paginator";
|
||||
import { MatButton } from "@angular/material/button";
|
||||
|
||||
interface PageObject {
|
||||
length: number;
|
||||
pageIndex: number;
|
||||
pageSize: number;
|
||||
previousPageIndex: number;
|
||||
}
|
||||
|
||||
@Directive({
|
||||
selector: "[style-paginator]"
|
||||
})
|
||||
export class StylePaginatorDirective {
|
||||
private _pageGapTxt = "...";
|
||||
private _rangeStart: number;
|
||||
private _rangeEnd: number;
|
||||
private _buttons: MatButton[] = [];
|
||||
private _curPageObj: PageObject = {
|
||||
length: 0,
|
||||
pageIndex: 0,
|
||||
pageSize: 0,
|
||||
previousPageIndex: 0
|
||||
};
|
||||
|
||||
@Input()
|
||||
get showTotalPages(): number {
|
||||
return this._showTotalPages;
|
||||
}
|
||||
set showTotalPages(value: number) {
|
||||
this._showTotalPages = value % 2 == 0 ? value + 1 : value;
|
||||
}
|
||||
private _showTotalPages = 2;
|
||||
|
||||
get inc(): number {
|
||||
return this._showTotalPages % 2 == 0
|
||||
? this.showTotalPages / 2
|
||||
: (this.showTotalPages - 1) / 2;
|
||||
}
|
||||
|
||||
get numOfPages(): number {
|
||||
return this.matPag.getNumberOfPages();
|
||||
}
|
||||
|
||||
get lastPageIndex(): number {
|
||||
return this.matPag.getNumberOfPages() - 1;
|
||||
}
|
||||
|
||||
constructor(
|
||||
@Host() @Self() @Optional() private readonly matPag: MatPaginator,
|
||||
private vr: ViewContainerRef,
|
||||
private ren: Renderer2
|
||||
) {
|
||||
//to rerender buttons on items per page change and first, last, next and prior buttons
|
||||
this.matPag.page.subscribe((e: PageObject) => {
|
||||
if (
|
||||
this._curPageObj.pageSize != e.pageSize &&
|
||||
this._curPageObj.pageIndex != 0
|
||||
) {
|
||||
e.pageIndex = 0;
|
||||
this._rangeStart = 0;
|
||||
this._rangeEnd = this._showTotalPages - 1;
|
||||
}
|
||||
this._curPageObj = e;
|
||||
|
||||
this.initPageRange();
|
||||
});
|
||||
}
|
||||
|
||||
private buildPageNumbers() {
|
||||
const actionContainer = this.vr.element.nativeElement.querySelector(
|
||||
"div.mat-paginator-range-actions"
|
||||
);
|
||||
const nextPageNode = this.vr.element.nativeElement.querySelector(
|
||||
"button.mat-paginator-navigation-next"
|
||||
);
|
||||
const lastBtn = this.vr.element.nativeElement.querySelector('.mat-paginator-navigation-last');
|
||||
if (lastBtn) {
|
||||
lastBtn.innerHTML = 'Last >>';
|
||||
}
|
||||
const firstBtn = this.vr.element.nativeElement.querySelector('.mat-paginator-navigation-first');
|
||||
if (firstBtn) {
|
||||
firstBtn.innerHTML = '<< First';
|
||||
}
|
||||
const rowLabel = this.vr.element.nativeElement.querySelector('.mat-paginator-page-size-label');
|
||||
if (rowLabel) {
|
||||
rowLabel.innerHTML = 'Rows';
|
||||
}
|
||||
const prevButtonCount = this._buttons.length;
|
||||
|
||||
// remove buttons before creating new ones
|
||||
if (this._buttons.length > 0) {
|
||||
this._buttons.forEach(button => {
|
||||
this.ren.removeChild(actionContainer, button);
|
||||
});
|
||||
//Empty state array
|
||||
this._buttons.length = 0;
|
||||
}
|
||||
|
||||
//initialize next page and last page buttons
|
||||
if (this._buttons.length == 0) {
|
||||
let nodeArray = this.vr.element.nativeElement.childNodes[0].childNodes[0]
|
||||
.childNodes[2].childNodes;
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < nodeArray.length; i++) {
|
||||
if (nodeArray[i].nodeName === "BUTTON") {
|
||||
if (nodeArray[i].disabled) {
|
||||
this.ren.setStyle(nodeArray[i], "background-color", "#0c1030");
|
||||
this.ren.setStyle(nodeArray[i], "color", "#545381");
|
||||
this.ren.setStyle(nodeArray[i], "margin", ".5%");
|
||||
this.ren.setStyle(nodeArray[i], "border", "solid 1px #181d4b");
|
||||
this.ren.setStyle(nodeArray[i], "border-radius", "5px");
|
||||
this.ren.setStyle(nodeArray[i], "padding", "0 55px 0 10px");
|
||||
} else {
|
||||
this.ren.setStyle(nodeArray[i], "background-color", "#0c1030");
|
||||
this.ren.setStyle(nodeArray[i], "border", "solid 1px #181d4b");
|
||||
this.ren.setStyle(nodeArray[i], "border-radius", "5px");
|
||||
this.ren.setStyle(nodeArray[i], "color", "#545381");
|
||||
this.ren.setStyle(nodeArray[i], "margin", ".5%");
|
||||
this.ren.setStyle(nodeArray[i], "padding", "0 55px 0 10px");
|
||||
}
|
||||
if (nodeArray[i].className == "mat-focus-indicator mat-paginator-navigation-previous mat-icon-button mat-button-base" || nodeArray[i].className == "mat-focus-indicator mat-paginator-navigation-previous mat-icon-button mat-button-base cdk-focused cdk-mouse-focused" || nodeArray[i].className == "mat-focus-indicator mat-paginator-navigation-next mat-icon-button mat-button-base" || nodeArray[i].className == "mat-focus-indicator mat-paginator-navigation-next mat-icon-button mat-button-base cdk-focused cdk-mouse-focused") {
|
||||
this.ren.setStyle(nodeArray[i], "padding", "0px");
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
let dots = false;
|
||||
for (let i = 0; i < this.numOfPages; i++) {
|
||||
if (i >= this._rangeStart && i <= this._rangeEnd) {
|
||||
this.ren.insertBefore(
|
||||
actionContainer,
|
||||
this.createButton(i, this.matPag.pageIndex),
|
||||
nextPageNode
|
||||
);
|
||||
} else {
|
||||
if (i > this._rangeEnd && !dots) {
|
||||
this.ren.insertBefore(
|
||||
actionContainer,
|
||||
this.createButton(this._pageGapTxt, this._rangeEnd),
|
||||
nextPageNode
|
||||
);
|
||||
dots = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private createButton(i: any, pageIndex: number): any {
|
||||
const linkBtn = this.ren.createElement("mat-button");
|
||||
this.ren.addClass(linkBtn, "mat-mini-fab");
|
||||
this.ren.setStyle(linkBtn, "margin", "1%");
|
||||
this.ren.setStyle(linkBtn, "background-color", "#fff");
|
||||
this.ren.setStyle(linkBtn, "border", "solid 1px #000000");
|
||||
this.ren.setStyle(linkBtn, "color", "#00000");
|
||||
this.ren.setStyle(linkBtn, "border-radius", "5px");
|
||||
// this.ren.setStyle(linkBtn, "margin", "1%");
|
||||
// this.ren.setStyle(linkBtn, "background-color", "#0c1030");
|
||||
// this.ren.setStyle(linkBtn, "border", "solid 1px #181d4b");
|
||||
// this.ren.setStyle(linkBtn, "color", "#545381");
|
||||
// this.ren.setStyle(linkBtn, "border-radius", "5px");
|
||||
|
||||
const pagingTxt = isNaN(i) ? this._pageGapTxt : +(i + 1);
|
||||
const text = this.ren.createText(pagingTxt + "");
|
||||
|
||||
this.ren.addClass(linkBtn, "mat-custom-page");
|
||||
switch (i) {
|
||||
case pageIndex:
|
||||
this.ren.setAttribute(linkBtn, "disabled", "disabled");
|
||||
this.ren.setStyle(linkBtn, "border", "solid 1px #DF166A");
|
||||
this.ren.setStyle(linkBtn, "color", "#DF166A");
|
||||
// this.ren.setStyle(linkBtn, "border", "solid 1px #9645c4");
|
||||
// this.ren.setStyle(linkBtn, "color", "#9645c4");
|
||||
break;
|
||||
case this._pageGapTxt:
|
||||
let newIndex = this._curPageObj.pageIndex + this._showTotalPages;
|
||||
|
||||
if (newIndex >= this.numOfPages) newIndex = this.lastPageIndex;
|
||||
|
||||
if (pageIndex != this.lastPageIndex) {
|
||||
this.ren.listen(linkBtn, "click", () => {
|
||||
this.switchPage(newIndex);
|
||||
});
|
||||
}
|
||||
|
||||
if (pageIndex == this.lastPageIndex) {
|
||||
this.ren.setAttribute(linkBtn, "disabled", "disabled");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this.ren.listen(linkBtn, "click", () => {
|
||||
this.switchPage(i);
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
this.ren.appendChild(linkBtn, text);
|
||||
//Add button to private array for state
|
||||
this._buttons.push(linkBtn);
|
||||
return linkBtn;
|
||||
}
|
||||
//calculates the button range based on class input parameters and based on current page index value. Used to render new buttons after event.
|
||||
private initPageRange(): void {
|
||||
const middleIndex = (this._rangeStart + this._rangeEnd) / 2;
|
||||
|
||||
this._rangeStart = this.calcRangeStart(middleIndex);
|
||||
this._rangeEnd = this.calcRangeEnd(middleIndex);
|
||||
|
||||
this.buildPageNumbers();
|
||||
}
|
||||
|
||||
//Helper function To calculate start of button range
|
||||
private calcRangeStart(middleIndex: number): number {
|
||||
switch (true) {
|
||||
case this._curPageObj.pageIndex == 0 && this._rangeStart != 0:
|
||||
return 0;
|
||||
case this._curPageObj.pageIndex > this._rangeEnd:
|
||||
return this._curPageObj.pageIndex + this.inc > this.lastPageIndex
|
||||
? this.lastPageIndex - this.inc * 2
|
||||
: this._curPageObj.pageIndex - this.inc;
|
||||
case this._curPageObj.pageIndex > this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex > middleIndex &&
|
||||
this._rangeEnd < this.lastPageIndex:
|
||||
return this._rangeStart + 1;
|
||||
case this._curPageObj.pageIndex < this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex < middleIndex &&
|
||||
this._rangeStart > 0:
|
||||
return this._rangeStart - 1;
|
||||
default:
|
||||
return this._rangeStart;
|
||||
}
|
||||
}
|
||||
//Helpter function to calculate end of button range
|
||||
private calcRangeEnd(middleIndex: number): number {
|
||||
switch (true) {
|
||||
case this._curPageObj.pageIndex == 0 &&
|
||||
this._rangeEnd != this._showTotalPages:
|
||||
return this._showTotalPages - 1;
|
||||
case this._curPageObj.pageIndex > this._rangeEnd:
|
||||
return this._curPageObj.pageIndex + this.inc > this.lastPageIndex
|
||||
? this.lastPageIndex
|
||||
: this._curPageObj.pageIndex + 1;
|
||||
case this._curPageObj.pageIndex > this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex > middleIndex &&
|
||||
this._rangeEnd < this.lastPageIndex:
|
||||
return this._rangeEnd + 1;
|
||||
case this._curPageObj.pageIndex < this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex < middleIndex &&
|
||||
this._rangeStart >= 0 &&
|
||||
this._rangeEnd > this._showTotalPages - 1:
|
||||
return this._rangeEnd - 1;
|
||||
default:
|
||||
return this._rangeEnd;
|
||||
}
|
||||
}
|
||||
//Helper function to switch page on non first, last, next and previous buttons only.
|
||||
private switchPage(i: number): void {
|
||||
const previousPageIndex = this.matPag.pageIndex;
|
||||
this.matPag.pageIndex = i;
|
||||
this.matPag["_emitPageEvent"](previousPageIndex);
|
||||
this.initPageRange();
|
||||
}
|
||||
//Initialize default state after view init
|
||||
public ngAfterViewInit() {
|
||||
this._rangeStart = 0;
|
||||
this._rangeEnd = this._showTotalPages - 1;
|
||||
this.initPageRange();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
<div class="loginmain">
|
||||
<div class="loginformwrap">
|
||||
<div class="logoimage">
|
||||
<!-- <img src="../../assets/images/flexxon_full.png" alt="Flexxon" /> -->
|
||||
</div>
|
||||
<h3>Forgot Password</h3>
|
||||
<div class="loginform">
|
||||
<form (key.enter)="login()">
|
||||
<div class="inputtype">
|
||||
<label>Email Address</label>
|
||||
<input type="email" [(ngModel)]="email" name="email" placeholder="Enter Email" />
|
||||
</div>
|
||||
<button type="submit" (click)="login()" tabindex="4" class="button">
|
||||
<!-- Send me the link -->
|
||||
Send verification code
|
||||
</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,69 @@
|
||||
.loginmain {
|
||||
background: url("../../assets/e-learning.png") no-repeat center center;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-size: cover;
|
||||
.loginformwrap {
|
||||
max-width: 350px;
|
||||
width: 100%;
|
||||
background: linear-gradient(120deg, #fa007e63 50%, #01025e 100%);
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
.logoimage {
|
||||
max-width: 150px;
|
||||
|
||||
margin: 0 auto 20px;
|
||||
img {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
h3 {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 25px;
|
||||
}
|
||||
.loginform {
|
||||
.inputtype {
|
||||
margin-bottom: 15px;
|
||||
width: 100%;
|
||||
label {
|
||||
color: #fff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
}
|
||||
input {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
background: #fff;
|
||||
border: 0;
|
||||
color: #000000;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
::placeholder{
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.button {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
background: linear-gradient(10deg, #E91E63 0%, #f8768f 100%);
|
||||
border: 0;
|
||||
color: #fff;
|
||||
align-items: right;
|
||||
justify-self: right;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ForgotpasswordComponent } from './forgotpassword.component';
|
||||
|
||||
describe('ForgotpasswordComponent', () => {
|
||||
let component: ForgotpasswordComponent;
|
||||
let fixture: ComponentFixture<ForgotpasswordComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ForgotpasswordComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ForgotpasswordComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,134 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthorizationService } from '../service/authorization.service';
|
||||
import { ServicesService } from '../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { CryptoService } from '../services/crypto/crypto.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-forgotpassword',
|
||||
templateUrl: './forgotpassword.component.html',
|
||||
styleUrls: ['./forgotpassword.component.scss']
|
||||
})
|
||||
export class ForgotpasswordComponent implements OnInit {
|
||||
email: any;
|
||||
Password: any;
|
||||
constructor(
|
||||
public router: Router,
|
||||
public spinner: NgxSpinnerService,
|
||||
public auth: AuthorizationService,
|
||||
public service: ServicesService,
|
||||
private crypto: CryptoService) {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
}
|
||||
async login() {
|
||||
let pattern = new RegExp(
|
||||
'^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z]{2,4})$)'
|
||||
);
|
||||
if (pattern.test(this.email)) {
|
||||
this.spinner.show();
|
||||
await this.service.versions_getUserByEmail(this.email).then(
|
||||
async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
if (list.data.length > 0) {
|
||||
if (list.data[0].roll_id != 1 && list.data[0].roll_id != 5) {
|
||||
this.service.ShowError(
|
||||
'You are not allowed to access this portal. Kindly contact customer support.'
|
||||
);
|
||||
this.spinner.hide();
|
||||
return
|
||||
}
|
||||
// if (list.data[0].expire_password == 1) {
|
||||
// var userdata = {
|
||||
// email: list.data[0].email,
|
||||
// };
|
||||
// var datas = this.crypto.enc(JSON.stringify(userdata));
|
||||
// this.router.navigate([`/pages/forcechangepassword/${datas}`]);
|
||||
// return
|
||||
// }
|
||||
}
|
||||
if (list.data.length > 0) {
|
||||
debugger;
|
||||
await this.auth.forgotPassword(list.data[0].email).then(async (data) => {
|
||||
var adminData = JSON.parse(<string>data[0].json);
|
||||
// if (data[0].StatusCode == 1) {
|
||||
if (adminData.data.user_status == 200) {
|
||||
let user = this.email;
|
||||
let msg = data[0].message;
|
||||
let cohort = "Reset Password";
|
||||
let email_type = 'Reset Password';
|
||||
// await this.addFailedEmail(user, cohort, msg, email_type, 1);
|
||||
await this.addActivityTracker(0, this.email, 0, "Forgot Password", "Forgot Password - Forgot password code sent successfully");
|
||||
this.spinner.hide();
|
||||
|
||||
var datas = btoa(JSON.stringify(this.email));
|
||||
this.router.navigate([`/resetpassauth/${datas}`]);
|
||||
} else {
|
||||
// if (data[0].message == 'Username/client id combination not found.') {
|
||||
|
||||
// let user = this.email;
|
||||
// let msg = "No user found";
|
||||
// let cohort = "Reset Password";
|
||||
// let email_type = 'Reset Password';
|
||||
// await this.addFailedEmail(user, cohort, msg, email_type, 0);
|
||||
// this.spinner.hide();
|
||||
|
||||
// this.service.ShowError('No user found');
|
||||
// } else if (
|
||||
// data[0].message ==
|
||||
// 'User password cannot be reset in the current state.'
|
||||
// ) {
|
||||
|
||||
// let user = this.email;
|
||||
// let msg = "You have not completed the onboarding flow. Please check email for temp password.";
|
||||
// let cohort = "Reset Password";
|
||||
// let email_type = 'Reset Password';
|
||||
// await this.addFailedEmail(user, cohort, msg, email_type, 0);
|
||||
// await this.addActivityTracker(0, this.email, 0, "Forgot Password", "Forgot Password - " + msg);
|
||||
// this.spinner.hide();
|
||||
|
||||
// this.service.ShowError(
|
||||
// 'You have not completed the onboarding flow. Please check email for temp password.'
|
||||
// );
|
||||
// } else {
|
||||
let user = this.email;
|
||||
// let msg = data[0].message;
|
||||
let msg = adminData.data.message;
|
||||
let cohort = "Reset Password failed";
|
||||
let email_type = 'Reset Password';
|
||||
await this.addFailedEmail(user, cohort, msg, email_type, 0);
|
||||
await this.addActivityTracker(0, this.email, 0, "Forgot Password", "Forgot Password - " + msg);
|
||||
this.spinner.hide();
|
||||
|
||||
// this.service.ShowError(data[0].message);
|
||||
this.service.ShowError(adminData.data.message);
|
||||
|
||||
// }
|
||||
}
|
||||
|
||||
});
|
||||
} else {
|
||||
this.spinner.hide();
|
||||
this.service.ShowError('No user found');
|
||||
}
|
||||
}
|
||||
}
|
||||
);
|
||||
|
||||
|
||||
} else {
|
||||
this.service.ShowError('email provided is invalid');
|
||||
}
|
||||
}
|
||||
|
||||
async addFailedEmail(user, cohort, msg, email_type, mail_success) {
|
||||
await this.service.addFailedEmail(user, cohort, msg, email_type, mail_success, "").then(async (data) => { });
|
||||
}
|
||||
async addActivityTracker(user_id, email, cohort_id, type, message) {
|
||||
await this.service.addActivityTracker(user_id, email, cohort_id, type, message);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<app-navigation></app-navigation>
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { HomeLayoutComponent } from './home-layout.component';
|
||||
|
||||
describe('HomeLayoutComponent', () => {
|
||||
let component: HomeLayoutComponent;
|
||||
let fixture: ComponentFixture<HomeLayoutComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ HomeLayoutComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(HomeLayoutComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,15 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-home-layout',
|
||||
templateUrl: './home-layout.component.html',
|
||||
styleUrls: ['./home-layout.component.scss']
|
||||
})
|
||||
export class HomeLayoutComponent implements OnInit {
|
||||
|
||||
constructor() { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1 @@
|
||||
<router-outlet></router-outlet>
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LoginLayoutComponent } from './login-layout.component';
|
||||
|
||||
describe('LoginLayoutComponent', () => {
|
||||
let component: LoginLayoutComponent;
|
||||
let fixture: ComponentFixture<LoginLayoutComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ LoginLayoutComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoginLayoutComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,19 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-login-layout',
|
||||
templateUrl: './login-layout.component.html',
|
||||
styleUrls: ['./login-layout.component.scss']
|
||||
})
|
||||
export class LoginLayoutComponent implements OnInit {
|
||||
|
||||
constructor( public router: Router,) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
checkLogin(){
|
||||
this.router.navigate(['/userinfo']);
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,28 @@
|
||||
<div class="loginmain">
|
||||
<div class="loginformwrap">
|
||||
<div class="logoimage">
|
||||
<!-- <img src="../../assets/images/flexxon_full.png" alt="Flexxon" /> -->
|
||||
</div>
|
||||
<h3>Login</h3>
|
||||
<div class="loginform">
|
||||
<form (key.enter)="login()">
|
||||
<div class="inputtype">
|
||||
<label>Email Address</label>
|
||||
<input type="email" [(ngModel)]="Email" name="email" placeholder="Enter Email" />
|
||||
</div>
|
||||
<div class="inputtype">
|
||||
<label>Password</label>
|
||||
<input type="password" [(ngModel)]="Password" name="password" placeholder="Enter Password" />
|
||||
</div>
|
||||
|
||||
<button type="submit" (click)="login()" tabindex="4" class="button">
|
||||
Sign In
|
||||
</button>
|
||||
</form>
|
||||
<a routerLink="/forgotpassword" class="forget">Forgot Password?</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,85 @@
|
||||
.loginmain {
|
||||
// background: #090d28;
|
||||
background: url("../../assets/e-learning.png") no-repeat center center;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
background-size: cover;
|
||||
.loginformwrap {
|
||||
max-width: 350px;
|
||||
width: 100%;
|
||||
background: linear-gradient(120deg, #fa007e63 50%, #01025e 100%);
|
||||
backdrop-filter: blur(10px);
|
||||
border-radius: 10px;
|
||||
padding: 15px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
flex-direction: column;
|
||||
.logoimage {
|
||||
max-width: 150px;
|
||||
|
||||
margin: 0 auto 20px;
|
||||
img {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
h3 {
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-size: 25px;
|
||||
}
|
||||
.loginform {
|
||||
.inputtype {
|
||||
margin-bottom: 15px;
|
||||
width: 100%;
|
||||
label {
|
||||
color: #fff;
|
||||
margin-bottom: 5px;
|
||||
display: flex;
|
||||
}
|
||||
input {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
border: 0;
|
||||
color: #000000;
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
::placeholder{
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.button {
|
||||
padding: 10px;
|
||||
border-radius: 5px;
|
||||
width: 100%;
|
||||
background: linear-gradient(10deg, #E91E63 0%, #f8768f 100%);
|
||||
border: 0;
|
||||
color: #fff;
|
||||
align-items: center;
|
||||
justify-self: center;
|
||||
outline: 0;
|
||||
cursor: pointer;
|
||||
}
|
||||
a {
|
||||
color: #cd85e9;
|
||||
text-align: center;
|
||||
float: center;
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
display: -ms-flexbox;
|
||||
display: flex;
|
||||
-ms-flex-pack: center;
|
||||
justify-content: center;
|
||||
margin-bottom: 10px;
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LoginComponent } from './login.component';
|
||||
|
||||
describe('LoginComponent', () => {
|
||||
let component: LoginComponent;
|
||||
let fixture: ComponentFixture<LoginComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [LoginComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoginComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
136
E-Learning-Admin-frontend-main/src/app/login/login.component.ts
Normal file
136
E-Learning-Admin-frontend-main/src/app/login/login.component.ts
Normal file
@ -0,0 +1,136 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthorizationService } from '../service/authorization.service';
|
||||
import { ServicesService } from '../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { CryptoService } from '../services/crypto/crypto.service';
|
||||
@Component({
|
||||
selector: 'app-login',
|
||||
templateUrl: './login.component.html',
|
||||
styleUrls: ['./login.component.scss']
|
||||
})
|
||||
export class LoginComponent implements OnInit {
|
||||
Email: any;
|
||||
Password: any;
|
||||
constructor(public router: Router, public spinner: NgxSpinnerService, public auth: AuthorizationService, public service: ServicesService, private crypto: CryptoService) {
|
||||
}
|
||||
ngOnInit() {
|
||||
var login = window.sessionStorage.getItem("logintrue");
|
||||
if (login) {
|
||||
this.router.navigate(['/main/dashboard']);
|
||||
}
|
||||
}
|
||||
async login() {
|
||||
if (this.Email == "" || this.Email == undefined) {
|
||||
this.service.ShowError("Email is required")
|
||||
}
|
||||
else if (this.Password == "" || this.Password == undefined) {
|
||||
this.service.ShowError("Password is required")
|
||||
}
|
||||
else {
|
||||
await this.spinner.show();
|
||||
try {
|
||||
await this.auth.user_login(this.Email, this.Password).then(async (data) => {
|
||||
var usersData = JSON.parse(<string>data[0].json);
|
||||
if ((data[0].StatusCode == 1 && usersData.data.user_status==200) || usersData.data.id) {
|
||||
var authenticatedUser = this.auth.getAuthenticatedUser();
|
||||
if (authenticatedUser == null) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.service.UsersFilter(this.Email, token).then(async (user) => {
|
||||
if (user[0].status == 200) {
|
||||
var list = JSON.parse(<string>user[0].json);
|
||||
if (list.data.roll_id == 1 || list.data.roll_id == 5) {
|
||||
await this.spinner.hide();
|
||||
window.localStorage.setItem("adminUser", this.Email);
|
||||
this.service.ShowSuccess("Login successfully!");
|
||||
window.sessionStorage.setItem("b6h3a5d9r6e3s5h", list.data.id);
|
||||
window.sessionStorage.setItem("logintrue", "true");
|
||||
this.router.navigate(['/main/dashboard']);
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
await this.auth.logOut();
|
||||
this.service.ShowError("Incorrect username or password.")
|
||||
}
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess(data[0].message)
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
else {
|
||||
await this.service.ShowError(data[0].message||usersData.data.message)
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}, (err) => {
|
||||
this.spinner.hide();
|
||||
this.service.ShowError(err);
|
||||
});
|
||||
// await this.auth.signIn(this.Email, this.Password).then(async (data) => {
|
||||
// if (data[0].StatusCode == 1) {
|
||||
// var authenticatedUser = this.auth.getAuthenticatedUser();
|
||||
// if (authenticatedUser == null) {
|
||||
// this.router.navigate(['/login']);
|
||||
// }
|
||||
// else {
|
||||
// this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
// if (err) {
|
||||
// await this.spinner.hide();
|
||||
// this.router.navigate(['/login']);
|
||||
// }
|
||||
// else {
|
||||
// var token = ''
|
||||
// await this.service.UsersFilter(this.Email, token).then(async (user) => {
|
||||
// if (user[0].status == 200) {
|
||||
// var list = JSON.parse(<string>user[0].json);
|
||||
// if (list.data.roll_id == 1 || list.data.roll_id == 5) {
|
||||
// await this.spinner.hide();
|
||||
// window.localStorage.setItem("adminUser", this.Email);
|
||||
// this.service.ShowSuccess("Login successfully!");
|
||||
// window.sessionStorage.setItem("b6h3a5d9r6e3s5h", list.data.id);
|
||||
// window.sessionStorage.setItem("logintrue", "true");
|
||||
// this.router.navigate(['/main/dashboard']);
|
||||
// }
|
||||
// else {
|
||||
// await this.spinner.hide();
|
||||
// await this.auth.logOut();
|
||||
// this.service.ShowError("Incorrect username or password.")
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// await this.spinner.hide();
|
||||
// this.service.ShowSuccess(data[0].message)
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// });
|
||||
// }
|
||||
// }
|
||||
// else {
|
||||
// await this.service.ShowError(data[0].message)
|
||||
// await this.spinner.hide();
|
||||
// }
|
||||
// }, (err) => {
|
||||
// this.spinner.hide();
|
||||
// this.service.ShowError(err);
|
||||
// });
|
||||
} catch (e) {
|
||||
this.spinner.hide();
|
||||
this.service.ShowError(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,795 @@
|
||||
<mat-toolbar color="primary">
|
||||
<div class="main-header-profile">
|
||||
<div class="header-logo">
|
||||
<button mat-icon-button>
|
||||
<mat-icon (click)="sidenav.toggle()">menu</mat-icon>
|
||||
</button>
|
||||
<div class="logheader" routerLink="dashboard">
|
||||
<img src="../../assets/images/logo.svg" alt="Flexxon" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="profile">
|
||||
<div>
|
||||
<span>Welcome,</span>
|
||||
<span class="name">Super Admin</span>
|
||||
</div>
|
||||
<img src="../../assets/images/user.jpg" alt="" />
|
||||
</div>
|
||||
</div>
|
||||
</mat-toolbar>
|
||||
<mat-sidenav-container>
|
||||
<button mat-icon-button>
|
||||
<mat-icon (click)="sidenav.toggle()">menu</mat-icon>
|
||||
</button>
|
||||
<mat-sidenav opened #sidenav class="sidenav" mode="side" [disableClose]="true">
|
||||
<mat-nav-list>
|
||||
<ng-container>
|
||||
<div (click)="People()" [ngClass]="{ 'active mainActive': Peoples }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 505.4 505.4" style="enable-background: new 0 0 505.4 505.4; fill: #000000"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M437.1,233.45c14.8-10.4,24.6-27.7,24.6-47.2c0-31.9-25.8-57.7-57.7-57.7c-31.9,0-57.7,25.8-57.7,57.7
|
||||
c0,19.5,9.7,36.8,24.6,47.2c-12.7,4.4-24.3,11.2-34.1,20c-13.5-11.5-29.4-20.3-46.8-25.5c21.1-12.8,35.3-36.1,35.3-62.6
|
||||
c0-40.4-32.7-73.1-73.1-73.1c-40.4,0-73.1,32.8-73.1,73.1c0,26.5,14.1,49.8,35.3,62.6c-17.2,5.2-32.9,13.9-46.3,25.2
|
||||
c-9.8-8.6-21.2-15.3-33.7-19.6c14.8-10.4,24.6-27.7,24.6-47.2c0-31.9-25.8-57.7-57.7-57.7s-57.7,25.8-57.7,57.7
|
||||
c0,19.5,9.7,36.8,24.6,47.2C28.5,247.25,0,284.95,0,329.25v6.6c0,0.2,0.2,0.4,0.4,0.4h122.3c-0.7,5.5-1.1,11.2-1.1,16.9v6.8
|
||||
c0,29.4,23.8,53.2,53.2,53.2h155c29.4,0,53.2-23.8,53.2-53.2v-6.8c0-5.7-0.4-11.4-1.1-16.9H505c0.2,0,0.4-0.2,0.4-0.4v-6.6
|
||||
C505.2,284.85,476.8,247.15,437.1,233.45z M362.3,186.15c0-23,18.7-41.7,41.7-41.7s41.7,18.7,41.7,41.7
|
||||
c0,22.7-18.3,41.2-40.9,41.7c-0.3,0-0.5,0-0.8,0s-0.5,0-0.8,0C380.5,227.45,362.3,208.95,362.3,186.15z M194.9,165.35
|
||||
c0-31.5,25.6-57.1,57.1-57.1s57.1,25.6,57.1,57.1c0,30.4-23.9,55.3-53.8,57c-1.1,0-2.2,0-3.3,0c-1.1,0-2.2,0-3.3,0
|
||||
C218.8,220.65,194.9,195.75,194.9,165.35z M59.3,186.15c0-23,18.7-41.7,41.7-41.7s41.7,18.7,41.7,41.7c0,22.7-18.3,41.2-40.9,41.7
|
||||
c-0.3,0-0.5,0-0.8,0s-0.5,0-0.8,0C77.6,227.45,59.3,208.95,59.3,186.15z M125.5,320.15H16.2c4.5-42.6,40.5-76,84.2-76.3
|
||||
c0.2,0,0.4,0,0.6,0s0.4,0,0.6,0c20.8,0.1,39.8,7.8,54.5,20.3C141.7,279.75,131,298.95,125.5,320.15z M366.8,359.95
|
||||
c0,20.5-16.7,37.2-37.2,37.2h-155c-20.5,0-37.2-16.7-37.2-37.2v-6.8c0-62.1,49.6-112.9,111.3-114.7c1.1,0.1,2.3,0.1,3.4,0.1
|
||||
s2.3,0,3.4-0.1c61.7,1.8,111.3,52.6,111.3,114.7V359.95z M378.7,320.15c-5.5-21.1-16-40-30.3-55.6c14.8-12.8,34-20.5,55-20.7
|
||||
c0.2,0,0.4,0,0.6,0s0.4,0,0.6,0c43.7,0.3,79.7,33.7,84.2,76.3H378.7z" />
|
||||
</g>
|
||||
</g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
</svg>
|
||||
<p>People</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: Peoples }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" [ngClass]="{ active: Peoples }">
|
||||
<div>
|
||||
<a mat-list-item routerLink="students" [routerLinkActive]="['active']">Students</a>
|
||||
<!-- <a mat-list-item routerLink="companies" [routerLinkActive]="['active']">Companies</a>
|
||||
<a mat-list-item routerLink="clients" [routerLinkActive]="['active']">Clients</a>
|
||||
<a mat-list-item routerLink="teachers" [routerLinkActive]="['active']">Teachers</a> -->
|
||||
<a mat-list-item routerLink="Admin" [routerLinkActive]="['active']">Admins</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
|
||||
<ng-container>
|
||||
<div (click)="CertStructures()" [ngClass]="{ 'active mainActive': CertStructure }"
|
||||
class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<div class="unfill">
|
||||
<svg width="21" height="19" viewBox="0 0 21 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M12.8336 15.25H2.4C1.6268 15.25 1 14.6232 1 13.85V13.6663V2.4C1 1.6268 1.6268 1 2.4 1H16.7C17.4732 1 18.1 1.6268 18.1 2.4V7.57627"
|
||||
stroke="#000000" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M15.4379 6.69978C14.1231 5.9113 13.6515 4.85214 13.6515 4.02588H6.00224C6.00224 5.35192 5.09129 6.68763 3.94824 6.68763V9.60162C5.00429 9.60162 6.00224 10.9097 6.00224 12.1649C6.00224 12.1649 10.4819 12.1649 11.9248 12.1649"
|
||||
stroke="#000000" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M18.6343 13.6528V17.7486C18.6343 18.1464 18.1922 18.3849 17.8597 18.1665L15.7392 16.7734L13.6073 18.1688C13.2748 18.3865 12.8335 18.1479 12.8335 17.7504V13.6528"
|
||||
stroke="#000000" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M19.1024 10.7971C19.5595 10.2281 19.6505 9.4187 19.2636 8.74863C18.8767 8.07948 18.1292 7.75173 17.4091 7.8628C17.1451 7.18363 16.4877 6.7002 15.7148 6.7002C14.9418 6.7002 14.2854 7.18363 14.0214 7.86371C13.3004 7.75264 12.5538 8.07948 12.1678 8.74863C11.7809 9.4187 11.8719 10.229 12.328 10.7971C11.8719 11.3661 11.7809 12.1764 12.1678 12.8455C12.5538 13.5156 13.3013 13.8424 14.0223 13.7313C14.2863 14.4105 14.9428 14.8939 15.7148 14.8939C16.4886 14.8939 17.1451 14.4105 17.41 13.7304C18.1301 13.8415 18.8767 13.5156 19.2636 12.8455C19.6505 12.1764 19.5595 11.3652 19.1024 10.7971Z"
|
||||
stroke="#000000" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
<div class="fillsvg">
|
||||
<svg width="21" height="19" viewBox="0 0 21 19" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="M12.8336 15.25H2.4C1.6268 15.25 1 14.6232 1 13.85V13.6663V2.4C1 1.6268 1.6268 1 2.4 1H16.7C17.4732 1 18.1 1.6268 18.1 2.4V7.57627"
|
||||
stroke="#DF166A" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M15.4379 6.69978C14.1231 5.9113 13.6515 4.85214 13.6515 4.02588H6.00224C6.00224 5.35192 5.09129 6.68763 3.94824 6.68763V9.60162C5.00429 9.60162 6.00224 10.9097 6.00224 12.1649C6.00224 12.1649 10.4819 12.1649 11.9248 12.1649"
|
||||
stroke="#DF166A" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path
|
||||
d="M18.6343 13.6528V17.7486C18.6343 18.1464 18.1922 18.3849 17.8597 18.1665L15.7392 16.7734L13.6073 18.1688C13.2748 18.3865 12.8335 18.1479 12.8335 17.7504V13.6528"
|
||||
stroke="#DF166A" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M19.1024 10.7971C19.5595 10.2281 19.6505 9.4187 19.2636 8.74863C18.8767 8.07948 18.1292 7.75173 17.4091 7.8628C17.1451 7.18363 16.4877 6.7002 15.7148 6.7002C14.9418 6.7002 14.2854 7.18363 14.0214 7.86371C13.3004 7.75264 12.5538 8.07948 12.1678 8.74863C11.7809 9.4187 11.8719 10.229 12.328 10.7971C11.8719 11.3661 11.7809 12.1764 12.1678 12.8455C12.5538 13.5156 13.3013 13.8424 14.0223 13.7313C14.2863 14.4105 14.9428 14.8939 15.7148 14.8939C16.4886 14.8939 17.1451 14.4105 17.41 13.7304C18.1301 13.8415 18.8767 13.5156 19.2636 12.8455C19.6505 12.1764 19.5595 11.3652 19.1024 10.7971Z"
|
||||
stroke="#DF166A" stroke-width="1.4" stroke-linecap="round" stroke-linejoin="round" />
|
||||
</svg>
|
||||
</div>
|
||||
<p>Cert. Structure</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: CertStructure }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" [ngClass]="{ active: CertStructure }">
|
||||
<div>
|
||||
<a mat-list-item routerLink="certificate" [routerLinkActive]="['active']">Certifications</a>
|
||||
<a mat-list-item routerLink="domains" [routerLinkActive]="['active']">Materials</a>
|
||||
<a mat-list-item routerLink="subdomains" [routerLinkActive]="['active']">Sub-Materials</a>
|
||||
<a mat-list-item routerLink="topics" [routerLinkActive]="['active']">Topics</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
|
||||
<ng-container>
|
||||
<div (click)="Courses()" [ngClass]="{ 'active mainActive': Course }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<div class="unfill">
|
||||
<svg viewBox="0 0 27 25 " xmlns="http://www.w3.org/2000/svg ">
|
||||
<path d="M25.7845 12.7129L13.3922 18.037L1 12.7129 " stroke="#000000" stroke-width="1.6 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path d="M25.7845 18.4629L13.3922 23.787L1 18.4629 " stroke="#000000" stroke-width="1.6 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path fill-rule="evenodd " clip-rule="evenodd "
|
||||
d="M13.3922 11.6481L1 6.32407L13.3922 1L25.7845 6.32407L13.3922 11.6481Z " stroke="#000000"
|
||||
stroke-width="1.6 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="fillsvg">
|
||||
<svg viewBox="0 0 27 25 " xmlns="http://www.w3.org/2000/svg ">
|
||||
<path d="M25.7845 12.7129L13.3922 18.037L1 12.7129 " stroke="#DF166A" stroke-width="1.6 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path d="M25.7845 18.4629L13.3922 23.787L1 18.4629 " stroke="#DF166A" stroke-width="1.6 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path fill-rule="evenodd " clip-rule="evenodd "
|
||||
d="M13.3922 11.6481L1 6.32407L13.3922 1L25.7845 6.32407L13.3922 11.6481Z " stroke="#DF166A"
|
||||
stroke-width="1.6 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
</svg>
|
||||
</div>
|
||||
<p>Courses</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: Course }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" [ngClass]="{ active: Course }">
|
||||
<div>
|
||||
<!-- <a mat-list-item routerLink="templates" [routerLinkActive]="['active']">Course Templates</a> -->
|
||||
<!-- <a mat-list-item routerLink="liveclass" [routerLinkActive]="['active']">Live Class</a> -->
|
||||
<!-- <a mat-list-item routerLink="selfpaced" [routerLinkActive]="['active']">Self-Paced Classes</a> -->
|
||||
<a mat-list-item routerLink="selfpaced" [routerLinkActive]="['active']">Class</a>
|
||||
<!-- <a mat-list-item routerLink="hybridtemplates" [routerLinkActive]="['active']">Hybrid Templates</a>
|
||||
<a mat-list-item routerLink="hybridclass" [routerLinkActive]="['active']">Hybrid Class</a>
|
||||
<a mat-list-item routerLink="gamification" [routerLinkActive]="['active']">Gamification</a> -->
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
|
||||
<ng-container>
|
||||
<div (click)="LiveEvents()" [ngClass]="{ 'active mainActive': LiveEvent }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<div class="unfill">
|
||||
<svg width="40" height="29" viewBox="0 0 40 29" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.85 28.3C4.05 26.5 2.625 24.3917 1.575 21.975C0.525 19.5583 0 16.95 0 14.15C0 11.35 0.525 8.74167 1.575 6.325C2.625 3.90833 4.05 1.8 5.85 0L8 2.15C6.46667 3.68333 5.25 5.475 4.35 7.525C3.45 9.575 3 11.7833 3 14.15C3 16.5167 3.44167 18.7167 4.325 20.75C5.20833 22.7833 6.43333 24.5833 8 26.15L5.85 28.3ZM11.5 22.65C10.4333 21.5833 9.58333 20.325 8.95 18.875C8.31667 17.425 8 15.85 8 14.15C8 12.45 8.31667 10.875 8.95 9.425C9.58333 7.975 10.4333 6.71667 11.5 5.65L13.65 7.8C12.85 8.6 12.2083 9.54167 11.725 10.625C11.2417 11.7083 11 12.8833 11 14.15C11 15.4167 11.2333 16.5833 11.7 17.65C12.1667 18.7167 12.8167 19.6667 13.65 20.5L11.5 22.65ZM20 18.15C18.9 18.15 17.9583 17.7583 17.175 16.975C16.3917 16.1917 16 15.25 16 14.15C16 13.05 16.3917 12.1083 17.175 11.325C17.9583 10.5417 18.9 10.15 20 10.15C21.1 10.15 22.0417 10.5417 22.825 11.325C23.6083 12.1083 24 13.05 24 14.15C24 15.25 23.6083 16.1917 22.825 16.975C22.0417 17.7583 21.1 18.15 20 18.15ZM28.5 22.65L26.35 20.5C27.15 19.7 27.7917 18.7583 28.275 17.675C28.7583 16.5917 29 15.4167 29 14.15C29 12.8833 28.7667 11.7167 28.3 10.65C27.8333 9.58333 27.1833 8.63333 26.35 7.8L28.5 5.65C29.5667 6.71667 30.4167 7.975 31.05 9.425C31.6833 10.875 32 12.45 32 14.15C32 15.8167 31.6833 17.375 31.05 18.825C30.4167 20.275 29.5667 21.55 28.5 22.65ZM34.15 28.3L32 26.15C33.5333 24.6167 34.75 22.825 35.65 20.775C36.55 18.725 37 16.5167 37 14.15C37 11.7833 36.5583 9.58333 35.675 7.55C34.7917 5.51667 33.5667 3.71667 32 2.15L34.15 0C35.95 1.83333 37.375 3.95833 38.425 6.375C39.475 8.79167 40 11.3833 40 14.15C40 16.9167 39.475 19.5083 38.425 21.925C37.375 24.3417 35.95 26.4667 34.15 28.3Z" fill="#000000"/>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="fillsvg">
|
||||
<svg width="40" height="30" viewBox="0 0 40 30" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path d="M5.85 29.15C4.05 27.35 2.625 25.2417 1.575 22.825C0.525 20.4083 0 17.8 0 15C0 12.2 0.525 9.59167 1.575 7.17501C2.625 4.75834 4.05 2.65001 5.85 0.850006L8 3.00001C6.46667 4.53334 5.25 6.32501 4.35 8.37501C3.45 10.425 3 12.6333 3 15C3 17.3667 3.44167 19.5667 4.325 21.6C5.20833 23.6333 6.43333 25.4333 8 27L5.85 29.15ZM11.5 23.5C10.4333 22.4333 9.58333 21.175 8.95 19.725C8.31667 18.275 8 16.7 8 15C8 13.3 8.31667 11.725 8.95 10.275C9.58333 8.82501 10.4333 7.56667 11.5 6.50001L13.65 8.65001C12.85 9.45001 12.2083 10.3917 11.725 11.475C11.2417 12.5583 11 13.7333 11 15C11 16.2667 11.2333 17.4333 11.7 18.5C12.1667 19.5667 12.8167 20.5167 13.65 21.35L11.5 23.5ZM20 19C18.9 19 17.9583 18.6083 17.175 17.825C16.3917 17.0417 16 16.1 16 15C16 13.9 16.3917 12.9583 17.175 12.175C17.9583 11.3917 18.9 11 20 11C21.1 11 22.0417 11.3917 22.825 12.175C23.6083 12.9583 24 13.9 24 15C24 16.1 23.6083 17.0417 22.825 17.825C22.0417 18.6083 21.1 19 20 19ZM28.5 23.5L26.35 21.35C27.15 20.55 27.7917 19.6083 28.275 18.525C28.7583 17.4417 29 16.2667 29 15C29 13.7333 28.7667 12.5667 28.3 11.5C27.8333 10.4333 27.1833 9.48334 26.35 8.65001L28.5 6.50001C29.5667 7.56667 30.4167 8.82501 31.05 10.275C31.6833 11.725 32 13.3 32 15C32 16.6667 31.6833 18.225 31.05 19.675C30.4167 21.125 29.5667 22.4 28.5 23.5ZM34.15 29.15L32 27C33.5333 25.4667 34.75 23.675 35.65 21.625C36.55 19.575 37 17.3667 37 15C37 12.6333 36.5583 10.4333 35.675 8.40001C34.7917 6.36667 33.5667 4.56667 32 3.00001L34.15 0.850006C35.95 2.68334 37.375 4.80834 38.425 7.22501C39.475 9.64167 40 12.2333 40 15C40 17.7667 39.475 20.3583 38.425 22.775C37.375 25.1917 35.95 27.3167 34.15 29.15Z" fill="#DF166A"/>
|
||||
</svg>
|
||||
</div>
|
||||
<!-- <p>Live Events</p> -->
|
||||
<p>Webinar</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: LiveEvent }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" [ngClass]="{ active: LiveEvent }">
|
||||
<div>
|
||||
<a mat-list-item routerLink="liveevent" [routerLinkActive]="['active']">Create Webinar</a>
|
||||
<a mat-list-item routerLink="recordings" [routerLinkActive]="['active']">Recordings</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
|
||||
<!-- <ng-container>
|
||||
<div (click)="practiceApp()" [ngClass]="{ 'active mainActive': IspracticeApp }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" id="Capa_1" enable-background="new 0 0 512 512" viewBox="0 0 512 512"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<path
|
||||
d="m330.247 120.753c5.858 5.858 15.355 5.858 21.213 0s5.858-15.355 0-21.213c-52.637-52.637-138.282-52.637-190.919 0-5.858 5.858-5.858 15.355 0 21.213s15.355 5.858 21.213 0c40.939-40.938 107.553-40.938 148.493 0z" />
|
||||
<path
|
||||
d="m467 0h-422c-24.813 0-45 20.187-45 45v240c0 24.813 20.187 45 45 45h166v58.54l-23.972-16.424c-30.05-20.589-71.161-1.298-74.53 34.973-1.595 17.167 6.189 33.861 20.365 43.675l61.485 42.566c17.642 12.214 38.308 18.67 59.766 18.67h181.886c24.813 0 45-20.187 45-45v-122c0-5.765-1.102-11.275-3.086-16.345 19.556-4.891 34.086-22.605 34.086-43.655v-240c0-24.813-20.187-45-45-45zm-437 139.271 20.403 10.202c5.92 2.959 9.597 8.909 9.597 15.527s-3.677 12.568-9.597 15.528l-20.403 10.201zm15 160.729c-8.271 0-15-6.729-15-15v-60.729l33.82-16.91c16.148-8.075 26.18-24.307 26.18-42.361s-10.032-34.286-26.181-42.361l-33.819-16.91v-60.729c0-8.271 6.729-15 15-15h377v270h-121v-72.988c0-25.638-21.552-46.338-47.491-44.932-23.406 1.267-42.509 22.232-42.509 45.673v72.247zm406 167c0 8.271-6.729 15-15 15h-181.886c-15.327 0-30.089-4.611-42.69-13.335l-61.485-42.566c-5.269-3.648-8.162-9.853-7.57-16.234 1.253-13.482 16.533-20.652 27.703-12.999l47.45 32.509c2.543 1.743 5.505 2.626 8.479 2.626 2.395 0 4.796-.573 6.993-1.73 4.924-2.595 8.006-7.704 8.006-13.27v-189.584c0-7.688 5.618-14.44 13.257-15.306 9.047-1.026 16.743 6.056 16.743 14.901v147.988c0 8.284 6.716 15 15 15s15-6.716 15-15v-45h30v45c0 8.284 6.716 15 15 15s15-6.716 15-15v-45h30v45c0 8.284 6.716 15 15 15s15-6.716 15-15v-45h15c8.271 0 15 6.729 15 15zm31-182c0 8.271-6.729 15-15 15h-15v-270h15c8.271 0 15 6.729 15 15z" />
|
||||
<path
|
||||
d="m224.181 163.18c8.499-8.499 19.799-13.18 31.819-13.18s23.32 4.681 31.819 13.18c2.93 2.929 6.768 4.394 10.607 4.394 3.838 0 7.678-1.465 10.606-4.393 5.858-5.858 5.858-15.355 0-21.213-14.164-14.167-32.999-21.968-53.032-21.968s-38.868 7.801-53.033 21.967c-5.857 5.858-5.857 15.355 0 21.213 5.858 5.858 15.355 5.859 21.214 0z" />
|
||||
</g>
|
||||
</svg>
|
||||
<p>Practice Question App</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: IspracticeApp }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" #abc [ngClass]="{ active: IspracticeApp }">
|
||||
<div>
|
||||
<a mat-list-item routerLink="practiceappques" [routerLinkActive]="['active']">Questions
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a mat-list-item routerLink="feedback" [routerLinkActive]="['active']">Feedback
|
||||
</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container> -->
|
||||
|
||||
<ng-container>
|
||||
<div (click)="practice()" [ngClass]="{ 'active mainActive': Ispractice }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<div class="unfill">
|
||||
<svg _ngcontent-plw-c56="" viewBox="0 0 25 25 " fill="none" xmlns="http://www.w3.org/2000/svg ">
|
||||
<path _ngcontent-plw-c56="" fill-rule="evenodd " clip-rule="evenodd "
|
||||
d="M17.159 22.5804L14.1838 23.6601L14.8389 20.5636L20.8901 13.6026L23.2101 15.6193L17.159 22.5804Z "
|
||||
stroke="#000000 " stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M8.76697 6.96094L6.28636 9.56458L4.86914 8.26276 " stroke="#000000 "
|
||||
stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M9.32686 22.5217H2C1.44771 22.5217 1 22.074 1 21.5217V2C1 1.44772 1.44772 1 2 1L14.7946 1L18.9348 4.79795V9.96715 "
|
||||
stroke="#000000 " stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M8.76697 12.2871L6.28636 14.8908L4.86914 13.5889 " stroke="#000000 "
|
||||
stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M11.9404 14.0978H14.4013 " stroke="#000000 " stroke-width="1.4 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M11.9404 8.77165H14.4013 " stroke="#000000 " stroke-width="1.4 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="fillsvg">
|
||||
<svg _ngcontent-plw-c56="" viewBox="0 0 25 25 " fill="none " xmlns="http://www.w3.org/2000/svg ">
|
||||
<path _ngcontent-plw-c56="" fill-rule="evenodd " clip-rule="evenodd "
|
||||
d="M17.159 22.5804L14.1838 23.6601L14.8389 20.5636L20.8901 13.6026L23.2101 15.6193L17.159 22.5804Z "
|
||||
stroke="#DF166A " stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M8.76697 6.96094L6.28636 9.56458L4.86914 8.26276 " stroke="#DF166A "
|
||||
stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M9.32686 22.5217H2C1.44771 22.5217 1 22.074 1 21.5217V2C1 1.44772 1.44772 1 2 1L14.7946 1L18.9348 4.79795V9.96715 "
|
||||
stroke="#DF166A " stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M8.76697 12.2871L6.28636 14.8908L4.86914 13.5889 " stroke="#DF166A "
|
||||
stroke-width="1.4 " stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M11.9404 14.0978H14.4013 " stroke="#DF166A " stroke-width="1.4 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
<path _ngcontent-plw-c56="" d="M11.9404 8.77165H14.4013 " stroke="#DF166A " stroke-width="1.4 "
|
||||
stroke-linecap="round " stroke-linejoin="round "></path>
|
||||
</svg>
|
||||
</div>
|
||||
|
||||
<p>Practice Question</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: Ispractice }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" #abc [ngClass]="{ active: Ispractice }">
|
||||
<div>
|
||||
<a mat-list-item routerLink="Practicetest" [routerLinkActive]="['active']">Exams
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a mat-list-item routerLink="PracticetestQuestion" [routerLinkActive]="['active']">Questions
|
||||
</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
|
||||
<!-- <ng-container>
|
||||
<div (click)="catexam()" [ngClass]="{ 'active mainActive': Iscatexam }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<div class="unfill">
|
||||
<svg _ngcontent-plw-c56="" viewBox="0 0 25 25 " fill="none " xmlns="http://www.w3.org/2000/svg ">
|
||||
<path _ngcontent-plw-c56="" d="M14.7944 0.299805C14.9346 0.299805 15.0707 0.341863 15.1856 0.419332L15.2676 0.48397L19.4078 4.28192C19.5234 4.38799 19.5992 4.52896 19.6249 4.68153L19.6346 4.79776V9.0944C19.6346 9.481 19.3212 9.7944 18.9346 9.7944C18.5802
|
||||
9.7944 18.2873 9.53106 18.241 9.18939L18.2346 9.0944L18.2338 5.1048L14.5218 1.6988L1.9998 1.6998C1.85779 1.6998 1.73882 1.79848 1.70773 1.93102L1.6998 1.9998V21.5215C1.6998 21.6636 1.79848 21.7825 1.93102 21.8136L1.9998 21.8215H9.32667C9.71327
|
||||
21.8215 10.0267 22.1349 10.0267 22.5215C10.0267 22.8759 9.76332 23.1688 9.42165 23.2152L9.32667 23.2215H1.9998C1.11034 23.2215 0.380415 22.5384 0.306045 21.6682L0.299805 21.5215V1.9998C0.299805 1.11034 0.982912 0.380415 1.85312 0.306045L1.9998
|
||||
0.299805H14.7944Z " fill="#000000 "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M9.24949 6.4539C8.96959 6.18722 8.5265 6.19795 8.25983 6.47785L6.2528 8.58381L5.34235 7.74701L5.25253 7.67694C4.97089 7.49189 4.58867 7.53274 4.35329 7.78898C4.09176 8.07369 4.11055 8.51651 4.39527 8.77804L5.81248 10.0799L5.90112
|
||||
10.1491C6.17902 10.3325 6.55591 10.2959 6.79283 10.0472L9.27344 7.44356L9.34513 7.35503C9.53528 7.0768 9.5014 6.6939 9.24949 6.4539Z "
|
||||
fill="#000000 "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M18.3911 15.4526C18.7455 15.4526 19.0384 15.7159 19.0847 16.0576L19.0911 16.1526L19.0908 18.4908L21.1085 18.4912C21.4629 18.4912 21.7558 18.7545 21.8021 19.0962L21.8085 19.1912C21.8085 19.5456 21.5452 19.8384 21.2035 19.8848L21.1085
|
||||
19.8912H18.3911C18.0367 19.8912 17.7439 19.6278 17.6975 19.2862L17.6911 19.1912V16.1526C17.6911 15.766 18.0045 15.4526 18.3911 15.4526Z "
|
||||
fill="#000000 "></path>
|
||||
<path _ngcontent-plw-c56="" fill-rule="evenodd " clip-rule="evenodd "
|
||||
d="M18.3911 11.8694C21.9933 11.8694 24.9128 14.79 24.9128 18.3911C24.9128 21.9922 21.9933 24.9128 18.3911 24.9128C14.7889 24.9128 11.8694 21.9922 11.8694 18.3911C11.8694 14.79 14.7889 11.8694 18.3911 11.8694ZM18.3911 13.2694C15.5625
|
||||
13.2694 13.2694 15.5628 13.2694 18.3911C13.2694 21.2194 15.5625 23.5128 18.3911 23.5128C21.2197 23.5128 23.5128 21.2194 23.5128 18.3911C23.5128 15.5628 21.2197 13.2694 18.3911 13.2694Z "
|
||||
fill="#000000 "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M9.24949 11.78C8.96959 11.5133 8.5265 11.524 8.25983 11.8039L6.2528 13.9098L5.34235 13.0731L5.25253 13.003C4.97089 12.818 4.58867 12.8588 4.35329 13.1151C4.09176 13.3998 4.11055 13.8426 4.39527 14.1041L5.81248 15.406L5.90112
|
||||
15.4752C6.17902 15.6586 6.55591 15.622 6.79283 15.3733L9.27344 12.7696L9.34513 12.6811C9.53528 12.4029 9.5014 12.02 9.24949 11.78Z "
|
||||
fill="#000000 "></path>
|
||||
<path _ngcontent-plw-c56="" d="M15.1011 8.77154C15.1011 8.38494 14.7877 8.07154 14.4011 8.07154H11.9402L11.8452 8.07793C11.5036 8.12429 11.2402 8.41716 11.2402 8.77154C11.2402 9.15814 11.5536 9.47154 11.9402 9.47154H14.4011L14.4961 9.46515C14.8378 9.4188
|
||||
15.1011 9.12593 15.1011 8.77154Z " fill="#000000 "></path>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="fillsvg">
|
||||
<svg _ngcontent-plw-c56="" viewBox="0 0 25 25 " fill="none " xmlns="http://www.w3.org/2000/svg ">
|
||||
<path _ngcontent-plw-c56="" d="M14.7944 0.299805C14.9346 0.299805 15.0707 0.341863 15.1856 0.419332L15.2676 0.48397L19.4078 4.28192C19.5234 4.38799 19.5992 4.52896 19.6249 4.68153L19.6346 4.79776V9.0944C19.6346 9.481 19.3212 9.7944 18.9346 9.7944C18.5802
|
||||
9.7944 18.2873 9.53106 18.241 9.18939L18.2346 9.0944L18.2338 5.1048L14.5218 1.6988L1.9998 1.6998C1.85779 1.6998 1.73882 1.79848 1.70773 1.93102L1.6998 1.9998V21.5215C1.6998 21.6636 1.79848 21.7825 1.93102 21.8136L1.9998 21.8215H9.32667C9.71327
|
||||
21.8215 10.0267 22.1349 10.0267 22.5215C10.0267 22.8759 9.76332 23.1688 9.42165 23.2152L9.32667 23.2215H1.9998C1.11034 23.2215 0.380415 22.5384 0.306045 21.6682L0.299805 21.5215V1.9998C0.299805 1.11034 0.982912 0.380415 1.85312 0.306045L1.9998
|
||||
0.299805H14.7944Z " fill="#DF166A "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M9.24949 6.4539C8.96959 6.18722 8.5265 6.19795 8.25983 6.47785L6.2528 8.58381L5.34235 7.74701L5.25253 7.67694C4.97089 7.49189 4.58867 7.53274 4.35329 7.78898C4.09176 8.07369 4.11055 8.51651 4.39527 8.77804L5.81248 10.0799L5.90112
|
||||
10.1491C6.17902 10.3325 6.55591 10.2959 6.79283 10.0472L9.27344 7.44356L9.34513 7.35503C9.53528 7.0768 9.5014 6.6939 9.24949 6.4539Z "
|
||||
fill="#DF166A "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M18.3911 15.4526C18.7455 15.4526 19.0384 15.7159 19.0847 16.0576L19.0911 16.1526L19.0908 18.4908L21.1085 18.4912C21.4629 18.4912 21.7558 18.7545 21.8021 19.0962L21.8085 19.1912C21.8085 19.5456 21.5452 19.8384 21.2035 19.8848L21.1085
|
||||
19.8912H18.3911C18.0367 19.8912 17.7439 19.6278 17.6975 19.2862L17.6911 19.1912V16.1526C17.6911 15.766 18.0045 15.4526 18.3911 15.4526Z "
|
||||
fill="#DF166A "></path>
|
||||
<path _ngcontent-plw-c56="" fill-rule="evenodd " clip-rule="evenodd "
|
||||
d="M18.3911 11.8694C21.9933 11.8694 24.9128 14.79 24.9128 18.3911C24.9128 21.9922 21.9933 24.9128 18.3911 24.9128C14.7889 24.9128 11.8694 21.9922 11.8694 18.3911C11.8694 14.79 14.7889 11.8694 18.3911 11.8694ZM18.3911 13.2694C15.5625
|
||||
13.2694 13.2694 15.5628 13.2694 18.3911C13.2694 21.2194 15.5625 23.5128 18.3911 23.5128C21.2197 23.5128 23.5128 21.2194 23.5128 18.3911C23.5128 15.5628 21.2197 13.2694 18.3911 13.2694Z "
|
||||
fill="#DF166A "></path>
|
||||
<path _ngcontent-plw-c56=""
|
||||
d="M9.24949 11.78C8.96959 11.5133 8.5265 11.524 8.25983 11.8039L6.2528 13.9098L5.34235 13.0731L5.25253 13.003C4.97089 12.818 4.58867 12.8588 4.35329 13.1151C4.09176 13.3998 4.11055 13.8426 4.39527 14.1041L5.81248 15.406L5.90112
|
||||
15.4752C6.17902 15.6586 6.55591 15.622 6.79283 15.3733L9.27344 12.7696L9.34513 12.6811C9.53528 12.4029 9.5014 12.02 9.24949 11.78Z "
|
||||
fill="#DF166A "></path>
|
||||
<path _ngcontent-plw-c56="" d="M15.1011 8.77154C15.1011 8.38494 14.7877 8.07154 14.4011 8.07154H11.9402L11.8452 8.07793C11.5036 8.12429 11.2402 8.41716 11.2402 8.77154C11.2402 9.15814 11.5536 9.47154 11.9402 9.47154H14.4011L14.4961 9.46515C14.8378 9.4188
|
||||
15.1011 9.12593 15.1011 8.77154Z " fill="#DF166A "></path>
|
||||
</svg>
|
||||
</div>
|
||||
<p>CAT</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: Iscatexam }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" #abc [ngClass]="{ active: Iscatexam }">
|
||||
<div>
|
||||
<a mat-list-item routerLink="CateExamTest" [routerLinkActive]="['active']">Exams
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a mat-list-item routerLink="CateExamQuestion" [routerLinkActive]="['active']">Questions
|
||||
</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container> -->
|
||||
|
||||
|
||||
<!-- <ng-container>
|
||||
<div (click)="LiveQuestion()" [ngClass]="{ 'active mainActive': liveQ }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<div class="unfill">
|
||||
<svg fill="none" version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512"
|
||||
style="enable-background: new 0 0 512 512; fill: #000000" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<circle cx="256" cy="378.5" r="25" />
|
||||
<path d="M256,0C114.516,0,0,114.497,0,256c0,141.484,114.497,256,256,256c141.484,0,256-114.497,256-256
|
||||
C512,114.516,397.503,0,256,0z M256,472c-119.377,0-216-96.607-216-216c0-119.377,96.607-216,216-216
|
||||
c119.377,0,216,96.607,216,216C472,375.377,375.393,472,256,472z" />
|
||||
<path
|
||||
d="M256,128.5c-44.112,0-80,35.888-80,80c0,11.046,8.954,20,20,20s20-8.954,20-20c0-22.056,17.944-40,40-40
|
||||
c22.056,0,40,17.944,40,40c0,22.056-17.944,40-40,40c-11.046,0-20,8.954-20,20v50c0,11.046,8.954,20,20,20
|
||||
c11.046,0,20-8.954,20-20v-32.531c34.466-8.903,60-40.26,60-77.469C336,164.388,300.112,128.5,256,128.5z" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
</svg>
|
||||
</div>
|
||||
<div class="fillsvg">
|
||||
<svg fill="none" version="1.1" id="Capa_2" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 512 512"
|
||||
style="enable-background: new 0 0 512 512; fill: #DF166A !important" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<g>
|
||||
<circle cx="256" cy="378.5" r="25" />
|
||||
<path d="M256,0C114.516,0,0,114.497,0,256c0,141.484,114.497,256,256,256c141.484,0,256-114.497,256-256
|
||||
C512,114.516,397.503,0,256,0z M256,472c-119.377,0-216-96.607-216-216c0-119.377,96.607-216,216-216
|
||||
c119.377,0,216,96.607,216,216C472,375.377,375.393,472,256,472z" />
|
||||
<path
|
||||
d="M256,128.5c-44.112,0-80,35.888-80,80c0,11.046,8.954,20,20,20s20-8.954,20-20c0-22.056,17.944-40,40-40
|
||||
c22.056,0,40,17.944,40,40c0,22.056-17.944,40-40,40c-11.046,0-20,8.954-20,20v50c0,11.046,8.954,20,20,20
|
||||
c11.046,0,20-8.954,20-20v-32.531c34.466-8.903,60-40.26,60-77.469C336,164.388,300.112,128.5,256,128.5z" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
</svg>
|
||||
</div>
|
||||
<p>Live Questions</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: liveQ }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" #abc [ngClass]="{ active: liveQ }">
|
||||
<div>
|
||||
<a mat-list-item [routerLinkActive]="['active']">Session
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a mat-list-item routerLink="livequestion" [routerLinkActive]="['active']">Questions
|
||||
</a>
|
||||
</div>
|
||||
<div>
|
||||
<a mat-list-item [routerLinkActive]="['active']">Teacher Screen
|
||||
</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container> -->
|
||||
|
||||
<ng-container>
|
||||
<div (click)="knowledge()" [ngClass]="{ 'active mainActive': Isknowledge }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<svg _ngcontent-plw-c56="" viewBox="0 0 23 25 " xmlns="http://www.w3.org/2000/svg " style="fill: #000000">
|
||||
<path _ngcontent-plw-c56="" fill-rule="evenodd " clip-rule="evenodd "
|
||||
d="M11.1569 0.10462C15.9794 -0.533686 20.5632 1.78279 22.2023 6.12394C23.579 9.77142 22.5029 13.6327 19.6339 16.8454C19.113 17.4297 18.8703 18.5695 18.8402 20.069L18.837 20.3957V22.9246C18.837 23.6993 18.253 24.3413 17.4996 24.4185L17.3468
|
||||
24.4263H8.35379C7.56683 24.4263 6.92078 23.81 6.86689 23.0225L6.83667 22.6372L6.79821 22.214C6.68448 21.7187 6.33332 21.4703 5.54374 21.5608L5.36776 21.5854C3.42801 21.9008 1.98725 21.2043 1.85578 19.6092L1.84568 19.4054C1.83613 19.1277 1.82813
|
||||
18.63 1.82033 17.9325L1.81033 16.8948L1.16968 16.748C0.01129 16.4797 -0.392409 15.0345 0.443399 14.1918C1.11296 13.5182 1.5654 12.9672 1.84117 12.531L1.96928 12.315C2.03559 12.193 2.06682 12.1119 2.08169 12.0521C2.12624 11.8713 2.12722 11.663
|
||||
2.08233 11.2804L1.9741 10.4808C1.92988 10.1288 1.91566 9.89615 1.92865 9.64566L1.9374 9.51829L1.97238 9.17959C2.32779 6.2553 4.0427 3.52155 6.53056 1.8346C7.88988 0.914244 9.4824 0.325381 11.1569 0.10462ZM20.7074 6.68826C19.3488 3.08977 15.4949
|
||||
1.1422 11.3662 1.68869C9.93274 1.87766 8.5759 2.37938 7.42683 3.15738C5.32652 4.58154 3.8726 6.89014 3.56332 9.33382L3.52951 9.65327L3.52431 9.7379C3.51949 9.86393 3.5272 10.0021 3.55048 10.2045L3.67473 11.1368C3.73865 11.6896 3.73249 12.0311
|
||||
3.63268 12.4361C3.47955 13.0517 2.97312 13.8746 1.80426 15.0859L1.66995 15.2217L2.15321 15.3285C2.57558 15.4243 2.8166 15.4891 2.95562 15.5544L3.00434 15.5796L3.40063 15.8086L3.42293 18.3178C3.43042 18.8879 3.43854 19.295 3.44578 19.4392L3.44816
|
||||
19.4773C3.48512 19.9258 3.91823 20.162 4.90582 20.038L5.11077 20.0084C6.83524 19.7267 8.03989 20.4818 8.36963 21.9363L8.41507 22.3547L8.455 22.8284H17.2385L17.2392 20.3957C17.2392 18.4755 17.4994 16.9855 18.2877 15.9671L18.4417 15.7816C20.9444
|
||||
12.979 21.8523 9.72149 20.7074 6.68826ZM6.9785 8.85204C6.9895 8.81315 6.96162 8.77574 6.92201 8.7728C6.80169 8.7662 6.57499 8.71631 6.37618 8.4588C6.17222 8.19689 6.02403 7.55422 6.39452 6.80517C6.66523 6.26228 7.09955 6.00624 7.25508 5.92921C7.28369
|
||||
5.91453 7.2969 5.88078 7.28443 5.85071C7.24628 5.75313 7.21253 5.5235 7.55294 5.23298C7.74442 5.06864 8.05622 5.04003 8.16846 5.03563C8.19414 5.0349 8.21542 5.01949 8.22422 4.99528C8.26531 4.87936 8.42744 4.53382 8.94833 4.29465C9.4406 4.06869
|
||||
10.0268 4.1824 10.1963 4.22349C10.2234 4.23009 10.252 4.21762 10.2659 4.19194C10.3298 4.07162 10.5323 3.74075 10.8888 3.6153C11.362 3.45023 11.8337 3.66519 11.9629 3.73195C11.9849 3.74295 12.0098 3.74002 12.0282 3.72608C12.0366 3.71945 12.0463
|
||||
3.71146 12.0573 3.70238C12.1807 3.60089 12.47 3.36293 12.9973 3.36293C13.5578 3.36293 13.896 3.64684 13.9782 3.73708C13.9958 3.75616 14.0229 3.76276 14.0457 3.75249C14.3369 3.63144 14.7015 3.61163 14.9818 3.7723C14.9864 3.77495 14.9919 3.77797
|
||||
14.9983 3.78144C15.0766 3.82413 15.2808 3.93551 15.3853 4.27338C15.397 4.31079 15.4389 4.3284 15.4733 4.31226C16.3794 3.88308 17.7124 4.53675 17.7975 5.56899L17.8239 5.86098C17.8261 5.88812 17.8437 5.9094 17.8687 5.91747C18.4857 6.10161 18.7468
|
||||
6.92769 18.4461 7.42584C18.4085 7.48775 18.4815 7.59215 18.5941 7.75298C18.7935 8.03807 19.1171 8.50051 19.1687 9.21812C19.2699 10.6113 18.5275 11.0346 18.3221 11.1241C18.2942 11.1359 18.2795 11.1674 18.2876 11.1975C18.3272 11.3435 18.4035
|
||||
11.7639 18.1174 12.2143C17.7146 12.8497 16.9678 12.6391 16.7352 12.554C16.6985 12.5401 16.6611 12.565 16.6538 12.6031C16.5003 13.508 14.8321 13.5306 14.2417 13.5386C14.115 13.5403 14.0379 13.5413 14.0361 13.5503L13.7867 14.752C13.7808 14.7813
|
||||
13.7559 14.8019 13.7273 14.8019H13.2108C13.1836 14.8019 13.1594 14.7835 13.1521 14.7564C13.0685 14.4505 12.5769 12.6897 12.2277 12.3698C11.9106 12.0794 11.5163 11.9895 11.1155 11.8982C11.0972 11.894 11.0788 11.8898 11.0605 11.8856C10.6489
|
||||
11.7917 10.2373 11.6487 9.93287 11.3391C9.8776 11.2827 9.8182 11.2187 9.75417 11.1497C9.35929 10.7243 8.78849 10.1093 7.9249 9.91802C6.85378 9.68178 6.91687 9.07286 6.9785 8.85204Z ">
|
||||
</path>
|
||||
</svg>
|
||||
<!-- <p>Knowledge Assessments</p> -->
|
||||
<p>Knowledge Test</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: Isknowledge }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" #abc [ngClass]="{ active: Isknowledge }">
|
||||
<div>
|
||||
<a mat-list-item routerLink="Knowlegeass" [routerLinkActive]="['active']">Assessment
|
||||
</a>
|
||||
<a mat-list-item routerLink="knowlegeassques" [routerLinkActive]="['active']">Questions
|
||||
</a>
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
|
||||
<ng-container>
|
||||
<div (click)="studymaterial()" [ngClass]="{ 'active mainActive': StudyMaterial }"
|
||||
class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 412.72 412.72"
|
||||
style="enable-background: new 0 0 412.72 412.72; fill: #000000" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path
|
||||
d="M404.72,82.944c-0.027,0-0.054,0-0.08,0h0h-27.12v-9.28c0.146-3.673-2.23-6.974-5.76-8
|
||||
c-18.828-4.934-38.216-7.408-57.68-7.36c-32,0-75.6,7.2-107.84,40c-32-33.12-75.92-40-107.84-40
|
||||
c-19.464-0.048-38.852,2.426-57.68,7.36c-3.53,1.026-5.906,4.327-5.76,8v9.2H8c-4.418,0-8,3.582-8,8v255.52c0,4.418,3.582,8,8,8
|
||||
c1.374-0.004,2.724-0.362,3.92-1.04c0.8-0.4,80.8-44.16,192.48-16h1.2h0.72c0.638,0.077,1.282,0.077,1.92,0
|
||||
c112-28.4,192,15.28,192.48,16c2.475,1.429,5.525,1.429,8,0c2.46-1.42,3.983-4.039,4-6.88V90.944
|
||||
C412.72,86.526,409.139,82.944,404.72,82.944z M16,333.664V98.944h19.12v200.64c-0.05,4.418,3.491,8.04,7.909,8.09
|
||||
c0.432,0.005,0.864-0.025,1.291-0.09c16.55-2.527,33.259-3.864,50-4c23.19-0.402,46.283,3.086,68.32,10.32
|
||||
C112.875,307.886,62.397,314.688,16,333.664z M94.32,287.664c-14.551,0.033-29.085,0.968-43.52,2.8V79.984
|
||||
c15.576-3.47,31.482-5.241,47.44-5.28c29.92,0,71.2,6.88,99.84,39.2l0.24,199.28C181.68,302.304,149.2,287.664,94.32,287.664z
|
||||
M214.32,113.904c28.64-32,69.92-39.2,99.84-39.2c15.957,0.047,31.863,1.817,47.44,5.28v210.48
|
||||
c-14.354-1.849-28.808-2.811-43.28-2.88c-54.56,0-87.12,14.64-104,25.52V113.904z M396.64,333.664
|
||||
c-46.496-19.028-97.09-25.831-146.96-19.76c22.141-7.26,45.344-10.749,68.64-10.32c16.846,0.094,33.663,1.404,50.32,3.92
|
||||
c4.368,0.663,8.447-2.341,9.11-6.709c0.065-0.427,0.095-0.859,0.09-1.291V98.944h19.12L396.64,333.664z" />
|
||||
</g>
|
||||
</g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
</svg>
|
||||
<p>Study Materials</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: StudyMaterial }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" #abc [ngClass]="{ active: StudyMaterial }">
|
||||
<div>
|
||||
<!-- <a mat-list-item routerLink="studymaterial" [routerLinkActive]="['active']">Written</a> -->
|
||||
<a mat-list-item routerLink="studymaterial" [routerLinkActive]="['active']">Content</a>
|
||||
<a mat-list-item routerLink="videolesson" [routerLinkActive]="['active']">Videos</a>
|
||||
<!-- <a mat-list-item routerLink="mindmaps" [routerLinkActive]="['active']">Mind Maps</a>
|
||||
<a mat-list-item routerLink="books" [routerLinkActive]="['active']">Books</a>
|
||||
<a mat-list-item routerLink="references" [routerLinkActive]="['active']">References</a>
|
||||
<a mat-list-item routerLink="flashcard" [routerLinkActive]="['active']">Flashcards</a>
|
||||
<a mat-list-item routerLink="acronyms" [routerLinkActive]="['active']">Acronyms</a> -->
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
|
||||
<ng-container>
|
||||
<div (click)="sendmail()" [ngClass]="{ 'active mainActive': Issendmail }" class="expand-options dropdown">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" enable-background="new 0 0 24 24" viewBox="0 0 24 24"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="m20.5 20c-.082 0-.164-.014-.242-.04l-19.75-6.75c-.284-.098-.482-.354-.506-.653-.022-.299.135-.583.4-.722l22.5-11.75c.251-.129.554-.109.782.054.23.164.349.442.308.722l-2.75 18.5c-.033.22-.162.414-.353.53-.118.072-.253.109-.389.109zm-17.854-7.645 17.244 5.894 2.401-16.152z" />
|
||||
<path
|
||||
d="m9.5 23c-.078 0-.157-.012-.233-.037-.309-.102-.517-.389-.517-.713v-6.75c0-.189.072-.373.201-.512l13.75-14.75c.282-.304.759-.319 1.061-.037.303.282.319.757.037 1.061l-13.549 14.533v4.168l2.503-3.407c.245-.332.715-.406 1.049-.16.334.245.405.715.16 1.049l-3.857 5.25c-.145.195-.371.305-.605.305z" />
|
||||
</svg>
|
||||
<p>Send Mail</p>
|
||||
</div>
|
||||
<span class="material-icons" [ngClass]="{ roted: Issendmail }">
|
||||
expand_more
|
||||
</span>
|
||||
</div>
|
||||
<mat-list class="list-div" #abc [ngClass]="{ active: Issendmail }">
|
||||
<div>
|
||||
<!-- <a mat-list-item routerLink="sendmail" [routerLinkActive]="['active']">Templates</a> -->
|
||||
<a mat-list-item routerLink="manuallysend" [routerLinkActive]="['active']">Manually Send</a>
|
||||
<!-- <a mat-list-item routerLink="variables" [routerLinkActive]="['active']">Variables</a>
|
||||
<a mat-list-item routerLink="failedemails" [routerLinkActive]="['active']">Failed Email</a>
|
||||
<a mat-list-item routerLink="successemails" [routerLinkActive]="['active']">Success Email</a> -->
|
||||
</div>
|
||||
</mat-list>
|
||||
</ng-container>
|
||||
<!-- <div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg version="1.1" id="Capa_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" viewBox="0 0 512 512" style="enable-background: new 0 0 512 512; fill: #000000"
|
||||
xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M432,0.033H80c-44.183,0-80,35.817-80,80v256c0,44.183,35.817,80,80,80h313.44l91.36,91.36
|
||||
c6.31,6.186,16.441,6.084,22.626-0.226c2.916-2.974,4.557-6.969,4.574-11.134v-416C512,35.85,476.183,0.033,432,0.033z
|
||||
M480,457.473l-68.64-68.64c-2.993-3.054-7.084-4.782-11.36-4.8H80c-26.51,0-48-21.49-48-48v-256c0-26.51,21.49-48,48-48h352
|
||||
c26.51,0,48,21.49,48,48V457.473z" />
|
||||
</g>
|
||||
</g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
<g></g>
|
||||
</svg>
|
||||
|
||||
<a routerLink="discussion"> Discussion </a>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" width="451.317" height="534.153" viewBox="0 0 451.317 534.153">
|
||||
<g id="Group_1" data-name="Group 1" transform="translate(0)">
|
||||
<g id="Path_8" data-name="Path 8" transform="translate(225.659 0) rotate(45)" fill="none">
|
||||
<path
|
||||
d="M68.517,12.328,269.293.1c29.25-1.782,51.518,20.486,49.737,49.737L306.8,250.613c-1.782,29.25-26.938,54.407-56.188,56.188L49.837,319.03C20.586,320.811-1.682,298.543.1,269.293L12.328,68.517C14.11,39.266,39.266,14.11,68.517,12.328Z"
|
||||
stroke="none" />
|
||||
<path
|
||||
d="M 272.5564575195312 21.99996948242188 C 271.920654296875 21.99996948242188 271.2783203125 22.0196533203125 270.6303405761719 22.05914306640625 L 69.85440063476562 34.28778076171875 C 51.68209838867188 35.39459228515625 35.39459228515625 51.68209838867188 34.28778076171875 69.85440063476562 L 22.05914306640625 270.6302795410156 C 21.60284423828125 278.1220703125 23.86013793945312 284.9140930175781 28.41522216796875 289.7550354003906 C 33.28323364257812 294.9284973144531 40.478515625 297.5592651367188 48.49920654296875 297.0703430175781 L 249.2752075195312 284.8417053222656 C 267.4474487304688 283.7349548339844 283.7349548339844 267.4474487304688 284.8417053222656 249.275146484375 L 297.0703430175781 48.49920654296875 C 297.5266418457031 41.0074462890625 295.2693481445312 34.2154541015625 290.7142639160156 29.37451171875 C 286.2395324707031 24.61895751953125 279.7909545898438 21.99996948242188 272.5564575195312 21.99996948242188 M 272.5564575195312 -3.0517578125e-05 C 300.1812744140625 -3.0517578125e-05 320.7443237304688 21.68417358398438 319.0296630859375 49.83670043945312 L 306.801025390625 250.6126403808594 C 305.01953125 279.8630981445312 279.8630981445312 305.01953125 250.6126403808594 306.801025390625 L 49.83670043945312 319.0296630859375 C 20.58575439453125 320.8112487792969 -1.68170166015625 298.5432434082031 0.099822998046875 269.2928466796875 L 12.32846069335938 68.51689147949219 C 14.11001586914062 39.26644897460938 39.26644897460938 14.11001586914062 68.51689147949219 12.32846069335938 L 269.2928466796875 0.099822998046875 C 270.3908081054688 0.032958984375 271.4790649414062 -3.0517578125e-05 272.5564575195312 -3.0517578125e-05 Z"
|
||||
stroke="none" fill="#000000" />
|
||||
</g>
|
||||
<path id="Path_9" data-name="Path 9" d="M0,0,1.886,138.309"
|
||||
transform="matrix(0.999, -0.035, 0.035, 0.999, 77.814, 289.77)" fill="none" stroke="#000000"
|
||||
stroke-linecap="round" stroke-width="22" />
|
||||
<line id="Line_2" data-name="Line 2" y2="151.809" transform="translate(367.532 290.576)" fill="none"
|
||||
stroke="#000000" stroke-linecap="round" stroke-width="22" />
|
||||
<path id="Path_7" data-name="Path 7"
|
||||
d="M0,0S5.686,26.342,26.163,46,56,67.022,81.912,78.633s52.816,12.142,52.816,12.142,4.067.46,7.177.46-13.2-.109,5.256-.478l21.367-2.6,50.605-10.54S252.673,65.41,268.477,46c15.8-19.395,13.87-46,13.87-46"
|
||||
transform="matrix(0.999, -0.035, 0.035, 0.999, 85.531, 431.523)" fill="none" stroke="#000000"
|
||||
stroke-linecap="round" stroke-linejoin="round" stroke-width="22" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<a routerLink="mini-master-class"> Mini MasterClass </a>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 24 24" height="24px"
|
||||
viewBox="0 0 24 24" width="24px">
|
||||
<g>
|
||||
<rect fill="none" height="24" width="24" />
|
||||
</g>
|
||||
<g>
|
||||
<g />
|
||||
<g>
|
||||
<path
|
||||
d="M21,5c-1.11-0.35-2.33-0.5-3.5-0.5c-1.95,0-4.05,0.4-5.5,1.5c-1.45-1.1-3.55-1.5-5.5-1.5S2.45,4.9,1,6v14.65 c0,0.25,0.25,0.5,0.5,0.5c0.1,0,0.15-0.05,0.25-0.05C3.1,20.45,5.05,20,6.5,20c1.95,0,4.05,0.4,5.5,1.5c1.35-0.85,3.8-1.5,5.5-1.5 c1.65,0,3.35,0.3,4.75,1.05c0.1,0.05,0.15,0.05,0.25,0.05c0.25,0,0.5-0.25,0.5-0.5V6C22.4,5.55,21.75,5.25,21,5z M21,18.5 c-1.1-0.35-2.3-0.5-3.5-0.5c-1.7,0-4.15,0.65-5.5,1.5V8c1.35-0.85,3.8-1.5,5.5-1.5c1.2,0,2.4,0.15,3.5,0.5V18.5z" />
|
||||
<g>
|
||||
<path
|
||||
d="M17.5,10.5c0.88,0,1.73,0.09,2.5,0.26V9.24C19.21,9.09,18.36,9,17.5,9c-1.7,0-3.24,0.29-4.5,0.83v1.66 C14.13,10.85,15.7,10.5,17.5,10.5z" />
|
||||
<path
|
||||
d="M13,12.49v1.66c1.13-0.64,2.7-0.99,4.5-0.99c0.88,0,1.73,0.09,2.5,0.26V11.9c-0.79-0.15-1.64-0.24-2.5-0.24 C15.8,11.66,14.26,11.96,13,12.49z" />
|
||||
<path
|
||||
d="M17.5,14.33c-1.7,0-3.24,0.29-4.5,0.83v1.66c1.13-0.64,2.7-0.99,4.5-0.99c0.88,0,1.73,0.09,2.5,0.26v-1.52 C19.21,14.41,18.36,14.33,17.5,14.33z" />
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<a routerLink="class-materials"> Assigned Materials </a>
|
||||
</div>
|
||||
</div> -->
|
||||
<!-- <div class="expand-options revision-materials" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg width="21px" height="21px" viewBox="0 0 21 21" version="1.1" xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>icon-self study</title>
|
||||
<g id="Page-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<path
|
||||
d="M18.8276473,9.19265498 L18.8331433,9.27546004 L18.8338042,11.763471 C18.6502508,11.6927824 18.4492371,11.6542172 18.2372047,11.6542172 C18.0009624,11.6542172 17.7783986,11.7020919 17.5784231,11.7889315 L17.5794553,9.9898434 L10.6881928,10.9088537 L10.6881928,19.6588537 L17.5794553,18.7400165 L17.5784231,17.2619484 C17.7783986,17.348788 18.0009624,17.3966628 18.2372047,17.3966628 C18.4492371,17.3966628 18.6502508,17.3580976 18.8338042,17.287409 L18.8331433,19.2889139 C18.8331433,19.6029343 18.6006803,19.8684497 18.2894144,19.9099518 L10.1444731,20.995944 L10.0754754,21 L10.0304953,21.0007742 L9.97886299,20.995944 L1.83392168,19.9099518 C1.52265584,19.8684497 1.29019279,19.6029343 1.29019279,19.2889139 L1.28868511,17.2727239 C1.48203852,17.3527399 1.69577107,17.3966628 1.92205302,17.3966628 C2.14384747,17.3966628 2.35358533,17.3544647 2.5438935,17.2774417 L2.54264054,18.7400165 L9.43451395,19.6597683 L9.43451395,10.9095952 L2.54264054,9.9898434 L2.5438935,11.7734382 C2.35358533,11.6964152 2.14384747,11.6542172 1.92205302,11.6542172 C1.69577107,11.6542172 1.48203852,11.6981401 1.28868511,11.7781561 L1.29019279,9.27546004 C1.29019279,8.92943489 1.57070159,8.64892609 1.91672674,8.64892609 L1.95822036,8.6503016 L10.0611928,9.72885366 L18.1238043,8.65442211 C18.4667941,8.60869014 18.7819153,8.8496652 18.8276473,9.19265498 Z M1.38916471,12.52815 C2.00178677,12.52815 2.4782706,13.0046338 2.4782706,13.6172559 L2.4782706,15.3189839 C2.4782706,15.9316059 2.00178677,16.4080898 1.38916471,16.4080898 C0.776542639,16.4080898 0,15.9316059 0,15.3189839 L0,13.6172559 C0,13.0046338 0.776542639,12.52815 1.38916471,12.52815 Z M18.7392267,12.52815 C19.3518488,12.52815 20.1285539,13.0046338 20.1285539,13.6172559 L20.1285539,15.3189839 C20.1285539,15.9316059 19.3518488,16.4080898 18.7392267,16.4080898 C18.1266046,16.4080898 17.6501208,15.9316059 17.6501208,15.3189839 L17.6501208,13.6172559 C17.6501208,13.0046338 18.1266046,12.52815 18.7392267,12.52815 Z M10.1733892,0 C12.5832945,0 14.5369026,1.91124196 14.5369026,4.26888597 C14.5369026,6.62652999 12.5832945,8.53777194 10.1733892,8.53777194 C7.76348381,8.53777194 5.8098758,6.62652999 5.8098758,4.26888597 C5.8098758,1.91124196 7.76348381,0 10.1733892,0 Z M10.1733892,1.50252726 C8.6117012,1.50252726 7.34570923,2.74106485 7.34570923,4.26888597 C7.34570923,5.7967071 8.6117012,7.03524469 10.1733892,7.03524469 C11.7350772,7.03524469 13.0010691,5.7967071 13.0010691,4.26888597 C13.0010691,2.74106485 11.7350772,1.50252726 10.1733892,1.50252726 Z"
|
||||
id="icon-self-study" fill="#000000" fill-rule="nonzero"></path>
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<a routerLink="study-time"> Revision Materials </a>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<!-- <div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" viewBox="0 0 444 444.76925" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="m140.257812 210.304688c-19.09375-.074219-37.425781 7.492187-50.90625 21.015624l-67.917968 67.921876c-28.066406 28.132812-28.066406 73.671874 0 101.804687l22.636718 22.640625c28.117188 28.109375 73.695313 28.109375 101.808594 0l67.921875-67.917969c23.464844-23.882812 27.585938-60.703125 9.976563-89.175781l-23.769532 23.789062c5.832032 14.765626 2.335938 31.578126-8.894531 42.792969l-67.839843 67.914063c-15.636719 15.609375-40.957032 15.609375-56.59375 0l-22.640626-22.640625c-15.605468-15.636719-15.605468-40.957031 0-56.59375l67.921876-67.839844c11.207031-11.234375 28.015624-14.734375 42.773437-8.902344l23.785156-23.785156c-11.445312-7.238281-24.71875-11.0625-38.261719-11.023437zm0 0" />
|
||||
<path
|
||||
d="m294.902344 161.535156-11.316406-11.320312c-3.125-3.121094-8.191407-3.121094-11.3125 0l-124.449219 124.457031c-3.125 3.125-3.125 8.1875 0 11.3125l11.3125 11.3125c3.167969 3.015625 8.144531 3.015625 11.3125 0l124.453125-124.449219c3.125-3.121094 3.125-8.1875 0-11.3125zm0 0" />
|
||||
<path
|
||||
d="m356.121094 213.449219 67.917968-67.921875c28.066407-28.132813 28.066407-73.671875 0-101.808594l-22.640624-22.636719c-28.113282-28.109375-73.691407-28.109375-101.804688 0l-67.921875 67.917969c-23.464844 23.882812-27.585937 60.699219-9.976563 89.175781l23.769532-23.792969c-5.832032-14.761718-2.335938-31.574218 8.894531-42.789062l67.839844-67.914062c15.636719-15.609376 40.957031-15.609376 56.59375 0l22.640625 22.640624c15.605468 15.636719 15.605468 40.957032 0 56.59375l-67.921875 67.839844c-11.191407 11.265625-28.027344 14.757813-42.777344 8.878906l-23.796875 23.800782c28.425781 17.835937 65.40625 13.695312 89.183594-9.992188zm0 0" />
|
||||
</svg>
|
||||
|
||||
<a routerLink="urlshortener"> URL_Shortener </a>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" viewBox="-35 0 511 512" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="m436.03125 107.03125-104.601562-102.734375c-2.804688-2.753906-6.578126-4.296875-10.511719-4.296875h-264.449219c-30.859375 0-55.96875 25.105469-55.96875 55.96875v400.0625c0 30.859375 25.105469 55.96875 55.96875 55.96875h328.082031c30.859375 0 55.96875-25.105469 55.96875-55.96875v-338.296875c0-4.027344-1.617187-7.882813-4.488281-10.703125zm-100.113281-56.273438 52.921875 51.976563h-48.152344c-2.628906 0-4.769531-2.140625-4.769531-4.769531zm48.632812 431.242188h-328.082031c-14.316406 0-25.96875-11.648438-25.96875-25.96875v-400.0625c0-14.320312 11.648438-25.96875 25.96875-25.96875h249.453125v67.964844c0 19.171875 15.597656 34.769531 34.769531 34.769531h69.828125v323.296875c0 14.320312-11.648437 25.96875-25.96875 25.96875zm0 0" />
|
||||
<path
|
||||
d="m324.644531 238h-211.453125c-8.285156 0-15 6.714844-15 15s6.714844 15 15 15h211.453125c8.285157 0 15-6.714844 15-15s-6.714843-15-15-15zm0 0" />
|
||||
<path
|
||||
d="m113.191406 328h172.414063c8.285156 0 15-6.714844 15-15s-6.714844-15-15-15h-172.414063c-8.285156 0-15 6.714844-15 15s6.714844 15 15 15zm0 0" />
|
||||
<path
|
||||
d="m306.40625 358h-193.214844c-8.285156 0-15 6.714844-15 15s6.714844 15 15 15h193.214844c8.28125 0 15-6.714844 15-15s-6.71875-15-15-15zm0 0" />
|
||||
</svg>
|
||||
<a routerLink="reports"> Reports </a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" viewBox="-35 0 511 512" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="m436.03125 107.03125-104.601562-102.734375c-2.804688-2.753906-6.578126-4.296875-10.511719-4.296875h-264.449219c-30.859375 0-55.96875 25.105469-55.96875 55.96875v400.0625c0 30.859375 25.105469 55.96875 55.96875 55.96875h328.082031c30.859375 0 55.96875-25.105469 55.96875-55.96875v-338.296875c0-4.027344-1.617187-7.882813-4.488281-10.703125zm-100.113281-56.273438 52.921875 51.976563h-48.152344c-2.628906 0-4.769531-2.140625-4.769531-4.769531zm48.632812 431.242188h-328.082031c-14.316406 0-25.96875-11.648438-25.96875-25.96875v-400.0625c0-14.320312 11.648438-25.96875 25.96875-25.96875h249.453125v67.964844c0 19.171875 15.597656 34.769531 34.769531 34.769531h69.828125v323.296875c0 14.320312-11.648437 25.96875-25.96875 25.96875zm0 0" />
|
||||
<path
|
||||
d="m324.644531 238h-211.453125c-8.285156 0-15 6.714844-15 15s6.714844 15 15 15h211.453125c8.285157 0 15-6.714844 15-15s-6.714843-15-15-15zm0 0" />
|
||||
<path
|
||||
d="m113.191406 328h172.414063c8.285156 0 15-6.714844 15-15s-6.714844-15-15-15h-172.414063c-8.285156 0-15 6.714844-15 15s6.714844 15 15 15zm0 0" />
|
||||
<path
|
||||
d="m306.40625 358h-193.214844c-8.285156 0-15 6.714844-15 15s6.714844 15 15 15h193.214844c8.28125 0 15-6.714844 15-15s-6.71875-15-15-15zm0 0" />
|
||||
</svg>
|
||||
<a routerLink="payment-transactions"> Payment Transactions </a>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg width="26" height="21" viewBox="0 0 26 21" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M8.01743 0H17.0174C18.2048 0 19.1674 0.962588 19.1674 2.15V16.15C19.1674 17.3374 18.2048 18.3 17.0174 18.3H8.01743C6.83002 18.3 5.86743 17.3374 5.86743 16.15V2.15C5.86743 0.962588 6.83002 0 8.01743 0ZM17.0174 1.3H8.01743C7.54799 1.3 7.16743 1.68056 7.16743 2.15V16.15C7.16743 16.6194 7.54799 17 8.01743 17H17.0174C17.4869 17 17.8674 16.6194 17.8674 16.15V2.15C17.8674 1.68056 17.4869 1.3 17.0174 1.3ZM6.23123 20.8697C5.07079 21.1404 4.17545 20.6355 3.6982 19.4598L3.62977 19.2784L0.0727169 5.9001C-0.21873 4.80395 0.391355 3.68005 1.44735 3.3158L1.59407 3.27091L3.17412 2.84754C3.52087 2.75462 3.87729 2.9604 3.9702 3.30715C4.05467 3.62238 3.89228 3.9456 3.60154 4.07157L3.51058 4.10324L1.93053 4.52661C1.51254 4.63861 1.25109 5.04349 1.30809 5.46146L1.32907 5.56606L4.87111 18.8957C5.10167 19.5511 5.39257 19.7305 5.93589 19.6037C6.28549 19.5222 6.63501 19.7394 6.71657 20.089C6.79812 20.4386 6.58083 20.7882 6.23123 20.8697ZM21.3057 19.4598C20.8285 20.6355 19.9331 21.1404 18.7727 20.8697C18.4231 20.7882 18.2058 20.4386 18.2873 20.089C18.3689 19.7394 18.7184 19.5222 19.068 19.6037C19.6113 19.7305 19.9022 19.5511 20.1328 18.8957L23.6748 5.56606L23.6958 5.46146C23.7528 5.04349 23.4914 4.63861 23.0734 4.52661L21.4933 4.10324L21.4024 4.07157C21.1116 3.9456 20.9492 3.62238 21.0337 3.30715C21.1266 2.9604 21.483 2.75462 21.8298 2.84754L23.4098 3.27091L23.5566 3.3158C24.6126 3.68005 25.2226 4.80395 24.9312 5.9001L21.3741 19.2784L21.3057 19.4598Z"
|
||||
fill="#000000" />
|
||||
</svg>
|
||||
<a routerLink="application-version"> App Version </a>
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
|
||||
<div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" id="Capa_1" enable-background="new 0 0 512 512" viewBox="0 0 512 512"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<g>
|
||||
<path
|
||||
d="m472 232.096v-16.096c0-57.696-22.468-111.938-63.265-152.735-40.797-40.797-95.039-63.265-152.735-63.265s-111.938 22.468-152.735 63.265-63.265 95.039-63.265 152.735v16.096c-23.057 6.548-40 27.777-40 52.904v80c0 30.327 24.673 55 55 55h60c8.284 0 15-6.716 15-15v-189c0-69.477 56.523-126 126-126s126 56.523 126 126v189c0 8.284 6.716 15 15 15h25v17c0 8.271-6.729 15-15 15h-98.58c-6.192-17.459-22.865-30-42.42-30h-20c-24.813 0-45 20.187-45 45s20.187 45 45 45h20c19.555 0 36.228-12.541 42.42-30h98.58c24.813 0 45-20.187 45-45v-17h5c30.327 0 55-24.673 55-55v-80c0-25.127-16.943-46.356-40-52.904zm-206 249.904h-20c-8.271 0-15-6.729-15-15s6.729-15 15-15h20c8.271 0 15 6.729 15 15s-6.729 15-15 15zm-166-92h-45c-13.785 0-25-11.215-25-25v-80c0-13.785 11.215-25 25-25h45zm156-330c-86.019 0-156 69.981-156 156v14h-30v-14c0-102.561 83.439-186 186-186s186 83.439 186 186v14h-30v-14c0-86.019-69.981-156-156-156zm226 305c0 13.785-11.215 25-25 25h-45v-130h45c13.785 0 25 11.215 25 25z" />
|
||||
<path
|
||||
d="m286.397 376.523c2.749 2.291 6.16 3.477 9.605 3.477 2.158 0 4.33-.466 6.36-1.416 5.271-2.469 8.638-7.764 8.638-13.584v-35h5c19.299 0 35-15.701 35-35v-80c0-19.299-15.701-35-35-35h-120c-19.299 0-35 15.701-35 35v80c0 19.299 15.701 35 35 35h34.569zm-95.397-81.523v-80c0-2.757 2.243-5 5-5h120c2.757 0 5 2.243 5 5v80c0 2.757-2.243 5-5 5h-20c-8.284 0-15 6.716-15 15v17.975l-35.397-29.498c-2.696-2.247-6.094-3.477-9.603-3.477h-40c-2.757 0-5-2.243-5-5z" />
|
||||
<path d="m276 270c8.284 0 15-6.716 15-15s-6.716-15-15-15h-40c-8.284 0-15 6.716-15 15s6.716 15 15 15z" />
|
||||
</g>
|
||||
</svg>
|
||||
|
||||
<a routerLink="support" [routerLinkActive]="['active']"> Support </a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="expand-options" [routerLinkActive]="['active']">
|
||||
<div class="d-flex">
|
||||
<svg style="fill: #000000" viewBox="0 0 512.016 512" xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="m496 240.007812h-202.667969c-8.832031 0-16-7.167968-16-16 0-8.832031 7.167969-16 16-16h202.667969c8.832031 0 16 7.167969 16 16 0 8.832032-7.167969 16-16 16zm0 0" />
|
||||
<path
|
||||
d="m416 320.007812c-4.097656 0-8.191406-1.558593-11.308594-4.691406-6.25-6.253906-6.25-16.386718 0-22.636718l68.695313-68.691407-68.695313-68.695312c-6.25-6.25-6.25-16.382813 0-22.632813 6.253906-6.253906 16.386719-6.253906 22.636719 0l80 80c6.25 6.25 6.25 16.382813 0 22.632813l-80 80c-3.136719 3.15625-7.230469 4.714843-11.328125 4.714843zm0 0" />
|
||||
<path
|
||||
d="m170.667969 512.007812c-4.566407 0-8.898438-.640624-13.226563-1.984374l-128.386718-42.773438c-17.46875-6.101562-29.054688-22.378906-29.054688-40.574219v-384c0-23.53125 19.136719-42.6679685 42.667969-42.6679685 4.5625 0 8.894531.6406255 13.226562 1.9843755l128.382813 42.773437c17.472656 6.101563 29.054687 22.378906 29.054687 40.574219v384c0 23.53125-19.132812 42.667968-42.664062 42.667968zm-128-480c-5.867188 0-10.667969 4.800782-10.667969 10.667969v384c0 4.542969 3.050781 8.765625 7.402344 10.28125l127.785156 42.582031c.917969.296876 2.113281.46875 3.480469.46875 5.867187 0 10.664062-4.800781 10.664062-10.667968v-384c0-4.542969-3.050781-8.765625-7.402343-10.28125l-127.785157-42.582032c-.917969-.296874-2.113281-.46875-3.476562-.46875zm0 0" />
|
||||
<path
|
||||
d="m325.332031 170.675781c-8.832031 0-16-7.167969-16-16v-96c0-14.699219-11.964843-26.667969-26.664062-26.667969h-240c-8.832031 0-16-7.167968-16-16 0-8.832031 7.167969-15.9999995 16-15.9999995h240c32.363281 0 58.664062 26.3046875 58.664062 58.6679685v96c0 8.832031-7.167969 16-16 16zm0 0" />
|
||||
<path
|
||||
d="m282.667969 448.007812h-85.335938c-8.832031 0-16-7.167968-16-16 0-8.832031 7.167969-16 16-16h85.335938c14.699219 0 26.664062-11.96875 26.664062-26.667968v-96c0-8.832032 7.167969-16 16-16s16 7.167968 16 16v96c0 32.363281-26.300781 58.667968-58.664062 58.667968zm0 0" />
|
||||
</svg>
|
||||
<a (click)="Logout()"> Logout </a>
|
||||
</div>
|
||||
</div>
|
||||
</mat-nav-list>
|
||||
</mat-sidenav>
|
||||
|
||||
<mat-sidenav-content>
|
||||
<div style="height: 88vh;background: #fff;">
|
||||
<router-outlet></router-outlet>
|
||||
</div>
|
||||
</mat-sidenav-content>
|
||||
</mat-sidenav-container>
|
||||
@ -0,0 +1,342 @@
|
||||
@import "../../../src/utils/theme/colorVariable.scss";
|
||||
.logheader {
|
||||
max-width: 100px;
|
||||
margin: 0 8px;
|
||||
cursor: pointer;
|
||||
|
||||
img {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
}
|
||||
.revision-materials {
|
||||
&:hover {
|
||||
.d-flex {
|
||||
svg {
|
||||
path {
|
||||
fill: $Pink;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.active {
|
||||
.d-flex {
|
||||
svg {
|
||||
path {
|
||||
fill: $Pink;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.header-logo {
|
||||
button {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
.main-header-profile {
|
||||
display: flex;
|
||||
background: none;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
.header-logo {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background: $White;
|
||||
width: 258px;
|
||||
padding: 0 20px;
|
||||
box-sizing: border-box;
|
||||
border-right: 1px solid $Black;
|
||||
}
|
||||
|
||||
.profile {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
padding-right: 25px;
|
||||
height: 100%;
|
||||
width: calc(100% - 258px);
|
||||
justify-content: flex-end;
|
||||
box-sizing: border-box;
|
||||
background: $White;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
text-align: end;
|
||||
font-weight: 200;
|
||||
font-size: 14px;
|
||||
color: $Black;
|
||||
margin-right: 10px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.name {
|
||||
color: $Pink;
|
||||
font-size: 17px;
|
||||
white-space: nowrap;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
img {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
object-fit: contain;
|
||||
border-radius: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mat-toolbar.mat-primary {
|
||||
border-bottom: 1px solid $Black;
|
||||
background: $White;
|
||||
}
|
||||
|
||||
.pname {
|
||||
font-weight: normal;
|
||||
font-size: 18px;
|
||||
margin-right: 50px;
|
||||
}
|
||||
|
||||
.mat-list-item-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
width: 258px;
|
||||
background: $White;
|
||||
border-right: 1px solid $Black;
|
||||
z-index: 0 !important;
|
||||
}
|
||||
|
||||
.list-div {
|
||||
display: none;
|
||||
padding: 0 0 0 43px;
|
||||
|
||||
a {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: $Black;
|
||||
letter-spacing: 0.1px;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
transition: all 0.3s;
|
||||
margin-bottom: 13px;
|
||||
font-family: 'mulish-regular';
|
||||
|
||||
&:hover {
|
||||
color: $Pink;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
margin-right: 10px;
|
||||
color: $Black;
|
||||
transform: rotate(-90deg);
|
||||
}
|
||||
|
||||
.roted {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
}
|
||||
|
||||
mat-sidenav-content {
|
||||
background: $White;
|
||||
scrollbar-width: thin;
|
||||
// scrollbar-color: #343560 #090f2f;
|
||||
}
|
||||
|
||||
.expand-options {
|
||||
display: flex !important;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
padding: 11px 0;
|
||||
|
||||
.d-flex {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 90%;
|
||||
|
||||
svg {
|
||||
height: auto;
|
||||
width: 17px;
|
||||
margin: 0 19px 0 24px;
|
||||
}
|
||||
|
||||
p,
|
||||
a {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: $Black;
|
||||
letter-spacing: 0.1px;
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
font-family: 'mulish-regular';
|
||||
}
|
||||
|
||||
.fillsvg {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
&:hover {
|
||||
.d-flex {
|
||||
svg {
|
||||
fill: $Pink !important;
|
||||
}
|
||||
|
||||
p,
|
||||
a {
|
||||
color: $Pink;
|
||||
}
|
||||
|
||||
.fillsvg {
|
||||
display: block;
|
||||
|
||||
svg {
|
||||
fill: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.unfill {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
color: $Pink;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.active {
|
||||
display: block;
|
||||
color: $Pink !important;
|
||||
|
||||
.d-flex {
|
||||
svg {
|
||||
fill: $Pink !important;
|
||||
}
|
||||
|
||||
p,
|
||||
a {
|
||||
color: $Pink;
|
||||
}
|
||||
|
||||
.fillsvg {
|
||||
display: block;
|
||||
|
||||
svg {
|
||||
fill: none !important;
|
||||
}
|
||||
}
|
||||
|
||||
.unfill {
|
||||
display: none;
|
||||
|
||||
svg {
|
||||
fill: none !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
span {
|
||||
color: $Pink;
|
||||
}
|
||||
}
|
||||
|
||||
.mainActive {
|
||||
position: relative;
|
||||
background: $White;
|
||||
|
||||
&::before {
|
||||
width: 3px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: -5px;
|
||||
content: "";
|
||||
border-radius: 0 50px 50px 0;
|
||||
border-left: 10px solid $Pink;
|
||||
height: 100%;
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 1024px) {
|
||||
.sidenav {
|
||||
width: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 767px) {
|
||||
.main-header-profile {
|
||||
.header-logo {
|
||||
background: $White;
|
||||
border: none;
|
||||
padding: 0 10px;
|
||||
|
||||
button {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.pname {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
mat-toolbar-row {
|
||||
width: 180px;
|
||||
}
|
||||
|
||||
mat-sidenav-content {
|
||||
margin-left: 0 !important;
|
||||
z-index: -1;
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
background: $White;
|
||||
}
|
||||
|
||||
.mat-toolbar-row {
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.sidenav {
|
||||
width: 260px;
|
||||
|
||||
.mat-nav-list {
|
||||
a {
|
||||
font-size: 14px;
|
||||
height: auto;
|
||||
padding: 5px 0;
|
||||
|
||||
mat-icon {
|
||||
margin-right: 0;
|
||||
font-size: 15px;
|
||||
color: $Black;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.dropdown {
|
||||
span {
|
||||
font-size: 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { NavigationComponent } from './navigation.component';
|
||||
|
||||
describe('NavigationComponent', () => {
|
||||
let component: NavigationComponent;
|
||||
let fixture: ComponentFixture<NavigationComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ NavigationComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NavigationComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,93 @@
|
||||
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
|
||||
import { AuthorizationService } from '../service/authorization.service';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navigation',
|
||||
templateUrl: './navigation.component.html',
|
||||
styleUrls: ['./navigation.component.scss']
|
||||
})
|
||||
export class NavigationComponent implements OnInit {
|
||||
Isknowledge: boolean = false;
|
||||
Ispractice: boolean = false;
|
||||
Iscatexam: boolean = false;
|
||||
Isacronyms: boolean = false;
|
||||
Issendmail: boolean = false;
|
||||
StudyMaterial: boolean = false;
|
||||
Peoples: boolean = false;
|
||||
CertStructure: boolean = false;
|
||||
Course: boolean = false;
|
||||
IspracticeApp: boolean = false;
|
||||
liveQ: boolean = false;
|
||||
LiveEvent: boolean = false;
|
||||
|
||||
constructor(public router: Router, public auth: AuthorizationService,) { }
|
||||
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
async Logout() {
|
||||
window.localStorage.clear();
|
||||
window.sessionStorage.clear();
|
||||
await this.router.navigate(['/login']);
|
||||
|
||||
}
|
||||
CertStructures() {
|
||||
this.closeAll()
|
||||
this.CertStructure = !this.CertStructure
|
||||
}
|
||||
|
||||
knowledge() {
|
||||
this.closeAll()
|
||||
this.Isknowledge = !this.Isknowledge;
|
||||
}
|
||||
practice() {
|
||||
this.closeAll()
|
||||
this.Ispractice = !this.Ispractice;
|
||||
}
|
||||
catexam() {
|
||||
this.closeAll()
|
||||
this.Iscatexam = !this.Iscatexam;
|
||||
}
|
||||
LiveQuestion() {
|
||||
this.closeAll()
|
||||
this.liveQ = !this.liveQ;
|
||||
}
|
||||
sendmail() {
|
||||
this.closeAll()
|
||||
this.Issendmail = !this.Issendmail;
|
||||
}
|
||||
studymaterial() {
|
||||
this.closeAll()
|
||||
this.StudyMaterial = !this.StudyMaterial;
|
||||
}
|
||||
People() {
|
||||
this.closeAll()
|
||||
this.Peoples = !this.Peoples;
|
||||
}
|
||||
Courses() {
|
||||
this.closeAll()
|
||||
this.Course = !this.Course;
|
||||
}
|
||||
LiveEvents() {
|
||||
this.closeAll()
|
||||
this.LiveEvent = !this.LiveEvent;
|
||||
}
|
||||
practiceApp() {
|
||||
this.closeAll()
|
||||
this.IspracticeApp = !this.IspracticeApp;
|
||||
}
|
||||
closeAll() {
|
||||
this.Isknowledge = false;
|
||||
this.Issendmail = false;
|
||||
this.Iscatexam = false;
|
||||
this.StudyMaterial = false;
|
||||
this.Peoples = false;
|
||||
this.CertStructure = false;
|
||||
this.Course = false;
|
||||
this.Ispractice = false;
|
||||
this.LiveEvent = false;
|
||||
this.liveQ = false;
|
||||
this.IspracticeApp = false;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,114 @@
|
||||
<div class="Profile-Setting">
|
||||
|
||||
<div class="survey-password">
|
||||
<span class="main-title">Change Password</span>
|
||||
<div class="form" [formGroup]="LoginForm">
|
||||
<div class="input-form mb-20">
|
||||
<input formControlName="email" type="email" disabled [(ngModel)]="email" class="input" placeholder="Email" required />
|
||||
<span class="material-icons"> lock </span>
|
||||
</div>
|
||||
<div *ngIf="submitted && f.email.errors" class="invalid-feedback">
|
||||
<div *ngIf="f.email.errors.required">Email is required</div>
|
||||
<div *ngIf="f.email.errors.email">Email must be a valid email address</div>
|
||||
</div>
|
||||
<div *ngIf=" f.email.errors && !submitted && (f.email.dirty || f.email.touched)" class="invalid-feedback">
|
||||
<div *ngIf="f.email.errors.required">Email is required</div>
|
||||
<div *ngIf="f.email.errors.email">Email must be a valid email address</div>
|
||||
</div>
|
||||
|
||||
<div class="input-form mb-20">
|
||||
<input formControlName="oldpassword" type="password" [(ngModel)]="oldpassword" class="input" placeholder="Old Password" required />
|
||||
<span class="material-icons"> lock </span>
|
||||
</div>
|
||||
<div *ngIf="submitted && f.oldpassword.errors" class="invalid-feedback">
|
||||
<div *ngIf="f.oldpassword.errors.required">Old Password is required</div>
|
||||
|
||||
</div>
|
||||
<div *ngIf="f.oldpassword.invalid && !submitted && (f.oldpassword.dirty || f.oldpassword.touched)" class="invalid-feedback">
|
||||
<div *ngIf="f.oldpassword.errors.required">Old Password is required</div>
|
||||
|
||||
</div>
|
||||
<div class="input-form mb-20">
|
||||
<input formControlName="password" type="password" [(ngModel)]="password" (keyup)="PasswordCheck()" class="input" placeholder="New Password" required />
|
||||
<span class="material-icons"> lock </span>
|
||||
</div>
|
||||
<div *ngIf="submitted && f.password.errors" class="invalid-feedback">
|
||||
<div *ngIf="f.password.errors.required">Password is required</div>
|
||||
<div *ngIf="f.password.errors.pattern">Pattern not match</div>
|
||||
</div>
|
||||
<div *ngIf="f.password.invalid && !submitted && (f.password.dirty || f.password.touched)" class="invalid-feedback">
|
||||
<div *ngIf="f.password.errors.required">Password is required</div>
|
||||
<div *ngIf="f.password.errors.pattern">Pattern not match</div>
|
||||
</div>
|
||||
<div class="input-form mb-10">
|
||||
<input name="Confirmpass" type="password" formControlName="Confirmpass" class="input" placeholder="Confirm New Password" required />
|
||||
<span class="material-icons"> visibility </span>
|
||||
</div>
|
||||
<div *ngIf="submitted && f.Confirmpass.errors" class="invalid-feedback">
|
||||
<div *ngIf="f.Confirmpass.errors.required">
|
||||
Confirm Password is required
|
||||
</div>
|
||||
<div *ngIf="f.Confirmpass.errors.confirmedValidator">
|
||||
Passwords must match
|
||||
</div>
|
||||
</div>
|
||||
<div *ngIf="
|
||||
f.Confirmpass.invalid &&
|
||||
!submitted &&
|
||||
(f.Confirmpass.dirty || f.Confirmpass.touched)
|
||||
" class="invalid-feedback">
|
||||
<div *ngIf="f.Confirmpass.errors.required">
|
||||
Confirm Password is required
|
||||
</div>
|
||||
<div *ngIf="f.Confirmpass.errors.confirmedValidator">
|
||||
Passwords must match
|
||||
</div>
|
||||
</div>
|
||||
<div class="strength">
|
||||
<div class="strengthpro">
|
||||
<p>
|
||||
Strength: <span>{{ PassMsg }}</span>
|
||||
</p>
|
||||
<div class="progress">
|
||||
<div class="filler" [ngStyle]="{ 'width.%': PassWidth }"></div>
|
||||
</div>
|
||||
<div class="stronginfo">
|
||||
<p>Please use at least:</p>
|
||||
<ul>
|
||||
<li>
|
||||
<span class="material-icons" [ngClass]="{ Passright: PassLength }">
|
||||
check_circle_outline </span>8 Characters
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<span class="material-icons" [ngClass]="{ Passright: Number }">
|
||||
check_circle_outline
|
||||
</span> 1 Number
|
||||
</li>
|
||||
<li>
|
||||
<span class="material-icons" [ngClass]="{ Passright: IsSpecial }">
|
||||
check_circle_outline
|
||||
</span> 1 Special character
|
||||
</li>
|
||||
<li>
|
||||
<span class="material-icons" [ngClass]="{ Passright: IsUpper }">
|
||||
check_circle_outline
|
||||
</span> 1 Uppercase letter
|
||||
</li>
|
||||
<li>
|
||||
<span class="material-icons" [ngClass]="{ Passright: IsSmall }">
|
||||
check_circle_outline
|
||||
</span> 1 lowercase letter
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<button class="sub-btn" (click)="submit()">
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b" template="<img src='../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,192 @@
|
||||
.Profile-Setting {
|
||||
padding: 30px;
|
||||
position: relative;
|
||||
.main-title {
|
||||
color: #d7779b;
|
||||
font-size: 23px;
|
||||
letter-spacing: 0.5px;
|
||||
display: block;
|
||||
margin-bottom: 30px;
|
||||
}
|
||||
.include-me {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
.toggle-title {
|
||||
display: inline;
|
||||
font-size: 16px;
|
||||
letter-spacing: 0.5px;
|
||||
color: #8d83cf;
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.profile-footer {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: calc(100% - 385px);
|
||||
background: #0a0e2d;
|
||||
right: 0;
|
||||
padding: 20px;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
border-top: 1px solid #1e2352;
|
||||
button {
|
||||
margin-left: 10px;
|
||||
color: #8d83cf;
|
||||
background: #101235;
|
||||
border: 1px solid #363362;
|
||||
padding: 10px 30px;
|
||||
border-radius: 30px;
|
||||
cursor: pointer;
|
||||
&:last-child {
|
||||
color: #fff;
|
||||
border-color: transparent;
|
||||
background: linear-gradient(
|
||||
94deg,
|
||||
rgba(235, 75, 125, 1) 0%,
|
||||
rgba(238, 130, 80, 1) 100%
|
||||
);
|
||||
}
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.survey-password {
|
||||
max-width: 400px;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
transform: translate(-50%, 10%);
|
||||
h4 {
|
||||
font-size: 18px;
|
||||
color: #968bdb;
|
||||
span {
|
||||
color: #e684ad;
|
||||
}
|
||||
}
|
||||
.form {
|
||||
.input-form {
|
||||
position: relative;
|
||||
.input {
|
||||
border: 1px solid #4e4c7e;
|
||||
border-radius: 7px;
|
||||
padding: 10px 35px 10px 10px;
|
||||
background: rgba(16, 17, 61, 0.5);
|
||||
width: 100%;
|
||||
box-sizing: border-box;
|
||||
color: #fff;
|
||||
margin-bottom: 10px;
|
||||
&::placeholder {
|
||||
color: #535180;
|
||||
}
|
||||
}
|
||||
span {
|
||||
position: absolute;
|
||||
right: 10px;
|
||||
top: 8px;
|
||||
font-size: 20px;
|
||||
margin: auto;
|
||||
color: #a9a1dc;
|
||||
&.check {
|
||||
right: 35px;
|
||||
color: #8756d4;
|
||||
}
|
||||
}
|
||||
}
|
||||
.forget {
|
||||
color: #cd85e9;
|
||||
text-align: right;
|
||||
width: 100%;
|
||||
padding: 5px 0;
|
||||
align-items: right;
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.strength {
|
||||
margin-bottom: 10px;
|
||||
.strengthpro {
|
||||
p {
|
||||
font-size: 15px;
|
||||
letter-spacing: 0.5px;
|
||||
color: #8d83cf;
|
||||
font-weight: 100;
|
||||
span {
|
||||
color: #d97cc3;
|
||||
}
|
||||
}
|
||||
.progress {
|
||||
width: 100%;
|
||||
border-radius: 30px;
|
||||
height: 5px;
|
||||
background: #19164b;
|
||||
margin-bottom: 15px;
|
||||
.filler {
|
||||
height: 5px;
|
||||
border-radius: 30px;
|
||||
background: linear-gradient(10deg, #f53eb2 0%, #f174b7 100%);
|
||||
}
|
||||
}
|
||||
.stronginfo {
|
||||
p {
|
||||
color: #a8a3d6;
|
||||
}
|
||||
ul {
|
||||
list-style: none;
|
||||
padding-left: 0;
|
||||
text-align: left;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
margin-top: 5px;
|
||||
li {
|
||||
width: 50%;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
margin-bottom: 5px;
|
||||
color: #7e7aa7;
|
||||
span {
|
||||
font-size: 20px;
|
||||
margin-right: 5px;
|
||||
color: grey;
|
||||
}
|
||||
.active {
|
||||
color: #8343d3;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.Passright {
|
||||
color: #8555ce !important;
|
||||
}
|
||||
|
||||
.sub-btn{
|
||||
background: linear-gradient(
|
||||
47deg
|
||||
, #ee4c7e 0%, #ee8250 100%);
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 30px;
|
||||
color: #fff;
|
||||
letter-spacing: 0.5px;
|
||||
margin: 10px 0;
|
||||
cursor: pointer;
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 480px) {
|
||||
.profile-footer {
|
||||
width: 100%;
|
||||
}
|
||||
.Profile-Setting {
|
||||
padding: 40px 10px 10px 10px;
|
||||
height: calc(100vh - 185px);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { NewchnagepassComponent } from './newchnagepass.component';
|
||||
|
||||
describe('NewchnagepassComponent', () => {
|
||||
let component: NewchnagepassComponent;
|
||||
let fixture: ComponentFixture<NewchnagepassComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ NewchnagepassComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NewchnagepassComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,189 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ConfirmedValidator } from '../confirmed.validator';
|
||||
import {
|
||||
FormBuilder,
|
||||
FormControl,
|
||||
FormGroup,
|
||||
Validators,
|
||||
} from '@angular/forms';
|
||||
import { NgxSpinnerService } from 'ngx-spinner';
|
||||
import { Router } from '@angular/router';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { AuthorizationService } from '../service/authorization.service';
|
||||
import { ServicesService } from '../services.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-newchnagepass',
|
||||
templateUrl: './newchnagepass.component.html',
|
||||
styleUrls: ['./newchnagepass.component.scss']
|
||||
})
|
||||
export class NewchnagepassComponent implements OnInit {
|
||||
public LoginForm: FormGroup;
|
||||
password: any;
|
||||
Confirmpass: any;
|
||||
PassLength: boolean = false;
|
||||
strangth = 0;
|
||||
IsSmall: boolean = false;
|
||||
IsUpper: boolean = false;
|
||||
Number: boolean = false;
|
||||
IsSpecial: boolean = false;
|
||||
PassWidth = 0;
|
||||
PassMsg = 'Poor';
|
||||
email: any;
|
||||
data: any;
|
||||
submitted = false;
|
||||
oldpassword: any;
|
||||
|
||||
constructor(public service: ServicesService, public ActiveRoute: ActivatedRoute, public auth: AuthorizationService, public fb: FormBuilder, public spinner: NgxSpinnerService,
|
||||
public router: Router,) {
|
||||
|
||||
this.ActiveRoute.params.subscribe(async (params) => {
|
||||
try {
|
||||
this.email = JSON.parse(atob(params['email']));
|
||||
} catch (error) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.LoginForm = this.fb.group(
|
||||
{
|
||||
email: ['', [Validators.required, Validators.email]],
|
||||
oldpassword: [
|
||||
'',
|
||||
[
|
||||
Validators.required
|
||||
],
|
||||
],
|
||||
password: [
|
||||
'',
|
||||
[
|
||||
Validators.required,
|
||||
Validators.pattern(
|
||||
'(?=.*[A-Za-z])(?=.*[0-9])(?=.*[$@$!#^~%*?&,.<>"\'\\;:{\\}\\[\\]\\|\\+\\-\\=\\_\\)\\(\\)\\`\\/\\\\\\]])[A-Za-z0-9d$@].{7,}'
|
||||
),
|
||||
],
|
||||
],
|
||||
Confirmpass: ['', Validators.required],
|
||||
},
|
||||
{
|
||||
validator: ConfirmedValidator('password', 'Confirmpass'),
|
||||
}
|
||||
);
|
||||
}
|
||||
get f() {
|
||||
return this.LoginForm.controls;
|
||||
}
|
||||
PasswordCheck() {
|
||||
if (this.password) {
|
||||
if (this.password.length > 0) {
|
||||
this.PassWidth = 0;
|
||||
this.IsSmall = false;
|
||||
this.IsUpper = false;
|
||||
this.Number = false;
|
||||
this.IsSpecial = false;
|
||||
this.PassLength = false;
|
||||
this.PassMsg = 'Poor';
|
||||
if (/[a-z]/.test(this.password)) {
|
||||
this.IsSmall = true;
|
||||
}
|
||||
if (this.password.length >= 8) {
|
||||
this.PassLength = true;
|
||||
}
|
||||
|
||||
if (/[A-Z]/.test(this.password)) {
|
||||
this.IsUpper = true;
|
||||
}
|
||||
|
||||
if (/[0-9]/.test(this.password)) {
|
||||
this.Number = true;
|
||||
}
|
||||
if (/[!@#$%^&*()_+]/.test(this.password)) {
|
||||
this.IsSpecial = true;
|
||||
}
|
||||
|
||||
if (this.PassLength) {
|
||||
this.PassWidth += 20;
|
||||
}
|
||||
if (this.IsSmall) {
|
||||
this.PassWidth += 20;
|
||||
}
|
||||
if (this.IsUpper) {
|
||||
this.PassWidth += 20;
|
||||
}
|
||||
if (this.Number) {
|
||||
this.PassWidth += 20;
|
||||
}
|
||||
if (this.IsSpecial) {
|
||||
this.PassWidth += 20;
|
||||
}
|
||||
|
||||
if (this.PassWidth == 20 || this.PassWidth == 40) {
|
||||
this.PassMsg = 'Poor';
|
||||
}
|
||||
if (this.PassWidth == 60 || this.PassWidth == 80) {
|
||||
this.PassMsg = 'Good';
|
||||
}
|
||||
if (this.PassWidth == 100) {
|
||||
this.PassMsg = 'Strong';
|
||||
}
|
||||
} else {
|
||||
this.PassWidth = 0;
|
||||
this.IsSmall = false;
|
||||
this.IsUpper = false;
|
||||
this.Number = false;
|
||||
this.IsSpecial = false;
|
||||
this.PassLength = false;
|
||||
this.PassMsg = 'Poor';
|
||||
}
|
||||
} else {
|
||||
this.PassWidth = 0;
|
||||
this.IsSmall = false;
|
||||
this.IsUpper = false;
|
||||
this.Number = false;
|
||||
this.IsSpecial = false;
|
||||
this.PassLength = false;
|
||||
this.PassMsg = 'Poor';
|
||||
}
|
||||
}
|
||||
|
||||
submit() {
|
||||
this.ActiveRoute.params.subscribe(async (params) => {
|
||||
try {
|
||||
this.email = JSON.parse(atob(params['email']));
|
||||
} catch (error) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
});
|
||||
|
||||
this.submitted = true;
|
||||
if (this.LoginForm.valid) {
|
||||
this.spinner.show()
|
||||
|
||||
this.auth.TempsignIn(this.email, this.oldpassword, this.password).then(data => {
|
||||
if (data[0].StatusCode == 2) {
|
||||
this.service.ShowSuccess("Change password successfully")
|
||||
this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else if (data[0].StatusCode == 1) {
|
||||
this.spinner.hide();
|
||||
|
||||
this.router.navigate(['/login']);
|
||||
|
||||
}
|
||||
else {
|
||||
this.service.ShowError(data[0].message)
|
||||
this.spinner.hide();
|
||||
}
|
||||
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
this.service.ShowError(err);
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
@ -0,0 +1,156 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Acronyms</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Certification, Abbreviation Name..." [(ngModel)]="Search"
|
||||
autocomplete="off" (keyup)="filter()" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
<button (click)="addNewaddAcronyms()">Add Acronym</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="srno">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span>{{ element.srno }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="certificate_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Certification
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.certificate_name }}">{{
|
||||
element.certificate_name
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="short_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Abbreviation
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.short_name }}">{{
|
||||
element.short_name
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="full_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Phrases</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.full_name }}">{{ element.full_name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="edit(row)" alt="Edit" class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="delete(row)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<mat-paginator style-paginator showFirstLastButtons [showTotalPages]="3" *ngIf="pagination"
|
||||
[length]="dataSource.data ? dataSource.data.length : 0" [pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
<div class="cutome-modal" *ngIf="addAcronyms">
|
||||
<div class="cutome-modal-content">
|
||||
<div class="modal-header">
|
||||
<p *ngIf="!IsUpdate">Add Acronym</p>
|
||||
<p *ngIf="IsUpdate">Edit Acronym</p>
|
||||
<span (click)="closeModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<form class="example-form" [formGroup]="CertificateForm">
|
||||
<div class="formwrapper">
|
||||
<div class="w-50">
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="SelectedCertificate" formControlName="SelectedCertificate" required
|
||||
[ngClass]="{
|
||||
err:
|
||||
CertificateForm.controls['SelectedCertificate'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(CertificateForm.controls['SelectedCertificate'].dirty ||
|
||||
CertificateForm.controls['SelectedCertificate'].touched)
|
||||
}">
|
||||
<option value="">Select Certification</option>
|
||||
<option *ngFor="let item of Certificatelist" value="{{ item.id }}">
|
||||
{{ item.certificate_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-50">
|
||||
<input type="text" [(ngModel)]="Abbreviation" formControlName="Abbreviation"
|
||||
placeholder="Abbreviation" required [ngClass]="{
|
||||
err:
|
||||
CertificateForm.controls['Abbreviation'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(CertificateForm.controls['Abbreviation'].dirty ||
|
||||
CertificateForm.controls['Abbreviation'].touched)
|
||||
}" />
|
||||
</div>
|
||||
<div class="w-100">
|
||||
<input type="text" [(ngModel)]="Fullname" formControlName="Fullname" placeholder="Phrases"
|
||||
required [ngClass]="{
|
||||
err:
|
||||
CertificateForm.controls['Fullname'].hasError('required') &&
|
||||
(CertificateForm.controls['Fullname'].dirty ||
|
||||
CertificateForm.controls['Fullname'].touched)
|
||||
}" />
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="history-div" *ngIf="IsUpdate">
|
||||
<h3><span class="material-icons"> history </span>Audit history</h3>
|
||||
<div class="audit-table">
|
||||
<div class="table-header">
|
||||
<div class="date-title"><span>Date & Time</span></div>
|
||||
<div class="action-title"><span>Action</span></div>
|
||||
</div>
|
||||
<div class="main-body-audit">
|
||||
<div class="table-body" *ngFor="let log of loglist">
|
||||
<div class="date-title">
|
||||
<span>{{ log.createdAt | date: "medium" }}</span>
|
||||
</div>
|
||||
<div class="action-title">
|
||||
<span [innerHTML]="log.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeModal()">Cancel</button>
|
||||
<div *ngIf="!IsUpdate">
|
||||
<button class="submit-btn" (click)="onSubmit()">Save</button>
|
||||
</div>
|
||||
<div *ngIf="IsUpdate">
|
||||
<button class="submit-btn" (click)="UpdateCertificate()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,51 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
.formwrapper {
|
||||
display: block;
|
||||
div {
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 10px 30px 10px 10px;
|
||||
}
|
||||
.select-box {
|
||||
span {
|
||||
right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.w-50 {
|
||||
width: 50%;
|
||||
}
|
||||
.w-100 {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
::ng-deep .mat-paginator-container {
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
.mat-icon-button {
|
||||
background: $paginationBtnBg !important;
|
||||
border-radius: 5px !important;
|
||||
border: 1px solid $paginationBtnBorder !important;
|
||||
margin: 0 5px !important;
|
||||
cursor: pointer;
|
||||
color: $paginationBtnText !important;
|
||||
|
||||
&:hover {
|
||||
border: 1px solid $PaginationBtnHover !important;
|
||||
color: $PaginationBtnHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-paginator-page-size-label {
|
||||
color: $paginationText !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.mat-paginator-range-label {
|
||||
color: $Pink;
|
||||
width: 140px;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AcronymsComponent } from './acronyms.component';
|
||||
|
||||
describe('AcronymsComponent', () => {
|
||||
let component: AcronymsComponent;
|
||||
let fixture: ComponentFixture<AcronymsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AcronymsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AcronymsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,346 @@
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import Swal from 'sweetalert2/dist/sweetalert2.js'
|
||||
import { Router } from '@angular/router';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
|
||||
import { AcronymsService } from '../../services/acronyms/acronyms.service';
|
||||
import { ServicesService } from '../../services.service';
|
||||
@Component({
|
||||
selector: 'app-acronyms',
|
||||
templateUrl: './acronyms.component.html',
|
||||
styleUrls: ['./acronyms.component.scss']
|
||||
})
|
||||
export class AcronymsComponent implements OnInit {
|
||||
displayedColumns: string[] = ['srno', 'certificate_name', 'short_name', 'full_name', 'actions'];
|
||||
dataSource: MatTableDataSource<certificatelist>;
|
||||
Search: any
|
||||
addAcronyms: boolean = false
|
||||
@Input('pagination') pagination: boolean;
|
||||
@ViewChild(MatPaginator, { static: false }) set matPaginator(paginator: MatPaginator) {
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator = paginator;
|
||||
}
|
||||
}
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
Abbreviation: any;
|
||||
Fullname: any;
|
||||
SelectedCertificate: any;
|
||||
id: any;
|
||||
IsUpdate: boolean = false;
|
||||
public CertificateForm: FormGroup;
|
||||
Certificatelist = [];
|
||||
loglist = [];
|
||||
oldAuditValueArray = { "Certificate": "", "Abbreviation": "", "Phrases": "" }
|
||||
newAuditValueArray = { "Certificate": "", "Abbreviation": "", "Phrases": "" }
|
||||
auditHistory = "";
|
||||
constructor(public AcronymsService: AcronymsService, public fb: FormBuilder, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService) {
|
||||
var setlogin = this.auth.isLoggedIn();
|
||||
if (!setlogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
closeModal() {
|
||||
this.addAcronyms = false
|
||||
this.Abbreviation = "";
|
||||
this.SelectedCertificate = "";
|
||||
this.Fullname = "";
|
||||
this.oldAuditValueArray = { "Certificate": "", "Abbreviation": "", "Phrases": "" }
|
||||
this.newAuditValueArray = { "Certificate": "", "Abbreviation": "", "Phrases": "" }
|
||||
this.auditHistory = "";
|
||||
}
|
||||
addNewaddAcronyms() {
|
||||
this.addAcronyms = true
|
||||
this.IsUpdate = false;
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.CertificateForm = this.fb.group({
|
||||
Abbreviation: ['', Validators.required],
|
||||
Fullname: ['', Validators.required],
|
||||
SelectedCertificate: ['', Validators.required]
|
||||
});
|
||||
await this.spinner.show();
|
||||
await this.listCertificatedata();
|
||||
await this.ListCertificate();
|
||||
}
|
||||
async delete(item) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You want to delete!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete'
|
||||
}).then(async (result) => {
|
||||
try {
|
||||
if (result.value) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.AcronymsService.Deleteacronyms(item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + item.full_name + "</span> Acronyms is deleted by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "acronyms", item.id, token);
|
||||
}
|
||||
});
|
||||
await this.listCertificatedata();
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
list.message,
|
||||
'Acronyms has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
async listCertificatedata() {
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
const users: certificatelist[] = [];
|
||||
await this.AcronymsService.Listacronyms(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
"srno": srno,
|
||||
"id": element.id,
|
||||
"certificate_name": element.certificate.certificate_name,
|
||||
"certi_id": element.certi_id,
|
||||
"short_name": element.short_name,
|
||||
"full_name": element.full_name,
|
||||
"status": element.status,
|
||||
"createdAt": element.createdAt,
|
||||
"updatedAt": element.updatedAt
|
||||
})
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.sort = this.sort;
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.filter();
|
||||
this.pagination = true;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
this.service.ShowError(e.meassage);
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator._changePageSize(this.dataSource.paginator.pageSize);
|
||||
}
|
||||
}
|
||||
async edit(item) {
|
||||
this.loglist = [];
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
this.service.get_logs("acronyms", item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.loglist = list.data;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
})
|
||||
this.id = item.id;
|
||||
this.Fullname = item.full_name;
|
||||
this.Abbreviation = item.short_name;
|
||||
this.SelectedCertificate = item.certi_id;
|
||||
this.IsUpdate = true;
|
||||
this.addAcronyms = true;
|
||||
this.oldAuditValueArray = { "Certificate": this.Certificatelist.find(x => x.id == this.SelectedCertificate) ? this.Certificatelist.find(x => x.id == this.SelectedCertificate).certificate_name : '', "Abbreviation": this.Abbreviation, "Phrases": this.Fullname };
|
||||
}
|
||||
async onSubmit() {
|
||||
this.markFormTouched(this.CertificateForm);
|
||||
if (this.CertificateForm.valid) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.AcronymsService.Addacronyms(this.Abbreviation, this.Fullname, this.SelectedCertificate, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + this.Fullname + "</span> Acronyms is added by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "acronyms", list.data.id, token);
|
||||
}
|
||||
});
|
||||
this.addAcronyms = false;
|
||||
this.closeModal();
|
||||
await this.listCertificatedata();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess("Acronyms Added Successfully");
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
async UpdateCertificate() {
|
||||
this.markFormTouched(this.CertificateForm);
|
||||
if (this.CertificateForm.valid) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.AcronymsService.Updateacronyms(this.id, this.Abbreviation, this.Fullname, this.SelectedCertificate, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
this.newAuditValueArray = { "Certificate": this.Certificatelist.find(x => x.id == this.SelectedCertificate) ? this.Certificatelist.find(x => x.id == this.SelectedCertificate).certificate_name : '', "Abbreviation": this.Abbreviation, "Phrases": this.Fullname };
|
||||
var audit = this.auth.compareAuditHist(this.oldAuditValueArray, this.newAuditValueArray);
|
||||
var desc = audit;
|
||||
await this.service.addAdminLogs(desc, "acronyms", this.id, token);
|
||||
}
|
||||
});
|
||||
this.addAcronyms = false;
|
||||
this.IsUpdate = false;
|
||||
this.closeModal();
|
||||
await this.listCertificatedata();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess("Acronyms Updated Successfully");
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
async ListCertificate() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
this.spinner.show();
|
||||
await this.service.ListCertificate(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Certificatelist = list.data;
|
||||
this.SelectedCertificate = "";
|
||||
}
|
||||
})
|
||||
this.spinner.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
markFormTouched(group: FormGroup | FormArray) {
|
||||
Object.keys(group.controls).forEach((key: string) => {
|
||||
const control = group.controls[key];
|
||||
if (control instanceof FormGroup || control instanceof FormArray) { control.markAsTouched(); this.markFormTouched(control); }
|
||||
else { control.markAsTouched(); };
|
||||
});
|
||||
};
|
||||
}
|
||||
export interface certificatelist {
|
||||
srno: number;
|
||||
id: string;
|
||||
certificate_name: string
|
||||
certi_id: string;
|
||||
short_name: string;
|
||||
full_name: string;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
@ -0,0 +1,196 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Admins</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Name/Email" [(ngModel)]="Search" autocomplete="off" (keyup)="filter()"
|
||||
name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
<button (click)="addNewAdmin()">Add Admin</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<!-- Position Column -->
|
||||
<ng-container matColumnDef="SrNo">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span>{{ element.SrNo }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chortname">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Class</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.chortname ? element.chortname : '-' }}">{{
|
||||
element.chortname ? element.chortname : "-"
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<!-- Name Column -->
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.name }}">{{ element.name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="email">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.email }}">{{ element.email }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<!-- Symbol Column -->
|
||||
<ng-container matColumnDef="FreeFlashCissp">
|
||||
<th mat-header-cell *matHeaderCellDef>Free Flash CISSP</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-checkbox class="example-margin" [checked]="
|
||||
element.free_flashcard == '1' || element.free_flashcard == '2'
|
||||
" (change)="Checkboxselect($event.checked, element)" [disabled]="element.free_flashcard == '1'"
|
||||
color="primary">
|
||||
</mat-checkbox>
|
||||
</td>
|
||||
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="FreeFlashCCSP">
|
||||
<th mat-header-cell *matHeaderCellDef>Free Flash CCSP</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-checkbox [checked]="
|
||||
element.free_flashccsp == '1' || element.free_flashccsp == '2'
|
||||
" (change)="CCSPCheckboxselect($event.checked, element)" [disabled]="element.free_flashccsp == '1'"
|
||||
class="example-margin" color="primary">
|
||||
</mat-checkbox>
|
||||
</td>
|
||||
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="praticeque">
|
||||
<th mat-header-cell *matHeaderCellDef>Practice question</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-checkbox class="example-margin" color="primary">
|
||||
</mat-checkbox>
|
||||
</td>
|
||||
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="UserAnslysis">
|
||||
<th mat-header-cell *matHeaderCellDef>User Analysis</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span [routerLink]="['../client/useranalysis', element.id]" class="material-icons">
|
||||
visibility
|
||||
</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="edit(element)" alt="Edit"
|
||||
class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="delete(element)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<mat-paginator style-paginator showFirstLastButtons [showTotalPages]="3" *ngIf="pagination"
|
||||
[length]="dataSource.data ? dataSource.data.length : 0" [pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
|
||||
<div class="cutome-modal" *ngIf="addAdmin">
|
||||
<div class="cutome-modal-content">
|
||||
<div class="modal-header">
|
||||
<p *ngIf="!IsUpdate">Add Admin</p>
|
||||
<p *ngIf="IsUpdate">Edit Admin</p>
|
||||
|
||||
<span (click)="closeModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<form class="example-form" [formGroup]="LoginForm">
|
||||
<div class="formwrapper">
|
||||
<div class="email" *ngIf="!IsUpdate">
|
||||
<div class="input-fill">
|
||||
<input formControlName="email" [(ngModel)]="email" placeholder="Enter Email" required
|
||||
[ngClass]="{
|
||||
err:
|
||||
LoginForm.controls['email'].hasError('required') &&
|
||||
(LoginForm.controls['email'].dirty ||
|
||||
LoginForm.controls['email'].touched)
|
||||
}" />
|
||||
<span class="material-icons">email</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="firs-name">
|
||||
<div class="input-fill">
|
||||
<input formControlName="firstname" [(ngModel)]="firstname"
|
||||
placeholder="Enter first name" required [ngClass]="{
|
||||
err:
|
||||
LoginForm.controls['firstname'].hasError('required') &&
|
||||
(LoginForm.controls['firstname'].dirty ||
|
||||
LoginForm.controls['firstname'].touched)
|
||||
}" />
|
||||
<span class="material-icons">account_circle</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="last-name">
|
||||
<div class="input-fill">
|
||||
<input formControlName="lastname" [(ngModel)]="lastname" placeholder="Enter last name"
|
||||
required [ngClass]="{
|
||||
err:
|
||||
LoginForm.controls['lastname'].hasError('required') &&
|
||||
(LoginForm.controls['lastname'].dirty ||
|
||||
LoginForm.controls['lastname'].touched)
|
||||
}" />
|
||||
<span class="material-icons">account_circle</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="history-div" *ngIf="IsUpdate">
|
||||
<h3><span class="material-icons"> history </span>Audit history</h3>
|
||||
<div class="audit-table">
|
||||
<div class="table-header">
|
||||
<div class="date-title"><span>Date & Time</span></div>
|
||||
<div class="action-title"><span>Action</span></div>
|
||||
</div>
|
||||
<div class="main-body-audit">
|
||||
<div class="table-body" *ngFor="let log of loglist">
|
||||
<div class="date-title">
|
||||
<span>{{ log.createdAt | date: "medium" }}</span>
|
||||
</div>
|
||||
<div class="action-title">
|
||||
<span [innerHTML]="log.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeModal()">Cancel</button>
|
||||
<button class="submit-btn" *ngIf="!IsUpdate" (click)="saveAdmin()">
|
||||
Save
|
||||
</button>
|
||||
<button class="submit-btn" *ngIf="IsUpdate" (click)="updateAdmin()">
|
||||
Update
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,98 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
tr {
|
||||
td.mat-cell {
|
||||
&:last-child {
|
||||
text-align: center;
|
||||
span {
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::ng-deep tr.mat-header-row th {
|
||||
&:first-child {
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
width: 140px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
width: 130px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
width: 230px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(6) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(7) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(8) {
|
||||
width: 80px;
|
||||
}
|
||||
&:last-child {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
::ng-deep tr td.mat-cell {
|
||||
&:first-child {
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
width: 140px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
width: 130px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
width: 230px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(6) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(7) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(8) {
|
||||
width: 80px;
|
||||
}
|
||||
&:last-child {
|
||||
width: 100px;
|
||||
}
|
||||
}
|
||||
::ng-deep .mat-paginator-container {
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
.mat-icon-button {
|
||||
background: $paginationBtnBg !important;
|
||||
border-radius: 5px !important;
|
||||
border: 1px solid $paginationBtnBorder !important;
|
||||
margin: 0 5px !important;
|
||||
cursor: pointer;
|
||||
color: $paginationBtnText !important;
|
||||
|
||||
&:hover {
|
||||
border: 1px solid $PaginationBtnHover !important;
|
||||
color: $PaginationBtnHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-paginator-page-size-label {
|
||||
color: $paginationText !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.mat-paginator-range-label {
|
||||
color: $paginationNo;
|
||||
width: 140px;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AdminlistComponent } from './adminlist.component';
|
||||
|
||||
describe('AdminlistComponent', () => {
|
||||
let component: AdminlistComponent;
|
||||
let fixture: ComponentFixture<AdminlistComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AdminlistComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AdminlistComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,595 @@
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import Swal from 'sweetalert2/dist/sweetalert2.js'
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
|
||||
import { AdminService } from '../../services/admin/admin.service';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
@Component({
|
||||
selector: 'app-adminlist',
|
||||
templateUrl: './adminlist.component.html',
|
||||
styleUrls: ['./adminlist.component.scss']
|
||||
})
|
||||
export class AdminlistComponent implements OnInit {
|
||||
addAdmin: boolean = false
|
||||
public LoginForm: FormGroup;
|
||||
email: any;
|
||||
IsUpdate: boolean = false;
|
||||
password: any;
|
||||
Confirmpass: any;
|
||||
userEmails = [];
|
||||
firstname: any;
|
||||
lastname: any;
|
||||
Id: any;
|
||||
loglist = [];
|
||||
oldAuditValueArray = { "First Name": "", "Last Name": "", "Email": "" }
|
||||
newAuditValueArray = { "First Name": "", "Last Name": "", "Email": "" }
|
||||
auditHistory = "";
|
||||
// displayedColumns: string[] = ['SrNo', 'name', 'chortname', 'email', 'FreeFlashCissp', 'FreeFlashCCSP', 'praticeque', 'actions', 'UserAnslysis'];
|
||||
displayedColumns: string[] = ['SrNo', 'name', 'chortname', 'email', 'actions'];
|
||||
dataSource: MatTableDataSource<Userlist>;
|
||||
Search: any;
|
||||
@Input('pagination') pagination: boolean;
|
||||
@ViewChild(MatPaginator, { static: false }) set matPaginator(paginator: MatPaginator) {
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator = paginator;
|
||||
}
|
||||
}
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) matSort: MatSort;
|
||||
constructor(public adminService: AdminService, public fb: FormBuilder, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService) {
|
||||
var isLogin = this.auth.isLoggedIn();
|
||||
if (!isLogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
addNewAdmin() {
|
||||
this.lastname = "";
|
||||
this.firstname = "";
|
||||
this.email = "";
|
||||
this.addAdmin = true;
|
||||
this.IsUpdate = false;
|
||||
}
|
||||
closeModal() {
|
||||
this.lastname = "";
|
||||
this.firstname = "";
|
||||
this.email = "";
|
||||
this.addAdmin = false;
|
||||
this.IsUpdate = false;
|
||||
this.oldAuditValueArray = { "First Name": "", "Last Name": "", "Email": "" }
|
||||
this.newAuditValueArray = { "First Name": "", "Last Name": "", "Email": "" }
|
||||
this.auditHistory = "";
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.LoginForm = this.fb.group({
|
||||
email: ['', Validators.compose([Validators.required, Validators.pattern('^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z]{2,4})$)')])],
|
||||
firstname: ['', Validators.required],
|
||||
lastname: ['', Validators.required],
|
||||
}
|
||||
);
|
||||
await this.spinner.show();
|
||||
await this.getAllAdmin();
|
||||
await this.spinner.hide();
|
||||
}
|
||||
delete(element) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You want to delete this user?",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete'
|
||||
}).then(async (result) => {
|
||||
if (result.value) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.adminService.deleteuser(element.id, token).then(async (userdata) => {
|
||||
if (userdata[0].status == 200) {
|
||||
await this.getAllAdmin();
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + element.email + "</span> is deleted as admin by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "admin", element.id, token);
|
||||
}
|
||||
});
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'User Delete successfully',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
await this.service.ShowError("User Delete unsuccessfully");
|
||||
}
|
||||
})
|
||||
// await this.auth.deleteuser(element.email).then(async (data) => {
|
||||
// if (data[0].StatusCode == 1) {
|
||||
// await this.adminService.deleteuser(element.id, token).then(async (userdata) => {
|
||||
// if (userdata[0].status == 200) {
|
||||
// await this.getAllAdmin();
|
||||
// this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
// if (err) {
|
||||
// await this.spinner.hide();
|
||||
// this.router.navigate(['/login']);
|
||||
// }
|
||||
// else {
|
||||
// var token = ''
|
||||
// var e = window.localStorage.getItem("adminUser");
|
||||
// if (e == null || e == undefined || e == "") {
|
||||
// e = 'admin';
|
||||
// }
|
||||
// var desc = "<span> " + element.email + "</span> is deleted as admin by <span> " + e + "</span>";
|
||||
// await this.service.addAdminLogs(desc, "admin", element.id, token);
|
||||
// }
|
||||
// });
|
||||
// await this.spinner.hide();
|
||||
// Swal.fire(
|
||||
// 'Deleted!',
|
||||
// 'User Delete successfully',
|
||||
// 'success'
|
||||
// )
|
||||
// }
|
||||
// else {
|
||||
// await this.spinner.hide();
|
||||
// await this.service.ShowError("User Delete unsuccessfully");
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// else {
|
||||
// if (data[0].message == "User does not exist.") {
|
||||
// await this.adminService.deleteuser(element.id, token).then(async (userdata) => {
|
||||
// if (userdata[0].status == 200) {
|
||||
// await this.getAllAdmin();
|
||||
// await this.spinner.hide();
|
||||
// Swal.fire(
|
||||
// 'Deleted!',
|
||||
// 'User Delete successfully',
|
||||
// 'success'
|
||||
// )
|
||||
// }
|
||||
// else {
|
||||
// await this.spinner.hide();
|
||||
// await this.service.ShowError("User Delete unsuccessfully");
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// else {
|
||||
// await this.spinner.hide();
|
||||
// await this.service.ShowError(data[0].message);
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
async getAllAdmin() {
|
||||
try {
|
||||
const users: Userlist[] = [];
|
||||
this.userEmails = [];
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.adminService.getAllAdmin(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
if (element.roll_id == 1) {
|
||||
debugger;
|
||||
var chortname = "";
|
||||
if(element.cohort.constructor == Object){
|
||||
element.cohort = [element.cohort];
|
||||
}
|
||||
if (element.cohort.length > 0) {
|
||||
for (let i = 0; i < element.cohort.length; i++) {
|
||||
chortname = chortname + element.cohort[i].cohort_name + ","
|
||||
}
|
||||
if (chortname.endsWith(",") == true) {
|
||||
chortname = chortname.substring(0, chortname.length - 1);
|
||||
}
|
||||
}
|
||||
this.userEmails.push(element.email);
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
"SrNo": srno,
|
||||
"id": element.id,
|
||||
"name": element.name,
|
||||
"email": element.email,
|
||||
"roll_id": element.roll_id,
|
||||
"email_verified_at": element.email_verified_at,
|
||||
"email_verified": element.email_verified,
|
||||
"mobile": element.mobile,
|
||||
"profile_img": element.profile_img,
|
||||
"permissions": element.permissions,
|
||||
"password": element.password,
|
||||
"status": element.status,
|
||||
"createdAt": element.createdAt,
|
||||
"updatedAt": element.updatedAt,
|
||||
"free_flashcard": element.free_flashcard,
|
||||
"free_flashccsp": element.free_flashccsp,
|
||||
"chortname": chortname
|
||||
})
|
||||
}
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.sort = this.matSort;
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.filter();
|
||||
this.pagination = true;
|
||||
}
|
||||
else {
|
||||
this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async Checkboxselect(value, element) {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
if (value == true) {
|
||||
this.adminService.free_purchase(element.id, '1', token).then(datapur => {
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
async CCSPCheckboxselect(value, element) {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
if (value == true) {
|
||||
this.adminService.CCSPfree_purchase(element.id, '1', token).then(datapur => {
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator._changePageSize(this.dataSource.paginator.pageSize);
|
||||
}
|
||||
}
|
||||
markFormTouched(group: FormGroup | FormArray) {
|
||||
Object.keys(group.controls).forEach((key: string) => {
|
||||
const control = group.controls[key];
|
||||
if (control instanceof FormGroup || control instanceof FormArray) { control.markAsTouched(); this.markFormTouched(control); }
|
||||
else { control.markAsTouched(); };
|
||||
});
|
||||
};
|
||||
async saveAdmin() {
|
||||
this.markFormTouched(this.LoginForm);
|
||||
if (this.LoginForm.valid) {
|
||||
this.firstname = this.firstname.trim();
|
||||
this.lastname = this.lastname.trim();
|
||||
if (this.firstname == "" || this.firstname == undefined || this.firstname == null) {
|
||||
this.service.ShowError("First Name is required")
|
||||
return;
|
||||
}
|
||||
if (this.lastname == "" || this.lastname == undefined || this.lastname == null) {
|
||||
this.service.ShowError("Last Name is required")
|
||||
return;
|
||||
}
|
||||
if (!this.userEmails.includes(this.email)) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.adminService.addUser(this.firstname + ' ' + this.lastname, this.email, "1", "REWerew889##", 0, token).then(async (data) => {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
if (data[0].status == 200) {
|
||||
await this.getAllAdmin();
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
// send email
|
||||
let Message = `
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Admin Account Creation</title>
|
||||
<style>
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
line-height: 1.6;
|
||||
color: #333;
|
||||
}
|
||||
.container {
|
||||
width: 80%;
|
||||
margin: 0 auto;
|
||||
padding: 20px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 5px;
|
||||
background-color: #f9f9f9;
|
||||
}
|
||||
.header {
|
||||
text-align: center;
|
||||
padding-bottom: 20px;
|
||||
}
|
||||
.content {
|
||||
margin-top: 20px;
|
||||
}
|
||||
.content a {
|
||||
color: #007bff;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
}
|
||||
.footer {
|
||||
margin-top: 40px;
|
||||
text-align: center;
|
||||
font-size: 0.9em;
|
||||
color: #777;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="header">
|
||||
<h2>Admin Account Created</h2>
|
||||
</div>
|
||||
<div class="content">
|
||||
<p>Dear <span style="font-weight: bold;">${this.firstname} ${this.lastname}</span>,</p>
|
||||
<p>You have been added as an admin by <span style="font-weight: bold;">Flexxon</span>.</p>
|
||||
<p>Please click on the link below and use the provided password to log in as an admin:</p>
|
||||
<p><strong>Website:</strong><a href="http://admin.test-application.com" class="highlight">http://admin.test-application.com</a></p>
|
||||
<p><strong>Password:</strong> <span class="highlight">REWerew889##</span></p>
|
||||
<p>For security purposes, please change your password by clicking on the "Forgot Password".</p>
|
||||
</div>
|
||||
<div class="footer">
|
||||
<p>Thank you,<br>
|
||||
Flexxon</p>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
`;
|
||||
let params = {
|
||||
to: this.email,
|
||||
text: "From: " + "System@Flexxon.com" + "<br><br>" + Message,
|
||||
subject: "Assigned as a Admin"
|
||||
}
|
||||
await this.auth.Adminsendmail(params).then(async (result) => {})
|
||||
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + this.email + "</span> is added as admin by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "admin", list.data.id, token);
|
||||
|
||||
// add this comment below
|
||||
this.email = "";
|
||||
this.password = "";
|
||||
this.lastname = "";
|
||||
this.Confirmpass = "";
|
||||
this.password = "";
|
||||
this.IsUpdate = false;
|
||||
this.addAdmin = false;
|
||||
this.service.ShowSuccess("Admin added successfully")
|
||||
await this.spinner.hide();
|
||||
}
|
||||
});
|
||||
// this.email = "";
|
||||
// this.password = "";
|
||||
// this.lastname = "";
|
||||
// this.Confirmpass = "";
|
||||
// this.password = "";
|
||||
// this.IsUpdate = false;
|
||||
// this.addAdmin = false;
|
||||
// this.service.ShowSuccess("Admin added successfully")
|
||||
// await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
this.service.ShowError(list.message)
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
|
||||
// await this.auth.CreateUser(this.email).then(async (value) => {
|
||||
// if (value[0].StatusCode == 1) {
|
||||
// await this.adminService.addUser(this.firstname + ' ' + this.lastname, this.email, "1", "REWerew889##", 0, token).then(async (data) => {
|
||||
// var list = JSON.parse(<string>data[0].json);
|
||||
// if (data[0].status == 200) {
|
||||
// await this.getAllAdmin();
|
||||
// this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
// if (err) {
|
||||
// await this.spinner.hide();
|
||||
// this.router.navigate(['/login']);
|
||||
// }
|
||||
// else {
|
||||
// var token = ''
|
||||
// var e = window.localStorage.getItem("adminUser");
|
||||
// if (e == null || e == undefined || e == "") {
|
||||
// e = 'admin';
|
||||
// }
|
||||
// var desc = "<span> " + this.email + "</span> is added as admin by <span> " + e + "</span>";
|
||||
// await this.service.addAdminLogs(desc, "admin", list.data.id, token);
|
||||
// }
|
||||
// });
|
||||
// this.email = "";
|
||||
// this.password = "";
|
||||
// this.lastname = "";
|
||||
// this.Confirmpass = "";
|
||||
// this.password = "";
|
||||
// this.IsUpdate = false;
|
||||
// this.addAdmin = false;
|
||||
// this.service.ShowSuccess("Admin added successfully")
|
||||
// await this.spinner.hide();
|
||||
// }
|
||||
// else {
|
||||
// await this.spinner.hide();
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// else {
|
||||
// await this.spinner.hide();
|
||||
// this.service.ShowError(value[0].message)
|
||||
// }
|
||||
// })
|
||||
}
|
||||
});
|
||||
}
|
||||
else {
|
||||
this.service.ShowError("This email already exist.")
|
||||
}
|
||||
}
|
||||
}
|
||||
async updateAdmin() {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.adminService.updateUser(this.Id, this.firstname + ' ' + this.lastname, token).then(async (data) => {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
if (data[0].status == 200) {
|
||||
await this.getAllAdmin();
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
this.newAuditValueArray = { "First Name": this.firstname, "Last Name": this.lastname, "Email": this.email }
|
||||
var audit = this.auth.compareAuditHist(this.oldAuditValueArray, this.newAuditValueArray);
|
||||
var desc = audit;
|
||||
await this.service.addAdminLogs(desc, "admin", this.Id, token);
|
||||
}
|
||||
});
|
||||
this.email = "";
|
||||
this.password = "";
|
||||
this.lastname = "";
|
||||
this.Confirmpass = "";
|
||||
this.password = "";
|
||||
this.IsUpdate = false;
|
||||
this.addAdmin = false;
|
||||
this.service.ShowSuccess("Admin Updated successfully")
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
async edit(item) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
this.service.get_logs("admin", item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.loglist = list.data;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
})
|
||||
this.addAdmin = true;
|
||||
this.IsUpdate = true;
|
||||
let name = item.name;
|
||||
this.Id = item.id;
|
||||
var index = name.indexOf(" ");
|
||||
var fname = name.substr(0, index);
|
||||
var lname = name.substr(index + 1);
|
||||
if (fname == "") {
|
||||
fname = lname;
|
||||
lname = "";
|
||||
}
|
||||
this.email = item.email;
|
||||
this.firstname = fname;
|
||||
this.lastname = lname;
|
||||
this.oldAuditValueArray = { "First Name": this.firstname, "Last Name": this.lastname, "Email": this.email }
|
||||
}
|
||||
}
|
||||
export interface Userlist {
|
||||
SrNo: number;
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
roll_id: string;
|
||||
email_verified_at: string;
|
||||
email_verified: string;
|
||||
mobile: string;
|
||||
profile_img: string;
|
||||
permissions: string;
|
||||
password: string;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
free_flashcard: string;
|
||||
free_flashccsp: string;
|
||||
chortname: string;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Admin Logs History</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<input placeholder="Search.." [(ngModel)]="Search" autocomplete="off" (keyup)="filter()" name="search" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="SrNo">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Sr.No</th>
|
||||
<td mat-cell *matCellDef="let element"><span>{{ element.SrNo }}</span></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Description</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<div class="spn-color" [innerHTML]="element.description"></div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="createdAt">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>
|
||||
<td class="date-times" mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.createdAt }}">{{ element.createdAt }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
<mat-paginator [pageSizeOptions]="[25, 50, 100, 500]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,7 @@
|
||||
.date-times {
|
||||
width: 125px;
|
||||
}
|
||||
.spn-color{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AdminlogsComponent } from './adminlogs.component';
|
||||
|
||||
describe('AdminlogsComponent', () => {
|
||||
let component: AdminlogsComponent;
|
||||
let fixture: ComponentFixture<AdminlogsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AdminlogsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AdminlogsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,84 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { AdminlogsService } from '../../services/adminlogs/adminlogs.service';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
|
||||
@Component({
|
||||
selector: 'app-adminlogs',
|
||||
templateUrl: './adminlogs.component.html',
|
||||
styleUrls: ['./adminlogs.component.scss']
|
||||
})
|
||||
export class AdminlogsComponent implements OnInit {
|
||||
displayedColumns: string[] = ['SrNo', 'description', 'createdAt'];
|
||||
dataSource: MatTableDataSource<Userlist>;
|
||||
Search: any;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) matSort: MatSort;
|
||||
constructor(public adminLogsService: AdminlogsService, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService) {
|
||||
var isLogin = this.auth.isLoggedIn();
|
||||
if (!isLogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
async ngOnInit() {
|
||||
await this.spinner.show();
|
||||
await this.getAllAdminLogs();
|
||||
await this.spinner.hide();
|
||||
}
|
||||
async getAllAdminLogs() {
|
||||
try {
|
||||
const users: Userlist[] = [];
|
||||
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.adminLogsService.getAllAdminLogs(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
let dt = formatDate(element.createdAt, 'yyyy-MM-dd, hh:mm', 'en_US');
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
"SrNo": srno,
|
||||
"id": element.id,
|
||||
"description": element.description,
|
||||
"createdAt": dt
|
||||
})
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.matSort;
|
||||
this.filter();
|
||||
}
|
||||
else {
|
||||
this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
}
|
||||
}
|
||||
export interface Userlist {
|
||||
SrNo: number;
|
||||
id: string;
|
||||
description: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@ -0,0 +1,87 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>App Versions</h3>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagesection">
|
||||
<div class="versions">
|
||||
<div class="apps">
|
||||
<div class="flashcard">
|
||||
<div class="text">
|
||||
<p>Flashcard CISSP</p>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<p>Android</p>
|
||||
<input type="text" placeholder="Enter app version" [(ngModel)]="version_android" />
|
||||
<button (click)="updateAllAppVersion()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="apps">
|
||||
<div class="flashcard">
|
||||
<div class="text">
|
||||
<p>Flashcard CISSP</p>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<p>iOS</p>
|
||||
<input type="text" placeholder="Enter app version" [(ngModel)]="version_ios" />
|
||||
<button (click)="updateAllAppVersion()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="apps">
|
||||
<div class="flashcard">
|
||||
<div class="text">
|
||||
<p>Flashcard CCSP</p>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<p>Android</p>
|
||||
<input type="text" placeholder="Enter app version" [(ngModel)]="version_android_ccsp" />
|
||||
<button (click)="updateAllAppVersion()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="apps">
|
||||
<div class="flashcard">
|
||||
<div class="text">
|
||||
<p>Flashcard CCSP</p>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<p>iOS</p>
|
||||
<input type="text" placeholder="Enter app version" [(ngModel)]="version_ios_ccsp" />
|
||||
<button (click)="updateAllAppVersion()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="apps">
|
||||
<div class="flashcard">
|
||||
<div class="text">
|
||||
<p>CISSP Questions</p>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<p>Android</p>
|
||||
<input type="text" placeholder="Enter app version" [(ngModel)]="version_android_practice" />
|
||||
<button (click)="updateAllAppVersion()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="apps">
|
||||
<div class="flashcard">
|
||||
<div class="text">
|
||||
<p>CISSP Questions</p>
|
||||
</div>
|
||||
<div class="controls">
|
||||
<p>iOS</p>
|
||||
<input type="text" placeholder="Enter app version" [(ngModel)]="version_ios_practice" />
|
||||
<button (click)="updateAllAppVersion()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,81 @@
|
||||
.versions {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
.apps {
|
||||
width: 47%;
|
||||
border: solid 1px #9645c4;
|
||||
border-radius: 10px;
|
||||
min-height: 200px;
|
||||
margin: 20px 10px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
&:hover {
|
||||
border: solid 1px #9645c4;
|
||||
box-shadow: 0px 0px 22px -5px #9645c4;
|
||||
}
|
||||
.flashcard {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
.text {
|
||||
width: 30%;
|
||||
background: linear-gradient(45deg, #994189, #332f89, #a26269);
|
||||
height: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 5px;
|
||||
p {
|
||||
margin: 0;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
}
|
||||
}
|
||||
.controls {
|
||||
width: 70%;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
padding: 40px;
|
||||
box-sizing: border-box;
|
||||
p {
|
||||
font-size: 19px;
|
||||
font-weight: bold;
|
||||
color: #d7779b;
|
||||
text-align: center;
|
||||
padding: 14px 0;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
}
|
||||
input {
|
||||
background: #1a1e47;
|
||||
border: 1px solid #595690;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
color: #a099da;
|
||||
width: 100%;
|
||||
}
|
||||
button {
|
||||
background: linear-gradient(47deg, #ee4c7e 0%, #ee8250 100%);
|
||||
border: none;
|
||||
padding: 10px 20px;
|
||||
border-radius: 30px;
|
||||
color: #fff;
|
||||
letter-spacing: 0.5px;
|
||||
margin: 20px 0;
|
||||
min-width: 120px;
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
|
||||
&:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ApplicationVersionComponent } from './application-version.component';
|
||||
|
||||
describe('ApplicationVersionComponent', () => {
|
||||
let component: ApplicationVersionComponent;
|
||||
let fixture: ComponentFixture<ApplicationVersionComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ApplicationVersionComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ApplicationVersionComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,89 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { Router } from '@angular/router';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { ServicesService } from '../../services.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-application-version',
|
||||
templateUrl: './application-version.component.html',
|
||||
styleUrls: ['./application-version.component.scss']
|
||||
})
|
||||
export class ApplicationVersionComponent implements OnInit {
|
||||
version_android = "";
|
||||
version_ios = "";
|
||||
version_android_ccsp = "";
|
||||
version_ios_ccsp = "";
|
||||
version_android_practice = "";
|
||||
version_ios_practice = "";
|
||||
constructor(public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService) {
|
||||
var setlogin = this.auth.isLoggedIn();
|
||||
if (!setlogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.getAllAppVersions()
|
||||
}
|
||||
async getAllAppVersions() {
|
||||
try {
|
||||
this.spinner.show()
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.service.getAllAppVersions(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
if (list.data.length > 0) {
|
||||
this.version_android = list.data[0].version_android;
|
||||
this.version_ios = list.data[0].version_ios;
|
||||
this.version_android_ccsp = list.data[0].version_android_ccsp;
|
||||
this.version_ios_ccsp = list.data[0].version_ios_ccsp;
|
||||
this.version_android_practice = list.data[0].version_android_practice;
|
||||
this.version_ios_practice = list.data[0].version_ios_practice;
|
||||
}
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
this.service.ShowError(e.meassage);
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async updateAllAppVersion() {
|
||||
try {
|
||||
this.spinner.show()
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
let params = {
|
||||
version_android: this.version_android,
|
||||
version_ios: this.version_ios,
|
||||
version_android_ccsp: this.version_android_ccsp,
|
||||
version_ios_ccsp: this.version_ios_ccsp,
|
||||
version_android_practice: this.version_android_practice,
|
||||
version_ios_practice: this.version_ios_practice,
|
||||
}
|
||||
await this.service.updateAllAppVersion(params, token).then(async (data) => {
|
||||
await this.spinner.hide();
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
this.service.ShowError(e.meassage);
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,122 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Class Materials</h3>
|
||||
</div>
|
||||
</div>
|
||||
<div class="select-company">
|
||||
<div class="select-box">
|
||||
<select required [(ngModel)]="SelectedCertificate" name="SelectedCertificate"
|
||||
(change)="changeCertificate()">
|
||||
<option value="">Select Certification</option>
|
||||
<option *ngFor="let items of Certificatelist" value="{{ items.id }}">
|
||||
{{ items.certificate_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="tablewrap">
|
||||
<div class="studyguiddata">
|
||||
<div class="tableheader">
|
||||
<div class="header" style="width:250px;">Domain</div>
|
||||
<div class="header" style="width:250px;">Sub Domain</div>
|
||||
<div class="header" style="width:250px;">Video</div>
|
||||
<div class="header" style="width:250px;">Mindmap</div>
|
||||
<div class="header" style="width:200px;">Topic</div>
|
||||
<div class="header" style="width:200px;">Refrences</div>
|
||||
<div class="header" style="width:150px;">Written Summary</div>
|
||||
<div class="header" style="width:250px;">KA Questions</div>
|
||||
<div class="header" style="width:250px;">FlashCards</div>
|
||||
<div class="header" style="width:250px;">PracticeTest Questions</div>
|
||||
</div>
|
||||
<div class="tabledata">
|
||||
<div class="domaindata" *ngFor="let item of Materials;let i=index;">
|
||||
<div class="domainname">
|
||||
{{i+1+" "}}{{item.domin_name}}
|
||||
</div>
|
||||
<div class="dmdata">
|
||||
<div class="subdomaindata" *ngFor="let subdomain of item.SubDomains; let j=index;">
|
||||
<div class="subdomainname">
|
||||
<span *ngIf="SelectedCertificate==11">{{i+1+"."}}{{j+1+" "}}</span>
|
||||
{{subdomain.subdomain_name}}
|
||||
</div>
|
||||
<div class="subdmdata">
|
||||
<div class="videonamelist">
|
||||
<div class="videoname" *ngFor="let video of subdomain.Videos">
|
||||
{{video.video_title}}
|
||||
</div>
|
||||
<div class="videoname red-bg" *ngIf="subdomain.Videos.length <= 0">
|
||||
No Data
|
||||
</div>
|
||||
</div>
|
||||
<div class="videonamelist">
|
||||
<div class="videoname" *ngFor="let mind of subdomain.MindMaps">
|
||||
{{mind.name}}
|
||||
</div>
|
||||
<div class="videoname red-bg" *ngIf="subdomain.MindMaps.length <=0">
|
||||
No Data
|
||||
</div>
|
||||
</div>
|
||||
<div class="videonamelist topic">
|
||||
<div class="topiclistdata" *ngFor="let topic of subdomain.Topics; let k=index;">
|
||||
<div class="videoname">
|
||||
<span *ngIf="SelectedCertificate==1">{{i+1+"."}}{{j+1+"."}}{{k+1+"
|
||||
"}}</span>
|
||||
{{topic.name}}
|
||||
</div>
|
||||
<div class="topicdata">
|
||||
<div class="topiclist ref">
|
||||
<div class="topicname" *ngFor="let Ref of topic.Reference">
|
||||
{{Ref.title}}
|
||||
</div>
|
||||
<div class="topicname red-bg" *ngIf="topic.Reference.length <= 0">
|
||||
No Data
|
||||
</div>
|
||||
</div>
|
||||
<div class="topiclist sum">
|
||||
<div class="topicname"
|
||||
[ngClass]="{'red-bg':topic.WrittenSummary=='None'}">
|
||||
{{topic.WrittenSummary=="Yes" ? "Yes" : "No Data"}}
|
||||
</div>
|
||||
</div>
|
||||
<div class="topiclist KAque">
|
||||
<div class="topicname" *ngFor="let KAQue of topic.KAQ">
|
||||
{{KAQue.question}}
|
||||
</div>
|
||||
<div class="topicname red-bg" *ngIf="topic.KAQ.length <= 0">
|
||||
No Data
|
||||
</div>
|
||||
</div>
|
||||
<div class="topiclist fcard">
|
||||
<div class="topicname" *ngFor="let FCard of topic.FlashCards">
|
||||
{{FCard.term}} | {{FCard.definition}}
|
||||
</div>
|
||||
<div class="topicname red-bg" *ngIf="topic.FlashCards.length <= 0">
|
||||
No Data
|
||||
</div>
|
||||
</div>
|
||||
<div class="topiclist ptque">
|
||||
<div class="topicname" *ngFor="let PTQue of topic.PTQ">
|
||||
{{PTQue.title}}
|
||||
</div>
|
||||
<div class="topicname red-bg" *ngIf="topic.PTQ.length <= 0">
|
||||
No Data
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,414 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
.select-company {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
// border-bottom: 1px solid #191d32;
|
||||
padding-bottom: 10px;
|
||||
}
|
||||
|
||||
.material-content {
|
||||
display: flex;
|
||||
border-bottom: 1px solid #191d32;
|
||||
padding-bottom: 10px;
|
||||
|
||||
.videos {
|
||||
width: 49%;
|
||||
border-right: 1px solid #191d32;
|
||||
padding-right: 10px;
|
||||
|
||||
.video-list {
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
|
||||
.list {
|
||||
color: #a39bde;
|
||||
background: #2b2b5d;
|
||||
padding: 7px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.no-course {
|
||||
padding: 7px 0px 7px 10px;
|
||||
color: #a39bde;
|
||||
display: flex;
|
||||
background: #2b2b5d;
|
||||
border-radius: 5px;
|
||||
|
||||
span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.mind-maps {
|
||||
width: 49%;
|
||||
padding-left: 10px;
|
||||
|
||||
.video-list {
|
||||
max-height: 300px;
|
||||
overflow: auto;
|
||||
|
||||
.list {
|
||||
color: #a39bde;
|
||||
background: #2b2b5d;
|
||||
padding: 7px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.no-course {
|
||||
padding: 7px 0px 7px 10px;
|
||||
color: #a39bde;
|
||||
display: flex;
|
||||
background: #2b2b5d;
|
||||
border-radius: 5px;
|
||||
|
||||
span {
|
||||
margin-right: 5px;
|
||||
}
|
||||
|
||||
p {
|
||||
margin: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.select-company2 {
|
||||
border: none;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.page-footer {
|
||||
border-bottom: 1px solid #191d32;
|
||||
padding-bottom: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
select {
|
||||
background: $White;
|
||||
border: 1px solid $Black;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
width: 100%;
|
||||
color: $Black;
|
||||
-moz-appearance: none;
|
||||
-webkit-appearance: none;
|
||||
appearance: none;
|
||||
}
|
||||
|
||||
input {
|
||||
background: #1a1e47;
|
||||
border: 1px solid #595690;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
width: calc(100% - 20px);
|
||||
color: #a099da;
|
||||
margin: 15px 0;
|
||||
}
|
||||
|
||||
.select-box {
|
||||
position: relative;
|
||||
width: 48% !important;
|
||||
margin: 15px 0;
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
right: 20px;
|
||||
content: "";
|
||||
border-color: #999 #0000 #0000;
|
||||
border-style: solid;
|
||||
border-width: 5px 5px 2.5px;
|
||||
}
|
||||
}
|
||||
|
||||
label {
|
||||
display: block;
|
||||
color: #766daa;
|
||||
font-size: 15px;
|
||||
font-weight: 500;
|
||||
margin-top: 15px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.select-box2 {
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.check-app {
|
||||
label {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.search-div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
span {
|
||||
display: block;
|
||||
color: #766daa;
|
||||
font-size: 17px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.search-wrap {
|
||||
width: 30%;
|
||||
|
||||
input {
|
||||
border-radius: 30px;
|
||||
width: calc(100% - 50px);
|
||||
padding: 10px 40px 10px 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.container {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding-left: 24px;
|
||||
cursor: pointer;
|
||||
font-size: 22px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
}
|
||||
|
||||
|
||||
/* Hide the browser's default checkbox */
|
||||
|
||||
.container input {
|
||||
position: absolute;
|
||||
opacity: 0;
|
||||
cursor: pointer;
|
||||
height: 0;
|
||||
width: 0;
|
||||
}
|
||||
|
||||
|
||||
/* Create a custom checkbox */
|
||||
|
||||
.checkmark {
|
||||
position: absolute;
|
||||
top: -8px;
|
||||
left: 0;
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
border: 1px solid #4e4c7f;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
|
||||
/* When the checkbox is checked, add a blue background */
|
||||
|
||||
.container input:checked~.checkmark {
|
||||
background: linear-gradient(90deg, rgba(163, 2, 255, 1) 0%, rgba(177, 84, 255, 1) 100%);
|
||||
border: 1px solid transparent;
|
||||
}
|
||||
|
||||
|
||||
/* Create the checkmark/indicator (hidden when not checked) */
|
||||
|
||||
.checkmark:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: none;
|
||||
}
|
||||
|
||||
|
||||
/* Show the checkmark when checked */
|
||||
|
||||
.container input:checked~.checkmark:after {
|
||||
display: block;
|
||||
}
|
||||
|
||||
|
||||
/* Style the checkmark/indicator */
|
||||
|
||||
.container .checkmark:after {
|
||||
left: 5px;
|
||||
top: 2px;
|
||||
width: 3px;
|
||||
height: 7px;
|
||||
border: solid white;
|
||||
border-width: 0 2px 2px 0;
|
||||
transform: rotate(45deg);
|
||||
}
|
||||
|
||||
tr.mat-header-row th:nth-child(2) {
|
||||
text-align: start !important;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
position: relative;
|
||||
margin: 0;
|
||||
width: 100%;
|
||||
|
||||
span {
|
||||
position: absolute;
|
||||
right: 11px;
|
||||
top: 24px;
|
||||
color: #d7779b;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.not-confirm {
|
||||
color: red;
|
||||
}
|
||||
|
||||
.confirm {
|
||||
color: green;
|
||||
}
|
||||
|
||||
/* table css start */
|
||||
.studyguiddata {
|
||||
width: 2300px;
|
||||
// border: 0.5px solid #595690;
|
||||
|
||||
.tableheader {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
color: $matHeaderText;
|
||||
font-weight: 600;
|
||||
background-color: $matHeaderBg;
|
||||
|
||||
.header {
|
||||
padding: 10px 15px;
|
||||
// border: 1px solid #595690;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
}
|
||||
|
||||
.tabledata {
|
||||
|
||||
.domaindata {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
color: #a099da;
|
||||
|
||||
.domainname {
|
||||
width: 250px;
|
||||
padding: 10px 15px;
|
||||
border: 0.5px solid #595690;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.dmdata {
|
||||
width: 2050px;
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
|
||||
.subdomaindata {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
color: #a099da;
|
||||
|
||||
.subdomainname {
|
||||
width: 250px;
|
||||
border: 0.5px solid #595690;
|
||||
box-sizing: border-box;
|
||||
padding: 10px 15px;
|
||||
|
||||
span {
|
||||
color: #a099da;
|
||||
}
|
||||
}
|
||||
|
||||
.subdmdata {
|
||||
width: 1800px;
|
||||
display: flex;
|
||||
color: #a099da;
|
||||
|
||||
.videonamelist {
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
width: 250px;
|
||||
color: #a099da;
|
||||
|
||||
&.topic {
|
||||
width: 1300px;
|
||||
flex-direction: column;
|
||||
|
||||
.topiclistdata {
|
||||
display: flex;
|
||||
|
||||
.videoname {
|
||||
width: 200px;
|
||||
|
||||
span {
|
||||
color: #a099da;
|
||||
}
|
||||
}
|
||||
|
||||
.topicdata {
|
||||
display: flex;
|
||||
width: 1100px;
|
||||
|
||||
.topiclist {
|
||||
flex-direction: column;
|
||||
display: flex;
|
||||
|
||||
&.ref {
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
&.sum {
|
||||
width: 150px;
|
||||
}
|
||||
|
||||
&.KAque {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
&.fcard {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
&.ptque {
|
||||
width: 250px;
|
||||
}
|
||||
|
||||
.topicname {
|
||||
color: #a099da;
|
||||
width: 100%;
|
||||
border: 0.5px solid #595690;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.videoname {
|
||||
color: #a099da;
|
||||
width: 100%;
|
||||
border: 0.5px solid #595690;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
padding: 10px 15px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
.red-bg {
|
||||
background: #ff00002b;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AssignedMaterialsComponent } from './assigned-materials.component';
|
||||
|
||||
describe('AssignedMaterialsComponent', () => {
|
||||
let component: AssignedMaterialsComponent;
|
||||
let fixture: ComponentFixture<AssignedMaterialsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AssignedMaterialsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AssignedMaterialsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,79 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { CohortService } from '../../services/cohort/cohort.service';
|
||||
import { TemplateService } from '../../services/template/template.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-assigned-materials',
|
||||
templateUrl: './assigned-materials.component.html',
|
||||
styleUrls: ['./assigned-materials.component.scss']
|
||||
})
|
||||
export class AssignedMaterialsComponent implements OnInit {
|
||||
Certificatelist = [];
|
||||
SelectedCertificate: any;
|
||||
Materials = [];
|
||||
constructor(public templateService: TemplateService, public cohortService: CohortService,
|
||||
public auth: AuthorizationService,
|
||||
public router: Router,
|
||||
public spinner: NgxSpinnerService,
|
||||
public service: ServicesService) { }
|
||||
|
||||
async ngOnInit() {
|
||||
await this.spinner.show();
|
||||
await this.ListCertificate();
|
||||
await this.spinner.hide();
|
||||
}
|
||||
async ListCertificate() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
this.spinner.show();
|
||||
await this.service.ListCertificate(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Certificatelist = list.data;
|
||||
this.SelectedCertificate = "";
|
||||
}
|
||||
})
|
||||
this.spinner.hide();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
}
|
||||
async changeCertificate() {
|
||||
this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.service.certiWiseMaterials(this.SelectedCertificate, token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Materials = list.data;
|
||||
|
||||
}
|
||||
})
|
||||
this.spinner.hide();
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
export interface Topiclist {
|
||||
srno: number;
|
||||
id: number;
|
||||
student_name: string;
|
||||
email: string;
|
||||
}
|
||||
@ -0,0 +1,66 @@
|
||||
<div class="logo-div">
|
||||
<img src="../../../assets/images/logo.png" alt="Logo" style="width:80px;" />
|
||||
</div>
|
||||
<div class="verification-step">
|
||||
<h4>
|
||||
Further protect your account with something you have, by setting up a
|
||||
<span>One-Time Password</span> authenticator app
|
||||
</h4>
|
||||
<form>
|
||||
<div class="verify-method">
|
||||
<div class="verify-left very">
|
||||
<span>1</span>
|
||||
<p>If you don’t already have an authenticator app, we recommend</p>
|
||||
<ul>
|
||||
<li disabled="true"><a href="https://authy.com/download/" target="_blank">Authy</a></li>
|
||||
<li disabled="true"><a
|
||||
href="https://support.google.com/accounts/answer/1066447?co=GENIE.Platform%3DAndroid&hl=en&oco=0"
|
||||
target="_blank">Google
|
||||
Authenticator</a></li>
|
||||
<li disabled="true"><a href="https://www.microsoft.com/en-us/account/authenticator"
|
||||
target="_blank">Microsoft
|
||||
Authenticator</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="verify-center very">
|
||||
<span>2</span>
|
||||
<p>
|
||||
Please scan the following QR code with your authenticator app or enter your
|
||||
authenticator app.
|
||||
<span class="text-color"> {{devicecode}}</span>
|
||||
</p>
|
||||
<ngx-qrcode [elementType]="elementType" [value]="value" cssClass="qrcodeas" errorCorrectionLevel="L"
|
||||
*ngIf="!authyPasswordEnbled">
|
||||
</ngx-qrcode>
|
||||
<div class="form-button-next-generate " *ngIf="authyPasswordEnbled">
|
||||
<button type="button " class="frm-next-btn-generate" (click)="GeneratedQR()">Setup Code</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="verify-right very ">
|
||||
<span>3</span>
|
||||
<p>
|
||||
Please enter the 6-digit one-time password that has been generated by your app
|
||||
</p>
|
||||
<div class="input-flex">
|
||||
<input type="password " name="veripass " placeholder="Enter code" [(ngModel)]="code "
|
||||
class="verify-password " maxlength="6" minlength="6" />
|
||||
<svg width="27" height="7" viewBox="0 0 27 7" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||
<circle cx="3.5" cy="3.5" r="2.85" stroke="#7066AB" stroke-width="1.3" />
|
||||
<circle cx="13.5" cy="3.5" r="2.85" stroke="#7066AB" stroke-width="1.3" />
|
||||
<circle cx="23.5" cy="3.5" r="2.85" stroke="#7066AB" stroke-width="1.3" />
|
||||
</svg>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-button-next ">
|
||||
<button type="button " class="frm-next-btn" (click)="thankyou() ">
|
||||
<span class="material-icons">
|
||||
arrow_forward
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,249 @@
|
||||
.logo-div {
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
.verification-step {
|
||||
max-width: 1000px;
|
||||
margin: 0 auto;
|
||||
h4 {
|
||||
text-align: center;
|
||||
color: #968bdb;
|
||||
max-width: 550px;
|
||||
margin: 50px auto 80px;
|
||||
font-size: 18px;
|
||||
span {
|
||||
color: #e684ad;
|
||||
}
|
||||
}
|
||||
.verify-method {
|
||||
display: flex;
|
||||
.very {
|
||||
margin: 0 50px;
|
||||
text-align: center;
|
||||
padding-top: 60px;
|
||||
position: relative;
|
||||
border-right: 1px dashed rgba(255, 255, 255, 0.1);
|
||||
border-left: 1px dashed rgba(255, 255, 255, 0.1);
|
||||
width: 33%;
|
||||
p {
|
||||
color: #968bdb;
|
||||
font-size: 14px;
|
||||
margin: 0 25px 50px 25px;
|
||||
font-weight: 600;
|
||||
span {
|
||||
position: relative;
|
||||
background: none;
|
||||
height: auto;
|
||||
width: auto;
|
||||
border-radius: 0;
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
line-height: 1.5;
|
||||
color: #e684ad;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
&:before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
background: linear-gradient(#000, red);
|
||||
}
|
||||
&:last-child {
|
||||
border-right: none;
|
||||
margin: 0;
|
||||
}
|
||||
span {
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: linear-gradient(270deg, #8900d7 0%, #b25cff 100%);
|
||||
position: absolute;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
line-height: 40px;
|
||||
color: #fff;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
margin: auto;
|
||||
font-size: 16px;
|
||||
}
|
||||
&.verify-left {
|
||||
margin: 0;
|
||||
border: 0;
|
||||
ul {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
li {
|
||||
a {
|
||||
background: rgb(230 132 173 / 0.1);
|
||||
min-width: 200px;
|
||||
border: 1px solid #e684ad;
|
||||
font-weight: 100;
|
||||
color: #e684ad;
|
||||
display: inline-block;
|
||||
margin-bottom: 10px;
|
||||
text-decoration: none;
|
||||
padding: 7px 0;
|
||||
border-radius: 53px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
&.verify-right {
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
border: 0;
|
||||
.verify-password {
|
||||
background: #0f133c;
|
||||
width: 80%;
|
||||
border-radius: 8px;
|
||||
border: 1px solid rgba(151, 140, 217, 0.51);
|
||||
padding: 14px 20px;
|
||||
color: #cec5ff;
|
||||
&::placeholder {
|
||||
color: #4a4a74;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-button-next {
|
||||
text-align: right;
|
||||
max-width: 99%;
|
||||
margin: 10px;
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
.frm-next-btn {
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
background: linear-gradient(270deg, #ee844f 0%, #ee4b80 100%);
|
||||
border-radius: 22px;
|
||||
border: none;
|
||||
color: #fff;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
line-height: 0;
|
||||
}
|
||||
.frm-prev-btn {
|
||||
background: #0f133c;
|
||||
border: 1px solid #978cd9;
|
||||
border-radius: 50%;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
color: #978cd9;
|
||||
transition: 0.3s all ease-in-out;
|
||||
cursor: pointer;
|
||||
&:hover {
|
||||
opacity: 0.7;
|
||||
}
|
||||
&:focus {
|
||||
outline: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.form-button-next-generate {
|
||||
text-align: right;
|
||||
max-width: 99%;
|
||||
margin: 10px;
|
||||
align-items: center;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
.frm-next-btn-generate {
|
||||
align-items: center;
|
||||
background: transparent;
|
||||
border-radius: 10px;
|
||||
border: none;
|
||||
color: #e684ad;
|
||||
font-style: normal;
|
||||
font-weight: 600;
|
||||
font-size: 15px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
text-decoration: underline;
|
||||
}
|
||||
}
|
||||
|
||||
.reload-btn {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: linear-gradient(270deg, #ee844f 0%, #ee4b80 100%);
|
||||
border-radius: 100%;
|
||||
border: none;
|
||||
color: #fff;
|
||||
font-size: 34px;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
@media only screen and (max-width: 767px) {
|
||||
.verification-step {
|
||||
padding: 10px;
|
||||
.verify-method {
|
||||
display: block;
|
||||
.very {
|
||||
width: 70%;
|
||||
margin: 0 auto !important;
|
||||
border-right: 0;
|
||||
border-left: 0;
|
||||
border-top: 1px dashed rgba(255, 255, 255, 0.1);
|
||||
border-bottom: 1px dashed rgba(255, 255, 255, 0.1);
|
||||
padding-bottom: 10px;
|
||||
span {
|
||||
margin-top: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.form-button-next {
|
||||
position: relative;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
}
|
||||
.input-flex {
|
||||
display: flex;
|
||||
align-content: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
svg {
|
||||
width: 30px;
|
||||
position: relative;
|
||||
top: 19px;
|
||||
right: 40px;
|
||||
}
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
.logo-div {
|
||||
margin: 15px auto;
|
||||
text-align: center;
|
||||
}
|
||||
.verification-step {
|
||||
h4 {
|
||||
text-align: center;
|
||||
color: #968bdb;
|
||||
max-width: 550px;
|
||||
margin: 40px auto 30px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.verify-method {
|
||||
.very {
|
||||
span {
|
||||
font-family: "Roboto";
|
||||
}
|
||||
p {
|
||||
margin: 0 25px 30px 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AuthypasswordComponent } from './authypassword.component';
|
||||
|
||||
describe('AuthypasswordComponent', () => {
|
||||
let component: AuthypasswordComponent;
|
||||
let fixture: ComponentFixture<AuthypasswordComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ AuthypasswordComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(AuthypasswordComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,135 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import {
|
||||
FormBuilder,
|
||||
FormControl,
|
||||
FormGroup,
|
||||
Validators,
|
||||
} from '@angular/forms';
|
||||
import { NgxSpinnerService } from 'ngx-spinner';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { CryptoService } from 'src/app/services/crypto/crypto.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-authypassword',
|
||||
templateUrl: './authypassword.component.html',
|
||||
styleUrls: ['./authypassword.component.scss']
|
||||
})
|
||||
export class AuthypasswordComponent implements OnInit {
|
||||
data: any;
|
||||
code: any;
|
||||
dataqr: any;
|
||||
AuthyShow = false;
|
||||
elementType: 'url';
|
||||
value: any = '';
|
||||
public LoginForm: FormGroup;
|
||||
newdata: any;
|
||||
devicecode: any;
|
||||
authyPasswordEnbled: boolean = false;
|
||||
constructor(
|
||||
public ActiveRoute: ActivatedRoute,
|
||||
public service: ServicesService,
|
||||
public auth: AuthorizationService,
|
||||
public spinner: NgxSpinnerService,
|
||||
public fb: FormBuilder,
|
||||
public router: Router, private crypto: CryptoService) {
|
||||
this.ActiveRoute.params.subscribe(async (params) => {
|
||||
try {
|
||||
this.data = JSON.parse(this.crypto.dec(params['data']));
|
||||
} catch (error) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
});
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.LoginForm = this.fb.group({
|
||||
code: ['', Validators.required],
|
||||
});
|
||||
this.getQRCode();
|
||||
}
|
||||
|
||||
async getQRCode() {
|
||||
|
||||
try {
|
||||
await this.spinner.show();
|
||||
var passwordset = this.data.password;
|
||||
if (passwordset && this.data.email) {
|
||||
await this.auth.Getqrcode(this.data.email, passwordset).then(dataset => {
|
||||
if (dataset && dataset[0].StatusCode == 1) {
|
||||
this.data.password = passwordset;
|
||||
this.value = dataset[0].code;
|
||||
this.devicecode = dataset[0].devicecode;
|
||||
this.newdata = dataset
|
||||
this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
if (dataset[0].message == "callback.totpRequired is not a function") {
|
||||
this.authyPasswordEnbled = true;
|
||||
this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
this.authyPasswordEnbled = true;
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
catch {
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async thankyou() {
|
||||
if (this.code) {
|
||||
if (this.code.trim() && this.code.length == 6) {
|
||||
this.spinner.show();
|
||||
await this.auth.verify(this.data.email, this.data.password, this.code, 0).then(async (set) => {
|
||||
if (set[0].StatusCode == 1) {
|
||||
window.sessionStorage.setItem("logintrue", "true");
|
||||
this.router.navigate(['/main/dashboard']);
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError("You have entered Invalid code. Please try again with valid code.")
|
||||
}
|
||||
})
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError("Please enter the 6-digit one-time password that has been generated by your app")
|
||||
}
|
||||
} else {
|
||||
this.service.ShowError(
|
||||
'Please enter the 6-digit one-time password that has been generated by your app '
|
||||
);
|
||||
}
|
||||
await this.spinner.hide();
|
||||
}
|
||||
async GeneratedQR() {
|
||||
try {
|
||||
await this.spinner.show();
|
||||
var passwordset = this.data.password;
|
||||
if (passwordset && this.data.email) {
|
||||
await this.auth.ResetMFASetup(this.data.email, passwordset).then(async dataset => {
|
||||
await this.getQRCode();
|
||||
this.authyPasswordEnbled = false;
|
||||
})
|
||||
this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
this.router.navigate(['/login']);
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
catch {
|
||||
this.router.navigate(['/login']);
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,210 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Books</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Certification, Assessment Name..." [(ngModel)]="Search" autocomplete="off"
|
||||
(keyup)="filter()" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
<button (click)="addNewaddAcronyms()">Add Book</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="srno">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span>{{ element.srno }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="certificate_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Certification
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.certificate_name }}">{{
|
||||
element.certificate_name
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="book_title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Book Title</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.book_title }}">{{
|
||||
element.book_title
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="edit(row)" alt="Edit" class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="delete(row)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<mat-paginator style-paginator showFirstLastButtons [showTotalPages]="3" *ngIf="pagination"
|
||||
[length]="dataSource.data ? dataSource.data.length : 0" [pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
<div class="cutome-modal" *ngIf="addAcronyms">
|
||||
<div class="cutome-modal-content">
|
||||
<div class="modal-header">
|
||||
<p *ngIf="!IsUpdate">Add Book</p>
|
||||
<p *ngIf="IsUpdate">Edit Book</p>
|
||||
<span (click)="closeModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<form class="example-form" [formGroup]="CertificateForm">
|
||||
<div class="formwrapper">
|
||||
<div class="w-50">
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="SelectedCertificate" formControlName="SelectedCertificate" required
|
||||
[ngClass]="{
|
||||
err:
|
||||
CertificateForm.controls['SelectedCertificate'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(CertificateForm.controls['SelectedCertificate'].dirty ||
|
||||
CertificateForm.controls['SelectedCertificate'].touched)
|
||||
}">
|
||||
<option value="">Select Certification</option>
|
||||
<option *ngFor="let item of Certificatelist" value="{{ item.id }}">
|
||||
{{ item.certificate_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-100">
|
||||
<textarea type="text" [(ngModel)]="book_title" formControlName="book_title"
|
||||
placeholder="Book Title" required [ngClass]="{
|
||||
err:
|
||||
CertificateForm.controls['book_title'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(CertificateForm.controls['book_title'].dirty ||
|
||||
CertificateForm.controls['book_title'].touched)
|
||||
}"></textarea>
|
||||
</div>
|
||||
<div class="w-100">
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="book_img" formControlName="book_img"
|
||||
placeholder="Book Image" />
|
||||
<span>
|
||||
<label for="book_img" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="book_img" (change)="handleFileSelect($event)" />
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="history-div" *ngIf="IsUpdate">
|
||||
<div class="search-wrap" style="justify-content: space-between">
|
||||
<h3>References</h3>
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Reference Name" [(ngModel)]="SearchReference"
|
||||
(keyup)="filterReference()" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSourceReference" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="srno">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span>{{ element.srno }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Reference Name
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.title }}">{{ element.title }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="page_no">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Reference Page #
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.page_no }}">{{
|
||||
element.page_no
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="editReference(row)"
|
||||
alt="Edit" class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="deleteReference(row)"
|
||||
alt="Delete" class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumnsReference"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumnsReference"></tr>
|
||||
</table>
|
||||
|
||||
<mat-paginator style-paginator #quespaginator [showTotalPages]="0"
|
||||
[length]="dataSourceReference.data ? dataSourceReference.data.length : 0"
|
||||
[pageSize]="10" *ngIf="matpagination" [pageSizeOptions]="[10, 20, 50, 100, 500]"
|
||||
showFirstLastButtons>
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="history-div" *ngIf="IsUpdate">
|
||||
<h3><span class="material-icons"> history </span>Audit history</h3>
|
||||
<div class="audit-table">
|
||||
<div class="table-header">
|
||||
<div class="date-title"><span>Date & Time</span></div>
|
||||
<div class="action-title"><span>Action</span></div>
|
||||
</div>
|
||||
<div class="main-body-audit">
|
||||
<div class="table-body" *ngFor="let log of loglist">
|
||||
<div class="date-title">
|
||||
<span>{{ log.createdAt | date: "medium" }}</span>
|
||||
</div>
|
||||
<div class="action-title">
|
||||
<span [innerHTML]="log.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeModal()">Cancel</button>
|
||||
<div *ngIf="!IsUpdate">
|
||||
<button class="submit-btn" (click)="onSubmit()">Save</button>
|
||||
</div>
|
||||
<div *ngIf="IsUpdate">
|
||||
<button class="submit-btn" (click)="UpdateCertificate()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,93 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
.formwrapper {
|
||||
display: block;
|
||||
div {
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 10px 30px 10px 10px;
|
||||
}
|
||||
.select-box {
|
||||
span {
|
||||
right: 10px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.d-flex2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
input {
|
||||
padding-right: 165px;
|
||||
border-color: $Black;
|
||||
}
|
||||
span {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: 10px;
|
||||
color: #000000;
|
||||
line-height: 1;
|
||||
padding-left: 8px;
|
||||
.upload-label {
|
||||
background: #fafafa;
|
||||
border: solid 1px $Pink;
|
||||
border-radius: 5px;
|
||||
color: $Pink;
|
||||
padding: 3px 10px 3px 3px;
|
||||
margin: 0px 10px 0px 0px;
|
||||
cursor: pointer;
|
||||
.upload {
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
font-size: 12px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
.link {
|
||||
border-left: solid 1px #000000;
|
||||
padding-left: 7px;
|
||||
color: $Pink;
|
||||
}
|
||||
.file {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
.w-50 {
|
||||
width: 50%;
|
||||
}
|
||||
.w-100 {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
::ng-deep .mat-paginator-container {
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
.mat-icon-button {
|
||||
background: $paginationBtnBg !important;
|
||||
border-radius: 5px !important;
|
||||
border: 1px solid $paginationBtnBorder !important;
|
||||
margin: 0 5px !important;
|
||||
cursor: pointer;
|
||||
color: $paginationBtnText !important;
|
||||
|
||||
&:hover {
|
||||
border: 1px solid $PaginationBtnHover !important;
|
||||
color: $PaginationBtnHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-paginator-page-size-label {
|
||||
color: $paginationText !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.mat-paginator-range-label {
|
||||
color: $Pink;
|
||||
width: 140px;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { BooksComponent } from './books.component';
|
||||
|
||||
describe('BooksComponent', () => {
|
||||
let component: BooksComponent;
|
||||
let fixture: ComponentFixture<BooksComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ BooksComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(BooksComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,486 @@
|
||||
import { Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import Swal from 'sweetalert2/dist/sweetalert2.js'
|
||||
import { Router } from '@angular/router';
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { FormBuilder, FormControl, FormGroup, Validators, FormArray } from '@angular/forms';
|
||||
import { BooksService } from '../../services/books/books.service';
|
||||
import { ReferenceService } from 'src/app/services/reference/reference.service';
|
||||
import { SelfpacedService } from 'src/app/services/selfpaced/selfpaced.service';
|
||||
@Component({
|
||||
selector: 'app-books',
|
||||
templateUrl: './books.component.html',
|
||||
styleUrls: ['./books.component.scss']
|
||||
})
|
||||
export class BooksComponent implements OnInit {
|
||||
displayedColumns: string[] = ['srno', 'certificate_name', 'book_title', 'actions'];
|
||||
dataSource: MatTableDataSource<certificatelist>;
|
||||
Search: any
|
||||
addAcronyms: boolean = false
|
||||
dataSourceReference: MatTableDataSource<ReferenceList>;
|
||||
@Input('pagination') pagination: boolean;
|
||||
@ViewChild(MatPaginator, { static: false }) set matPaginator(paginator: MatPaginator) {
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator = paginator;
|
||||
}
|
||||
}
|
||||
@Input('matpagination') matpagination: boolean;
|
||||
@ViewChildren(MatPaginator) set matquePaginator(quespaginator: QueryList<MatPaginator>) {
|
||||
if (this.matpagination) {
|
||||
this.dataSourceReference.paginator = quespaginator.toArray()[1];
|
||||
}
|
||||
}
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
@ViewChildren(MatPaginator) quespaginator = new QueryList<MatPaginator>();
|
||||
@ViewChildren(MatSort) sortquestion = new QueryList<MatSort>();
|
||||
displayedColumnsReference: string[] = ['srno', 'title', 'page_no', 'actions'];
|
||||
SearchReference: any;
|
||||
book_title: any;
|
||||
SelectedCertificate: any;
|
||||
id: any;
|
||||
IsUpdate = false;
|
||||
public CertificateForm: FormGroup;
|
||||
Certificatelist = [];
|
||||
loglist = [];
|
||||
References = [];
|
||||
oldAuditValueArray = { "Certificate": "", "Book Name": "" }
|
||||
newAuditValueArray = { "Certificate": "", "Book Name": "" }
|
||||
auditHistory = "";
|
||||
book_img: any;
|
||||
constructor(public refService: ReferenceService, public booksService: BooksService, public fb: FormBuilder, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService, public sefpaceService: SelfpacedService) {
|
||||
var setlogin = this.auth.isLoggedIn();
|
||||
if (!setlogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
closeModal() {
|
||||
this.addAcronyms = false
|
||||
this.book_title = "";
|
||||
this.SelectedCertificate = "";
|
||||
this.oldAuditValueArray = { "Certificate": "", "Book Name": "" }
|
||||
this.newAuditValueArray = { "Certificate": "", "Book Name": "" }
|
||||
this.auditHistory = "";
|
||||
this.book_img = "";
|
||||
}
|
||||
addNewaddAcronyms() {
|
||||
this.addAcronyms = true
|
||||
this.IsUpdate = false;
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.CertificateForm = this.fb.group({
|
||||
book_title: ['', Validators.required],
|
||||
SelectedCertificate: ['', Validators.required],
|
||||
book_img: new FormControl()
|
||||
});
|
||||
await this.spinner.show();
|
||||
await this.getAllBooks();
|
||||
await this.ListCertificate();
|
||||
}
|
||||
async delete(item) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You want to delete!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete'
|
||||
}).then(async (result) => {
|
||||
try {
|
||||
if (result.value) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
this.service.token = token;
|
||||
await this.booksService.DeleteBooks(item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + item.book_title + "</span> Book is deleted by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "books", item.id, token);
|
||||
}
|
||||
});
|
||||
await this.getAllBooks();
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
list.message,
|
||||
'Book has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
async getAllBooks() {
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
const users: certificatelist[] = [];
|
||||
await this.booksService.GetAllBooks(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
"srno": srno,
|
||||
"id": element.id,
|
||||
"certificate_name": element.certificate.certificate_name,
|
||||
"certi_id": element.certi_id,
|
||||
"book_title": element.book_title,
|
||||
"book_img": element.book_img,
|
||||
"createdAt": element.createdAt,
|
||||
"updatedAt": element.updatedAt
|
||||
})
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.sort = this.sort;
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.filter();
|
||||
this.pagination = true;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
this.service.ShowError(e.meassage);
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator._changePageSize(this.dataSource.paginator.pageSize);
|
||||
}
|
||||
}
|
||||
async filterReference() {
|
||||
this.dataSourceReference.filter = this.SearchReference;
|
||||
if (this.pagination) {
|
||||
this.dataSourceReference.paginator._changePageSize(this.dataSourceReference.paginator.pageSize);
|
||||
}
|
||||
}
|
||||
async getReferenceByBook(book_id, token) {
|
||||
const users: ReferenceList[] = [];
|
||||
await this.refService.getReferenceByBook(book_id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
"srno": srno,
|
||||
"id": element.id,
|
||||
"title": element.title,
|
||||
"page_no": element.page_no
|
||||
})
|
||||
});
|
||||
this.dataSourceReference = new MatTableDataSource(users);
|
||||
this.dataSourceReference.paginator = this.quespaginator.toArray()[1];
|
||||
this.dataSourceReference.sort = this.sortquestion.toArray()[1];
|
||||
this.matpagination = true;
|
||||
}
|
||||
else {
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
async edit(item) {
|
||||
this.loglist = [];
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.getReferenceByBook(item.id, token);
|
||||
await this.service.get_logs("books", item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.loglist = list.data;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
})
|
||||
this.id = item.id;
|
||||
this.book_title = item.book_title;
|
||||
this.SelectedCertificate = item.certi_id;
|
||||
this.book_img = item.book_img;
|
||||
this.IsUpdate = true;
|
||||
this.addAcronyms = true;
|
||||
this.oldAuditValueArray = { "Certificate": this.Certificatelist.find(x => x.id == this.SelectedCertificate) ? this.Certificatelist.find(x => x.id == this.SelectedCertificate).certificate_name : '', "Book Name": this.book_title }
|
||||
|
||||
}
|
||||
async onSubmit() {
|
||||
this.markFormTouched(this.CertificateForm);
|
||||
if (this.CertificateForm.valid) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.booksService.AddBooks(this.SelectedCertificate, this.book_title, this.book_img, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + this.book_title + "</span> Book is added by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "books", list.data.id, token);
|
||||
}
|
||||
});
|
||||
this.addAcronyms = false;
|
||||
this.IsUpdate = false;
|
||||
this.closeModal();
|
||||
await this.getAllBooks();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess("Book Added Successfully");
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
async UpdateCertificate() {
|
||||
this.markFormTouched(this.CertificateForm);
|
||||
if (this.CertificateForm.valid) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.booksService.UpdateBooks(this.id, this.SelectedCertificate, this.book_title, this.book_img, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
this.newAuditValueArray = { "Certificate": this.Certificatelist.find(x => x.id == this.SelectedCertificate) ? this.Certificatelist.find(x => x.id == this.SelectedCertificate).certificate_name : '', "Book Name": this.book_title }
|
||||
var audit = this.auth.compareAuditHist(this.oldAuditValueArray, this.newAuditValueArray);
|
||||
var desc = audit;
|
||||
await this.service.addAdminLogs(desc, "books", this.id, token);
|
||||
}
|
||||
});
|
||||
this.closeModal();
|
||||
this.addAcronyms = false;
|
||||
this.IsUpdate = false;
|
||||
await this.getAllBooks();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess("Book Updated Successfully");
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
async ListCertificate() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
this.spinner.show();
|
||||
await this.service.ListCertificate(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Certificatelist = list.data;
|
||||
this.SelectedCertificate = "";
|
||||
}
|
||||
})
|
||||
this.spinner.hide();
|
||||
}
|
||||
});
|
||||
}
|
||||
markFormTouched(group: FormGroup | FormArray) {
|
||||
Object.keys(group.controls).forEach((key: string) => {
|
||||
const control = group.controls[key];
|
||||
if (control instanceof FormGroup || control instanceof FormArray) { control.markAsTouched(); this.markFormTouched(control); }
|
||||
else { control.markAsTouched(); };
|
||||
});
|
||||
};
|
||||
editReference(item) {
|
||||
let data = btoa(JSON.stringify(item.id));
|
||||
this.router.navigate([`main/references/${data}`]);
|
||||
}
|
||||
async deleteReference(item) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "Delete this reference!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete'
|
||||
}).then(async (result) => {
|
||||
if (result.value) {
|
||||
this.spinner.show();
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.refService.DeleteReference(item.id, token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + item.web_link + "</span> Reference is deleted by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "references", item.id, token);
|
||||
}
|
||||
});
|
||||
this.addAcronyms = false;
|
||||
this.IsUpdate = false;
|
||||
this.service.ShowSuccess("Reference deleted successfully");
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
handleFileSelect(evt) {
|
||||
let me = this;
|
||||
let file = evt.target.files[0];
|
||||
let mime = "data:" + file.type + ";base64,";
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(file);
|
||||
reader.onload = function () {
|
||||
me.uploadFile(reader.result, evt.target.id);
|
||||
};
|
||||
reader.onerror = function (error) {
|
||||
console.log('Error: ', error);
|
||||
};
|
||||
}
|
||||
async uploadFile(image, model) {
|
||||
this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.sefpaceService.uploadFile(image, token).then(async (imgresponse) => {
|
||||
if (imgresponse[0].status == 200) {
|
||||
var imglist = JSON.parse(<string>imgresponse[0].json);
|
||||
this.book_img = imglist.data;
|
||||
this.spinner.hide();
|
||||
} else {
|
||||
this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
export interface certificatelist {
|
||||
srno: number;
|
||||
id: string;
|
||||
certificate_name: string
|
||||
certi_id: string;
|
||||
book_title: string;
|
||||
book_img: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
}
|
||||
export interface ReferenceList {
|
||||
srno: number;
|
||||
id: string;
|
||||
title: string
|
||||
page_no: string;
|
||||
}
|
||||
@ -0,0 +1,268 @@
|
||||
import {
|
||||
ElementRef,
|
||||
AfterViewInit,
|
||||
Directive,
|
||||
Host,
|
||||
Optional,
|
||||
Renderer2,
|
||||
Self,
|
||||
ViewContainerRef,
|
||||
Input
|
||||
} from "@angular/core";
|
||||
import { MatPaginator } from "@angular/material/paginator";
|
||||
import { MatButton } from "@angular/material/button";
|
||||
|
||||
interface PageObject {
|
||||
length: number;
|
||||
pageIndex: number;
|
||||
pageSize: number;
|
||||
previousPageIndex: number;
|
||||
}
|
||||
|
||||
@Directive({
|
||||
selector: "[style-paginator]"
|
||||
})
|
||||
export class StylePaginatorDirective {
|
||||
private _pageGapTxt = "...";
|
||||
private _rangeStart: number;
|
||||
private _rangeEnd: number;
|
||||
private _buttons: MatButton[] = [];
|
||||
private _curPageObj: PageObject = {
|
||||
length: 0,
|
||||
pageIndex: 0,
|
||||
pageSize: 0,
|
||||
previousPageIndex: 0
|
||||
};
|
||||
|
||||
@Input()
|
||||
get showTotalPages(): number {
|
||||
return this._showTotalPages;
|
||||
}
|
||||
set showTotalPages(value: number) {
|
||||
this._showTotalPages = value % 2 == 0 ? value + 1 : value;
|
||||
}
|
||||
private _showTotalPages = 2;
|
||||
|
||||
get inc(): number {
|
||||
return this._showTotalPages % 2 == 0
|
||||
? this.showTotalPages / 2
|
||||
: (this.showTotalPages - 1) / 2;
|
||||
}
|
||||
|
||||
get numOfPages(): number {
|
||||
return this.matPag.getNumberOfPages();
|
||||
}
|
||||
|
||||
get lastPageIndex(): number {
|
||||
return this.matPag.getNumberOfPages() - 1;
|
||||
}
|
||||
|
||||
constructor(
|
||||
@Host() @Self() @Optional() private readonly matPag: MatPaginator,
|
||||
private vr: ViewContainerRef,
|
||||
private ren: Renderer2
|
||||
) {
|
||||
//to rerender buttons on items per page change and first, last, next and prior buttons
|
||||
this.matPag.page.subscribe((e: PageObject) => {
|
||||
if (
|
||||
this._curPageObj.pageSize != e.pageSize &&
|
||||
this._curPageObj.pageIndex != 0
|
||||
) {
|
||||
e.pageIndex = 0;
|
||||
this._rangeStart = 0;
|
||||
this._rangeEnd = this._showTotalPages - 1;
|
||||
}
|
||||
this._curPageObj = e;
|
||||
|
||||
this.initPageRange();
|
||||
});
|
||||
}
|
||||
|
||||
private buildPageNumbers() {
|
||||
const actionContainer = this.vr.element.nativeElement.querySelector(
|
||||
"div.mat-paginator-range-actions"
|
||||
);
|
||||
const nextPageNode = this.vr.element.nativeElement.querySelector(
|
||||
"button.mat-paginator-navigation-next"
|
||||
);
|
||||
const prevButtonCount = this._buttons.length;
|
||||
|
||||
// remove buttons before creating new ones
|
||||
if (this._buttons.length > 0) {
|
||||
this._buttons.forEach(button => {
|
||||
this.ren.removeChild(actionContainer, button);
|
||||
});
|
||||
//Empty state array
|
||||
this._buttons.length = 0;
|
||||
}
|
||||
|
||||
//initialize next page and last page buttons
|
||||
if (this._buttons.length == 0) {
|
||||
let nodeArray = this.vr.element.nativeElement.childNodes[0].childNodes[0]
|
||||
.childNodes[2].childNodes;
|
||||
setTimeout(() => {
|
||||
for (let i = 0; i < nodeArray.length; i++) {
|
||||
if (nodeArray[i].nodeName === "BUTTON") {
|
||||
if (nodeArray[i].innerHTML.length > 100 && nodeArray[i].disabled) {
|
||||
this.ren.setStyle(nodeArray[i], "background-color", "#0c1030");
|
||||
this.ren.setStyle(nodeArray[i], "color", "#545381");
|
||||
this.ren.setStyle(nodeArray[i], "margin", ".5%");
|
||||
this.ren.setStyle(nodeArray[i], "border", "solid 1px #181d4b");
|
||||
this.ren.setStyle(nodeArray[i], "border-radius", "5px");
|
||||
|
||||
} else if (
|
||||
nodeArray[i].innerHTML.length > 100 &&
|
||||
!nodeArray[i].disabled
|
||||
) {
|
||||
this.ren.setStyle(nodeArray[i], "background-color", "#0c1030");
|
||||
this.ren.setStyle(nodeArray[i], "color", "#545381");
|
||||
this.ren.setStyle(nodeArray[i], "margin", ".5%");
|
||||
this.ren.setStyle(nodeArray[i], "border", "solid 1px #181d4b");
|
||||
this.ren.setStyle(nodeArray[i], "border-radius", "5px");
|
||||
this.ren.setStyle(nodeArray[i], "margin", ".5%");
|
||||
} else if (nodeArray[i].disabled) {
|
||||
this.ren.setStyle(nodeArray[i], "background-color", "#0c1030");
|
||||
this.ren.setStyle(nodeArray[i], "border", "solid 1px #9645c4");
|
||||
this.ren.setStyle(nodeArray[i], "color", "#9645c4");
|
||||
this.ren.setStyle(nodeArray[i], "border-radius", "5px");
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
for (let i = 0; i < this.numOfPages; i++) {
|
||||
if (i >= this._rangeStart && i <= this._rangeEnd) {
|
||||
this.ren.insertBefore(
|
||||
actionContainer,
|
||||
this.createButton(i, this.matPag.pageIndex),
|
||||
nextPageNode
|
||||
);
|
||||
}
|
||||
|
||||
if (i == this._rangeEnd) {
|
||||
this.ren.insertBefore(
|
||||
actionContainer,
|
||||
this.createButton(this._pageGapTxt, this._rangeEnd),
|
||||
nextPageNode
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private createButton(i: any, pageIndex: number): any {
|
||||
const linkBtn: MatButton = this.ren.createElement("button");
|
||||
this.ren.addClass(linkBtn, "mat-mini-fab");
|
||||
this.ren.setStyle(linkBtn, "margin", "1%");
|
||||
this.ren.setStyle(linkBtn, "background-color", "#0c1030");
|
||||
this.ren.setStyle(linkBtn, "border", "solid 1px #181d4b");
|
||||
this.ren.setStyle(linkBtn, "color", "#545381");
|
||||
this.ren.setStyle(linkBtn, "border-radius", "5px");
|
||||
|
||||
const pagingTxt = isNaN(i) ? this._pageGapTxt : +(i + 1);
|
||||
const text = this.ren.createText(pagingTxt + "");
|
||||
|
||||
this.ren.addClass(linkBtn, "mat-custom-page");
|
||||
switch (i) {
|
||||
case pageIndex:
|
||||
this.ren.setAttribute(linkBtn, "disabled", "disabled");
|
||||
break;
|
||||
case this._pageGapTxt:
|
||||
let newIndex = this._curPageObj.pageIndex + this._showTotalPages;
|
||||
|
||||
if (newIndex >= this.numOfPages) newIndex = this.lastPageIndex;
|
||||
|
||||
if (pageIndex != this.lastPageIndex) {
|
||||
this.ren.listen(linkBtn, "click", () => {
|
||||
this.switchPage(newIndex);
|
||||
});
|
||||
}
|
||||
|
||||
if (pageIndex == this.lastPageIndex) {
|
||||
this.ren.setAttribute(linkBtn, "disabled", "disabled");
|
||||
}
|
||||
break;
|
||||
default:
|
||||
this.ren.listen(linkBtn, "click", () => {
|
||||
this.switchPage(i);
|
||||
});
|
||||
break;
|
||||
}
|
||||
|
||||
this.ren.appendChild(linkBtn, text);
|
||||
//Add button to private array for state
|
||||
this._buttons.push(linkBtn);
|
||||
return linkBtn;
|
||||
}
|
||||
//calculates the button range based on class input parameters and based on current page index value. Used to render new buttons after event.
|
||||
private initPageRange(): void {
|
||||
const middleIndex = (this._rangeStart + this._rangeEnd) / 2;
|
||||
|
||||
this._rangeStart = this.calcRangeStart(middleIndex);
|
||||
this._rangeEnd = this.calcRangeEnd(middleIndex);
|
||||
|
||||
this.buildPageNumbers();
|
||||
}
|
||||
|
||||
//Helper function To calculate start of button range
|
||||
private calcRangeStart(middleIndex: number): number {
|
||||
switch (true) {
|
||||
case this._curPageObj.pageIndex == 0 && this._rangeStart != 0:
|
||||
return 0;
|
||||
case this._curPageObj.pageIndex > this._rangeEnd:
|
||||
return this._curPageObj.pageIndex + this.inc > this.lastPageIndex
|
||||
? this.lastPageIndex - this.inc * 2
|
||||
: this._curPageObj.pageIndex - this.inc;
|
||||
case this._curPageObj.pageIndex > this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex > middleIndex &&
|
||||
this._rangeEnd < this.lastPageIndex:
|
||||
return this._rangeStart + 1;
|
||||
case this._curPageObj.pageIndex < this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex < middleIndex &&
|
||||
this._rangeStart > 0:
|
||||
return this._rangeStart - 1;
|
||||
default:
|
||||
return this._rangeStart;
|
||||
}
|
||||
}
|
||||
//Helpter function to calculate end of button range
|
||||
private calcRangeEnd(middleIndex: number): number {
|
||||
switch (true) {
|
||||
case this._curPageObj.pageIndex == 0 &&
|
||||
this._rangeEnd != this._showTotalPages:
|
||||
return this._showTotalPages - 1;
|
||||
case this._curPageObj.pageIndex > this._rangeEnd:
|
||||
return this._curPageObj.pageIndex + this.inc > this.lastPageIndex
|
||||
? this.lastPageIndex
|
||||
: this._curPageObj.pageIndex + 1;
|
||||
case this._curPageObj.pageIndex > this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex > middleIndex &&
|
||||
this._rangeEnd < this.lastPageIndex:
|
||||
return this._rangeEnd + 1;
|
||||
case this._curPageObj.pageIndex < this._curPageObj.previousPageIndex &&
|
||||
this._curPageObj.pageIndex < middleIndex &&
|
||||
this._rangeStart >= 0 &&
|
||||
this._rangeEnd > this._showTotalPages - 1:
|
||||
return this._rangeEnd - 1;
|
||||
default:
|
||||
return this._rangeEnd;
|
||||
}
|
||||
}
|
||||
//Helper function to switch page on non first, last, next and previous buttons only.
|
||||
private switchPage(i: number): void {
|
||||
const previousPageIndex = this.matPag.pageIndex;
|
||||
this.matPag.pageIndex = i;
|
||||
this.matPag["_emitPageEvent"](previousPageIndex);
|
||||
this.initPageRange();
|
||||
}
|
||||
//Initialize default state after view init
|
||||
public ngAfterViewInit() {
|
||||
this._rangeStart = 0;
|
||||
this._rangeEnd = this._showTotalPages - 1;
|
||||
this.initPageRange();
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,277 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Exams</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Certification, Exam Name" [(ngModel)]="Search" autocomplete="off"
|
||||
(keyup)="filter()" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
<button (click)="addNewCatExam()">Add Exam</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="srno">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span>{{ row.srno }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="certificate_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Certification
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.certificate_name }}">{{
|
||||
row.certificate_name
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="ketexam_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Exam Name</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.ketexam_name }}">{{ row.ketexam_name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="questionlenth">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header># Questions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.questionlenth }}">{{ row.questionlenth }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="time">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Time Limit</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.time }}">{{ row.time }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="edit(row)" alt="Edit" class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="delete(row)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<mat-paginator style-paginator showFirstLastButtons [showTotalPages]="3" *ngIf="pagination"
|
||||
[length]="dataSource.data ? dataSource.data.length : 0" [pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
<div class="cutome-modal" *ngIf="addCateExam">
|
||||
<div class="cutome-modal-content" style="width: 60%;">
|
||||
<div class="modal-header">
|
||||
<p *ngIf="!IsUpdate">Add CAT Exam</p>
|
||||
<p *ngIf="IsUpdate">Edit CAT Exam</p>
|
||||
<span (click)="closeModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<form class="example-form" [formGroup]="PracticeTestForm">
|
||||
<div class="formwrapper">
|
||||
<div>
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="Certificate" formControlName="Certificate" required [ngClass]="{
|
||||
err:
|
||||
PracticeTestForm.controls['Certificate'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PracticeTestForm.controls['Certificate'].dirty ||
|
||||
PracticeTestForm.controls['Certificate'].touched)
|
||||
}">
|
||||
<option value="">Select Certification</option>
|
||||
<option *ngFor="let item of Certificatelist" value="{{ item.id }}">
|
||||
{{ item.certificate_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<input [(ngModel)]="PracticeTestname" formControlName="PracticeTestname"
|
||||
placeholder="Exam Name" name="name" required [ngClass]="{
|
||||
err:
|
||||
PracticeTestForm.controls['PracticeTestname'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PracticeTestForm.controls['PracticeTestname'].dirty ||
|
||||
PracticeTestForm.controls['PracticeTestname'].touched)
|
||||
}" />
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<ng-select [items]="acrolist" formControlName="Acronymsname" bindLabel="short_name"
|
||||
bindValue="id" placeholder="Select Acronyms" appendTo="body" multiple="true"
|
||||
[(ngModel)]="acroselecteds" [ngClass]="{
|
||||
err:
|
||||
PracticeTestForm.controls['Acronymsname'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PracticeTestForm.controls['Acronymsname'].dirty ||
|
||||
PracticeTestForm.controls['Acronymsname'].touched)
|
||||
}">
|
||||
</ng-select>
|
||||
</div>
|
||||
<div>
|
||||
<div class="date-select">
|
||||
<div class="date-time">
|
||||
<div class="hr-select" [ngClass]="{
|
||||
err:
|
||||
PracticeTestForm.controls['hours'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PracticeTestForm.controls['hours'].dirty ||
|
||||
PracticeTestForm.controls['hours'].touched)
|
||||
}">
|
||||
<div class="select-box">
|
||||
<input [(ngModel)]="hours" formControlName="hours" placeholder="0"
|
||||
type="number" required />
|
||||
</div>
|
||||
<span>HR</span>
|
||||
</div>
|
||||
<div class="min-select" [ngClass]="{
|
||||
err:
|
||||
PracticeTestForm.controls['Minutes'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PracticeTestForm.controls['Minutes'].dirty ||
|
||||
PracticeTestForm.controls['Minutes'].touched)
|
||||
}">
|
||||
<div class="select-box">
|
||||
<input [(ngModel)]="Minutes" formControlName="Minutes" placeholder="0"
|
||||
type="number" required />
|
||||
</div>
|
||||
<span>MIN</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="pagesection" *ngIf="IsUpdate">
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input [(ngModel)]="SearchQuestion" (keyup)="filterQuestion()"
|
||||
placeholder="Search by Question" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSourcequestion" #quespaginator matSort
|
||||
style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="srno">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let row; let i = index">
|
||||
<span>{{ i + 1 }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="question">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Question
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span>{{ row.title }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="AnswerA">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Answer A
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span>{{ row.first_choice }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="AnswerB">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Answer B
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span>{{ row.second_choice }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="AnswerC">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Answer C
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span>{{ row.third_choice }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="AnswerD">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Answer D
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span>{{ row.fourth_choice }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="questionedit(row)" alt="Edit"
|
||||
class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="deleteque(row)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumnsquestion"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumnsquestion"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer" *ngIf="IsUpdate">
|
||||
<mat-paginator style-paginator #quespaginator [showTotalPages]="0"
|
||||
[length]="dataSourcequestion.data ? dataSourcequestion.data.length : 0" *ngIf="matpagination"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]" showFirstLastButtons>
|
||||
</mat-paginator>
|
||||
</div>
|
||||
<div class="history-div" *ngIf="IsUpdate">
|
||||
<h3><span class="material-icons"> history </span>Audit history</h3>
|
||||
<div class="audit-table">
|
||||
<div class="table-header">
|
||||
<div class="date-title"><span>Date & Time</span></div>
|
||||
<div class="action-title"><span>Action</span></div>
|
||||
</div>
|
||||
<div class="main-body-audit">
|
||||
<div class="table-body" *ngFor="let log of loglist">
|
||||
<div class="date-title">
|
||||
<span>{{ log.createdAt | date: "medium" }}</span>
|
||||
</div>
|
||||
<div class="action-title">
|
||||
<span [innerHTML]="log.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeModal()">Cancel</button>
|
||||
<div *ngIf="!IsUpdate">
|
||||
<button type="button" class="submit-btn" (click)="onSubmit()">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="IsUpdate">
|
||||
<button type="button" class="submit-btn" (click)="Update()">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,226 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
.search-wrap {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mat-button.mat-primary {
|
||||
background-color: #3f51b5 !important;
|
||||
color: #fff;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.inputsearch {
|
||||
min-width: 200px;
|
||||
}
|
||||
|
||||
mat-icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.loading {
|
||||
font-size: 20px;
|
||||
color: white;
|
||||
}
|
||||
|
||||
.formwrapper {
|
||||
select {
|
||||
width: 100%;
|
||||
option {
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
ng-select {
|
||||
width: 100%;
|
||||
}
|
||||
.select-box {
|
||||
span {
|
||||
right: 15px;
|
||||
}
|
||||
}
|
||||
.date-select {
|
||||
width: 100%;
|
||||
.date-time {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.hr-select {
|
||||
display: flex;
|
||||
border: 1px solid #000000;
|
||||
border-radius: 4px;
|
||||
width: 47%;
|
||||
.select-box {
|
||||
input {
|
||||
border: none;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
span {
|
||||
background: #fafafa;
|
||||
padding: 7px 32px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
color: $popupText;
|
||||
}
|
||||
}
|
||||
.min-select {
|
||||
display: flex;
|
||||
border: 1px solid $popupBorder;
|
||||
border-radius: 4px;
|
||||
width: 47%;
|
||||
.select-box {
|
||||
input {
|
||||
border: none;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
span {
|
||||
background: #fafafa;
|
||||
padding: 7px 28px;
|
||||
border-top-right-radius: 4px;
|
||||
border-bottom-right-radius: 4px;
|
||||
color: $popupText;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
.mat-row {
|
||||
transition: all 0.5s;
|
||||
&:hover {
|
||||
border-color: #9645c4;
|
||||
}
|
||||
&:hover td.mat-cell {
|
||||
border-color: #9645c4;
|
||||
border-left-color: #9645c4 !important;
|
||||
border-right-color: #9645c4 !important;
|
||||
}
|
||||
}
|
||||
tr.mat-header-row {
|
||||
background: #2a2a5b;
|
||||
height: 50px;
|
||||
}
|
||||
tr.mat-header-row th:first-child {
|
||||
// border: 1px solid #2f3464;
|
||||
border-right: none;
|
||||
}
|
||||
tr.mat-header-row th {
|
||||
// border-top: 1px solid #2f3464;
|
||||
border-bottom: 1px solid #2f3464;
|
||||
}
|
||||
tr.mat-header-row th {
|
||||
// border-top: 1px solid #2f3464;
|
||||
border-bottom: 1px solid #2f3464;
|
||||
}
|
||||
tr td.mat-cell:first-child {
|
||||
border-left: 1px solid #303563;
|
||||
background: #1a1f47;
|
||||
}
|
||||
tr td.mat-cell {
|
||||
background: #1a1f47;
|
||||
// border-top: 1px solid #303563;
|
||||
border-bottom: 1px solid #303563;
|
||||
padding: auto !important;
|
||||
}
|
||||
tr td.mat-cell:last-child {
|
||||
border-right: 1px solid #303563;
|
||||
}
|
||||
.pagesection {
|
||||
border-top: 1px solid #000000;
|
||||
padding-top: 20px;
|
||||
margin-top: 30px;
|
||||
.search-wrap {
|
||||
.search-icon {
|
||||
width: 50%;
|
||||
margin: 0;
|
||||
input {
|
||||
background: $searchBg;
|
||||
border: 1px solid $searchBorder;
|
||||
padding: 10px 40px 10px 20px;
|
||||
margin: 10px 0;
|
||||
width: calc(100% - 60px);
|
||||
color: $searchText;
|
||||
}
|
||||
span {
|
||||
right: 10px;
|
||||
top: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.mat-paginator {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
::ng-deep tr.mat-header-row th {
|
||||
&:first-child {
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
width: 150px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
width: 200px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
width: 170px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
width: 130px;
|
||||
}
|
||||
&:last-child {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
::ng-deep tr td.mat-cell {
|
||||
&:first-child {
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
width: 150px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
width: 200px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
width: 170px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
width: 130px;
|
||||
}
|
||||
&:last-child {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
::ng-deep .mat-paginator-container {
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
.mat-icon-button {
|
||||
background: $paginationBtnBg !important;
|
||||
border-radius: 5px !important;
|
||||
border: 1px solid $paginationBtnBorder !important;
|
||||
margin: 0 5px !important;
|
||||
cursor: pointer;
|
||||
color: $paginationBtnText !important;
|
||||
|
||||
&:hover {
|
||||
border: 1px solid $PaginationBtnHover !important;
|
||||
color: $PaginationBtnHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-paginator-page-size-label {
|
||||
color: $paginationText !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.mat-paginator-range-label {
|
||||
color: $Pink;
|
||||
width: 140px;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CateexamtestComponent } from './cateexamtest.component';
|
||||
|
||||
describe('CateexamtestComponent', () => {
|
||||
let component: CateexamtestComponent;
|
||||
let fixture: ComponentFixture<CateexamtestComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CateexamtestComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CateexamtestComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,556 @@
|
||||
import { Component, Input, OnInit, QueryList, ViewChild, ViewChildren } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import Swal from 'sweetalert2/dist/sweetalert2.js';
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from 'ngx-spinner';
|
||||
import { Router } from '@angular/router';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import {
|
||||
FormBuilder,
|
||||
FormControl,
|
||||
FormGroup,
|
||||
Validators,
|
||||
FormArray,
|
||||
} from '@angular/forms';
|
||||
import { AcronymsService } from '../../services/acronyms/acronyms.service';
|
||||
import { CatexamService } from '../../services/catexam/catexam.service';
|
||||
import { CourseService } from '../../services/course/course.service';
|
||||
@Component({
|
||||
selector: 'app-cateexamtest',
|
||||
templateUrl: './cateexamtest.component.html',
|
||||
styleUrls: ['./cateexamtest.component.scss'],
|
||||
})
|
||||
export class CateexamtestComponent implements OnInit {
|
||||
displayedColumns: string[] = ['srno', 'certificate_name', 'ketexam_name', 'questionlenth', 'time', 'actions'];
|
||||
@Input('pagination') pagination: boolean;
|
||||
@ViewChild(MatPaginator, { static: false }) set matPaginator(paginator: MatPaginator) {
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator = paginator;
|
||||
}
|
||||
}
|
||||
@Input('matpagination') matpagination: boolean;
|
||||
@ViewChildren(MatPaginator) set matquePaginator(quespaginator: QueryList<MatPaginator>) {
|
||||
if (this.matpagination) {
|
||||
this.dataSourcequestion.paginator = quespaginator.toArray()[1];
|
||||
}
|
||||
}
|
||||
dataSource: MatTableDataSource<cateexamlist>;
|
||||
@ViewChildren(MatSort) sort = new QueryList<MatSort>();
|
||||
displayedColumnsquestion: string[] = ['srno', 'question', 'AnswerA', 'AnswerB', 'AnswerC', 'AnswerD', 'actions',];
|
||||
dataSourcequestion: MatTableDataSource<questionlist>;
|
||||
@ViewChildren(MatSort) sortquestion = new QueryList<MatSort>();
|
||||
Search: any;
|
||||
addCateExam: boolean = false;
|
||||
id: any;
|
||||
EditHideen = true;
|
||||
PracticeTestname: any;
|
||||
public PracticeTestForm: FormGroup;
|
||||
Certificate: any;
|
||||
Certificatelist = [];
|
||||
acrolist = [];
|
||||
acroselecteds = [];
|
||||
hours: any;
|
||||
Minutes: any;
|
||||
IsUpdate: boolean = false;
|
||||
loglist = [];
|
||||
SearchQuestion: any;
|
||||
editCatQuestion: boolean = false;
|
||||
oldAuditValueArray = { "Certificate": "", "Exam Name": "", "Acronyms": "", "Hours": "", "Minutes": "" }
|
||||
newAuditValueArray = { "Certificate": "", "Exam Name": "", "Acronyms": "", "Hours": "", "Minutes": "" }
|
||||
auditHistory = "";
|
||||
@ViewChildren(MatPaginator) quespaginator = new QueryList<MatPaginator>();
|
||||
@ViewChildren(MatPaginator) paginator = new QueryList<MatPaginator>();
|
||||
constructor(
|
||||
public courseService: CourseService,
|
||||
public catTestService: CatexamService,
|
||||
public AcronymsService: AcronymsService,
|
||||
public fb: FormBuilder,
|
||||
public auth: AuthorizationService,
|
||||
public router: Router,
|
||||
public spinner: NgxSpinnerService,
|
||||
public service: ServicesService
|
||||
) {
|
||||
var setlogin = this.auth.isLoggedIn();
|
||||
this.dataSourcequestion = new MatTableDataSource();
|
||||
if (!setlogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
closeModal() {
|
||||
this.addCateExam = false;
|
||||
this.IsUpdate = false;
|
||||
this.hours = '';
|
||||
this.Minutes = '';
|
||||
this.acroselecteds = [];
|
||||
this.Certificate = "";
|
||||
this.PracticeTestname = "";
|
||||
this.oldAuditValueArray = { "Certificate": "", "Exam Name": "", "Acronyms": "", "Hours": "", "Minutes": "" }
|
||||
this.newAuditValueArray = { "Certificate": "", "Exam Name": "", "Acronyms": "", "Hours": "", "Minutes": "" }
|
||||
this.auditHistory = "";
|
||||
}
|
||||
addNewCatExam() {
|
||||
this.addCateExam = true;
|
||||
this.IsUpdate = false;
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.PracticeTestForm = this.fb.group({
|
||||
PracticeTestname: ['', Validators.required],
|
||||
Certificate: ['', Validators.required],
|
||||
Acronymsname: ['', Validators.required],
|
||||
hours: ['', Validators.required],
|
||||
Minutes: ['', Validators.required],
|
||||
});
|
||||
await this.spinner.show();
|
||||
await this.ListCateexam();
|
||||
await this.certificatelist();
|
||||
await this.Acroymslist();
|
||||
await this.spinner.hide();
|
||||
}
|
||||
async delete(item) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: 'You want to delete!',
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete',
|
||||
}).then(async (result) => {
|
||||
if (result.value) {
|
||||
await this.spinner.show();
|
||||
await this.auth
|
||||
.getAuthenticatedUser()
|
||||
.getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
await this.catTestService
|
||||
.DeleteCateExamTest(item.id, token)
|
||||
.then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth
|
||||
.getAuthenticatedUser()
|
||||
.getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem('adminUser');
|
||||
if (e == null || e == undefined || e == '') {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc =
|
||||
'<span> ' +
|
||||
item.ketexam_name +
|
||||
'</span> Cat Exam is deleted by <span> ' +
|
||||
e +
|
||||
'</span>';
|
||||
await this.service.addAdminLogs(
|
||||
desc,
|
||||
'cateexam',
|
||||
item.id,
|
||||
token
|
||||
);
|
||||
}
|
||||
});
|
||||
await this.ListCateexam();
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
list.message,
|
||||
'Cate Exam test has been deleted.',
|
||||
'success'
|
||||
);
|
||||
} else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
async ListCateexam() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
const users: cateexamlist[] = [];
|
||||
await this.catTestService.ListCateExamTest(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
srno: srno,
|
||||
id: element.id,
|
||||
certificate_name: element.certificate.certificate_name,
|
||||
ketexam_name: element.ketexam_name,
|
||||
ques_count: element.ques_count,
|
||||
status: element.status,
|
||||
createdAt: element.createdAt,
|
||||
updatedAt: element.updatedAt,
|
||||
cid: element.certificate.id,
|
||||
time: element.time,
|
||||
acronum_ids: element.acronums,
|
||||
course_id: element.course_id,
|
||||
questionlenth: element.questions.length
|
||||
? element.questions.length
|
||||
: 0,
|
||||
question: element.questions,
|
||||
});
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.sort = this.sort.toArray()[0];
|
||||
this.dataSource.paginator = this.paginator.toArray()[0];
|
||||
this.filter();
|
||||
this.pagination = true;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
async edit(item) {
|
||||
this.dataSourcequestion = new MatTableDataSource(item.question);
|
||||
setTimeout(() => {
|
||||
this.dataSourcequestion.paginator = this.quespaginator.toArray()[1];
|
||||
this.dataSourcequestion.sort = this.sortquestion.toArray()[1];
|
||||
this.matpagination = true;
|
||||
}, 1000);
|
||||
this.id = item.id;
|
||||
this.addCateExam = true;
|
||||
this.IsUpdate = true;
|
||||
this.PracticeTestname = item.ketexam_name;
|
||||
this.Certificate = item.cid;
|
||||
if (item.acronum_ids) {
|
||||
this.acroselecteds = item.acronum_ids.map(x => x.id);
|
||||
}
|
||||
let time = item.time;
|
||||
if (time != null && time != '') {
|
||||
this.hours = time.split(":")[0];
|
||||
this.Minutes = time.split(":")[1];
|
||||
} else {
|
||||
this.hours = '';
|
||||
this.Minutes = '';
|
||||
}
|
||||
this.oldAuditValueArray = { "Certificate": this.Certificatelist.find(x => x.id == this.Certificate) ? this.Certificatelist.find(x => x.id == this.Certificate).certificate_name : '', "Exam Name": this.PracticeTestname, "Acronyms": this.acrolist.filter((item) => { return this.acroselecteds.includes(item.id) }).map(function (elem) { return elem.short_name; }).join(","), "Hours": this.hours, "Minutes": this.Minutes }
|
||||
this.loglist = [];
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
this.service.get_logs('cateexam', item.id, token).then(
|
||||
async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.loglist = list.data;
|
||||
await this.spinner.hide();
|
||||
} else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
},
|
||||
(err) => {
|
||||
this.spinner.hide();
|
||||
}
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator._changePageSize(this.dataSource.paginator.pageSize);
|
||||
}
|
||||
}
|
||||
async filterQuestion() {
|
||||
this.dataSourcequestion.filter = this.SearchQuestion;
|
||||
if (this.matpagination) {
|
||||
this.dataSourcequestion.paginator._changePageSize(this.dataSourcequestion.paginator.pageSize)
|
||||
}
|
||||
}
|
||||
async certificatelist() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
await this.service.ListCertificate(token).then(async (data) => {
|
||||
this.Certificatelist = [];
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Certificatelist = list.data;
|
||||
this.Certificate = '';
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
async Acroymslist() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
await this.AcronymsService.Listacronyms(token).then(async (data) => {
|
||||
this.acrolist = [];
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.acrolist = list.data;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
async onSubmit() {
|
||||
this.markFormTouched(this.PracticeTestForm);
|
||||
if (this.PracticeTestForm.valid) {
|
||||
await this.spinner.show();
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
var time = this.hours + ':' + this.Minutes + ':00';
|
||||
await this.catTestService
|
||||
.AddCateExamTest(
|
||||
this.PracticeTestname,
|
||||
"1",
|
||||
this.Certificate,
|
||||
this.acroselecteds.toString(),
|
||||
time,
|
||||
token
|
||||
)
|
||||
.then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth
|
||||
.getAuthenticatedUser()
|
||||
.getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem('adminUser');
|
||||
if (e == null || e == undefined || e == '') {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc =
|
||||
'<span> ' +
|
||||
this.PracticeTestname +
|
||||
'</span> Cat Exam is added by <span> ' +
|
||||
e +
|
||||
'</span>';
|
||||
await this.service.addAdminLogs(
|
||||
desc,
|
||||
'cateexam',
|
||||
list.data.id,
|
||||
token
|
||||
);
|
||||
}
|
||||
});
|
||||
await this.ListCateexam();
|
||||
this.closeModal();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess('Exam Added Successfully');
|
||||
} else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
async Update() {
|
||||
this.markFormTouched(this.PracticeTestForm);
|
||||
if (this.PracticeTestForm.valid) {
|
||||
if (parseInt(this.hours) > 0 || parseInt(this.Minutes) > 0) {
|
||||
await this.spinner.show();
|
||||
await this.auth
|
||||
.getAuthenticatedUser()
|
||||
.getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
var time = this.hours + ':' + this.Minutes + ':00';
|
||||
await this.catTestService
|
||||
.UpdateCateExamTest(
|
||||
this.PracticeTestname,
|
||||
this.id,
|
||||
"1",
|
||||
this.Certificate,
|
||||
this.acroselecteds.toString(),
|
||||
time,
|
||||
token
|
||||
)
|
||||
.then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.auth
|
||||
.getAuthenticatedUser()
|
||||
.getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
} else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem('adminUser');
|
||||
if (e == null || e == undefined || e == '') {
|
||||
e = 'admin';
|
||||
}
|
||||
this.newAuditValueArray = { "Certificate": this.Certificatelist.find(x => x.id == this.Certificate) ? this.Certificatelist.find(x => x.id == this.Certificate).certificate_name : '', "Exam Name": this.PracticeTestname, "Acronyms": this.acrolist.filter((item) => { return this.acroselecteds.includes(item.id) }).map(function (elem) { return elem.short_name; }).join(","), "Hours": this.hours, "Minutes": this.Minutes };
|
||||
var audit = this.auth.compareAuditHist(this.oldAuditValueArray, this.newAuditValueArray);
|
||||
var desc = audit;
|
||||
await this.service.addAdminLogs(desc, 'cateexam', this.id, token);
|
||||
}
|
||||
});
|
||||
await this.ListCateexam();
|
||||
this.closeModal();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess('Exam Updated Successfully');
|
||||
} else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.service.ShowError('Please Valid time format.');
|
||||
}
|
||||
}
|
||||
}
|
||||
markFormTouched(group: FormGroup | FormArray) {
|
||||
Object.keys(group.controls).forEach((key: string) => {
|
||||
const control = group.controls[key];
|
||||
if (control instanceof FormGroup || control instanceof FormArray) {
|
||||
control.markAsTouched();
|
||||
this.markFormTouched(control);
|
||||
} else {
|
||||
control.markAsTouched();
|
||||
}
|
||||
});
|
||||
}
|
||||
questionedit(item) {
|
||||
let data = btoa(JSON.stringify(item.id));
|
||||
this.router.navigate([`main/CateExamQuestion/${data}`]);
|
||||
}
|
||||
async deleteque(item) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You want to delete!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete'
|
||||
}).then(async (result) => {
|
||||
if (result.value) {
|
||||
await this.spinner.show();
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.catTestService.DeletecateexamQuestion(item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + item.title + "</span> Cat Question is deleted by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "cateexamquestion", item.id, token)
|
||||
this.closeModal();
|
||||
this.ListCateexam();
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
list.message,
|
||||
'CAT Question has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(e.message);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
export interface cateexamlist {
|
||||
srno: number;
|
||||
id: string;
|
||||
ketexam_name: string;
|
||||
certificate_name: string;
|
||||
ques_count: number;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
cid: number;
|
||||
time: string;
|
||||
acronum_ids: string;
|
||||
course_id: string;
|
||||
questionlenth: string;
|
||||
question: [];
|
||||
}
|
||||
export interface questionlist {
|
||||
srno: number;
|
||||
id: string;
|
||||
answer: string;
|
||||
blog_url: string;
|
||||
bookpage_no: number;
|
||||
createdAt: string;
|
||||
d_id: string;
|
||||
description: string;
|
||||
first_choice: number;
|
||||
fourth_choice: string;
|
||||
point: string;
|
||||
ref_link: string;
|
||||
sd_id: string;
|
||||
second_choice: string;
|
||||
status: string;
|
||||
subtopic_id: string;
|
||||
test_id: string;
|
||||
third_choice: string;
|
||||
title: string;
|
||||
topic_id: string;
|
||||
type: string;
|
||||
updatedAt: string;
|
||||
youtube_link: string;
|
||||
}
|
||||
@ -0,0 +1,396 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Questions</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Certification, Topic, Domain..." [(ngModel)]="Search" autocomplete="off"
|
||||
(keyup)="filter()" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
<button (click)="addNewCatExamQua()">Add Question</button>
|
||||
<button (click)="openBulkUploadModal()">Bulk Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="srno">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span>{{ row.srno }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="certificate_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
Certification
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.certificate_name }}">{{
|
||||
row.certificate_name
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="domin_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Domain</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.domin_name }}">{{ row.domin_name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="subdomain_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Subdomain</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.subdomain_name }}">{{
|
||||
row.subdomain_name
|
||||
}}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="topic_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Topic</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.topic_name }}">{{ row.topic_name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="ketexam_name">
|
||||
<th style="white-space: nowrap" mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
CAT Exam
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.ketexam_name }}">{{ row.ketexam_name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="title">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Question</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.title }}">{{ row.title }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="type">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Difficulty</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<span title="{{ row.type }}">{{ row.type }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="edit(row)" alt="Edit" class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="delete(row)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<mat-paginator style-paginator showFirstLastButtons [showTotalPages]="3" *ngIf="pagination"
|
||||
[length]="dataSource.data ? dataSource.data.length : 0" [pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
|
||||
<div class="cutome-modal" *ngIf="addCateExamQua">
|
||||
<div class="cutome-modal-content">
|
||||
<div class="modal-header">
|
||||
<p *ngIf="!IsUpdate">Add Question</p>
|
||||
<p *ngIf="IsUpdate">Edit Question</p>
|
||||
<p *ngIf="IsUpdate" class="diff-score"><span class="score">Difficulty Score: </span>{{DifficultyScore}}</p>
|
||||
<span (click)="closeModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<form class="example-form" [formGroup]="PraacticeQueForm">
|
||||
<div class="formwrapper">
|
||||
<div class="w-50">
|
||||
<!-- <label>Certification</label> -->
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="CertificateName" (change)="certificatechange($event)"
|
||||
formControlName="CertificateName" required [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['CertificateName'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PraacticeQueForm.controls['CertificateName'].dirty ||
|
||||
PraacticeQueForm.controls['CertificateName'].touched)
|
||||
}">
|
||||
<option value="">Select Certification</option>
|
||||
<option *ngFor="let items of Certificates" value="{{ items.id }}">
|
||||
{{ items.certificate_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <label>Domain</label> -->
|
||||
<div class="select-box">
|
||||
<select (change)="domainchange($event)" [(ngModel)]="Domainname"
|
||||
formControlName="Domainname" required [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['Domainname'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PraacticeQueForm.controls['Domainname'].dirty ||
|
||||
PraacticeQueForm.controls['Domainname'].touched)
|
||||
}" tabindex="2">
|
||||
<option value="">Select Domain</option>
|
||||
<option *ngFor="let item of Domain" value="{{ item.id }}">
|
||||
{{ item.domin_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <label>Sub Domain</label> -->
|
||||
<div class="select-box">
|
||||
<select (change)="SubDomainchange($event)"
|
||||
[attr.disabled]="this.Domainname == '' ? true : null" [(ngModel)]="subdomainname"
|
||||
formControlName="subdomainname" required [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['subdomainname'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PraacticeQueForm.controls['subdomainname'].dirty ||
|
||||
PraacticeQueForm.controls['subdomainname'].touched)
|
||||
}" tabindex="3">
|
||||
<option value="">Select Sub Domain</option>
|
||||
<option *ngFor="let item of SubDomain" value="{{ item.id }}">
|
||||
{{ item.subdomain_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <label>Topic</label> -->
|
||||
<div class="select-box">
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="Topicname" formControlName="Topicname" required [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['Topicname'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PraacticeQueForm.controls['Topicname'].dirty ||
|
||||
PraacticeQueForm.controls['Topicname'].touched)
|
||||
}" tabindex="4">
|
||||
<option value="">Select Topic</option>
|
||||
<option *ngFor="let item of Topics" value="{{ item.id }}">
|
||||
{{ item.topic_name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="select-test">
|
||||
<label>Select CAT Exams</label>
|
||||
<ng-select [items]="CatExams" formControlName="catexamsid" bindLabel="ketexam_name"
|
||||
bindValue="id" placeholder="Select" appendTo="body" multiple="true"
|
||||
[(ngModel)]="selecteds" [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['catexamsid'].hasError('required') &&
|
||||
(PraacticeQueForm.controls['catexamsid'].dirty ||
|
||||
PraacticeQueForm.controls['catexamsid'].touched)
|
||||
}">
|
||||
</ng-select>
|
||||
</div>
|
||||
|
||||
<div class="Question" [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['title'].hasError('required') &&
|
||||
(PraacticeQueForm.controls['title'].dirty ||
|
||||
PraacticeQueForm.controls['title'].touched)
|
||||
}">
|
||||
<label>Question</label>
|
||||
<textarea [(ngModel)]="title" formControlName="title" placeholder="Type here..." type="text"
|
||||
name="title" required tabindex="5">
|
||||
</textarea>
|
||||
</div>
|
||||
|
||||
<div class="Question" [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['option1'].hasError('required') &&
|
||||
(PraacticeQueForm.controls['option1'].dirty ||
|
||||
PraacticeQueForm.controls['option1'].touched)
|
||||
}">
|
||||
<label>Answer A</label>
|
||||
|
||||
<textarea [(ngModel)]="option1" formControlName="option1" placeholder="Type here..."
|
||||
type="text" name="title" required tabindex="6"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="Question" [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['option2'].hasError('required') &&
|
||||
(PraacticeQueForm.controls['option2'].dirty ||
|
||||
PraacticeQueForm.controls['option2'].touched)
|
||||
}">
|
||||
<label>Answer B</label>
|
||||
<textarea [(ngModel)]="option2" formControlName="option2" placeholder="Type here..."
|
||||
type="text" name="title" required tabindex="7"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="Question" [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['option3'].hasError('required') &&
|
||||
(PraacticeQueForm.controls['option3'].dirty ||
|
||||
PraacticeQueForm.controls['option3'].touched)
|
||||
}">
|
||||
<label>Answer C</label>
|
||||
<textarea [(ngModel)]="option3" formControlName="option3" placeholder="Type here..."
|
||||
type="text" name="title" required tabindex="8"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="Question" [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['option4'].hasError('required') &&
|
||||
(PraacticeQueForm.controls['option4'].dirty ||
|
||||
PraacticeQueForm.controls['option4'].touched)
|
||||
}">
|
||||
<label>Answer D</label>
|
||||
<textarea [(ngModel)]="option4" formControlName="option4" placeholder="Type here..."
|
||||
type="text" name="title" required tabindex="9"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="w-50">
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="CorrectAnswer" formControlName="CorrectAnswer" required [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['CorrectAnswer'].hasError(
|
||||
'required'
|
||||
) &&
|
||||
(PraacticeQueForm.controls['CorrectAnswer'].dirty ||
|
||||
PraacticeQueForm.controls['CorrectAnswer'].touched)
|
||||
}" tabindex="10">
|
||||
<option value="">Select Correct Answer</option>
|
||||
<option value="1">Option1</option>
|
||||
<option value="2">Option2</option>
|
||||
<option value="3">Option3</option>
|
||||
<option value="4">Option4</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<!-- <label>Type</label> -->
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="Type" formControlName="Type" required [ngClass]="{
|
||||
err:
|
||||
PraacticeQueForm.controls['Type'].hasError('required') &&
|
||||
(PraacticeQueForm.controls['Type'].dirty ||
|
||||
PraacticeQueForm.controls['Type'].touched)
|
||||
}" tabindex="11">
|
||||
<option value="">Select Type</option>
|
||||
<option value="VERY SIMPLE">VERY SIMPLE</option>
|
||||
<option value="SIMPLE">SIMPLE</option>
|
||||
<option value="AVERAGE">AVERAGE</option>
|
||||
<option value="ABOVE AVERAGE">ABOVE AVERAGE</option>
|
||||
<option value="HARD">HARD</option>
|
||||
<option value="DIFFICULT">DIFFICULT</option>
|
||||
<option value="TRICKY">TRICKY</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
<div class="Question">
|
||||
<label>Explanation</label>
|
||||
<textarea tabindex="13" name="Explanation" placeholder="Type here..."
|
||||
formControlName="Explanation" [(ngModel)]="Explanation"></textarea>
|
||||
</div>
|
||||
|
||||
|
||||
</form>
|
||||
<div class="history-div" *ngIf="IsUpdate">
|
||||
<h3><span class="material-icons"> history </span>Audit history</h3>
|
||||
<div class="audit-table">
|
||||
<div class="table-header">
|
||||
<div class="date-title"><span>Date & Time</span></div>
|
||||
<div class="action-title"><span>Action</span></div>
|
||||
</div>
|
||||
<div class="main-body-audit">
|
||||
<div class="table-body" *ngFor="let log of loglist">
|
||||
<div class="date-title">
|
||||
<span>{{ log.createdAt | date: "medium" }}</span>
|
||||
</div>
|
||||
<div class="action-title">
|
||||
<span [innerHTML]="log.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeModal()">Cancel</button>
|
||||
<div *ngIf="!IsUpdate">
|
||||
<button class="submit-btn" (click)="onSubmit()">Save</button>
|
||||
</div>
|
||||
<div *ngIf="IsUpdate">
|
||||
<button class="submit-btn" (click)="UpdateCatQue()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="cutome-modal" *ngIf="isBulkUpload">
|
||||
<div class="cutome-modal-content" style="width: 50%;">
|
||||
<div class="modal-header">
|
||||
<p>Bulk Upload</p>
|
||||
<span (click)="closeBulkUploadModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
|
||||
<div class="modal-body" style="min-height: 110px;">
|
||||
<div>
|
||||
<ngx-dropzone maxFileSize="100MB" accept=".csv" (change)="onSelect($event)">
|
||||
<ngx-dropzone-label>Drag & drop here (or) <span class="browse">Browse</span></ngx-dropzone-label>
|
||||
<div *ngFor="let f of files">
|
||||
<ngx-dropzone-label>{{ f.name }} </ngx-dropzone-label>
|
||||
</div>
|
||||
</ngx-dropzone>
|
||||
<div class="format" *ngIf="files.length<=0">
|
||||
<span>Allowed Format: CSV</span>
|
||||
</div>
|
||||
<div class="format" *ngFor="let f of files">
|
||||
<div class="bbulkupload">
|
||||
<span *ngFor="let t of f">{{ t.name }} </span>
|
||||
|
||||
<mat-icon (click)="onRemove(f)">close</mat-icon>
|
||||
</div>
|
||||
</div>
|
||||
<div class="format">
|
||||
<progress value={{progress}} max="10" id="progressBar" *ngIf="selectprogress"></progress>
|
||||
</div>
|
||||
<div class="format">
|
||||
<a (click)="ExportExcel()">
|
||||
<mat-icon>arrow_downward</mat-icon>
|
||||
Cat_sample.xlsx
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeBulkUploadModal()">Cancel</button>
|
||||
<button class="submit-btn" (click)="bulkUpload()" [disabled]="selectBulkupload">Upload</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,250 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
.formwrapper {
|
||||
display: block;
|
||||
div {
|
||||
width: 100%;
|
||||
input {
|
||||
width: calc(100% - 22px);
|
||||
padding: 10px;
|
||||
}
|
||||
}
|
||||
select {
|
||||
width: 100%;
|
||||
padding: 10px 30px 10px 10px;
|
||||
option {
|
||||
color: #000000;
|
||||
}
|
||||
}
|
||||
.select-box {
|
||||
span {
|
||||
right: 10px;
|
||||
}
|
||||
}
|
||||
ng-select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.w-50 {
|
||||
width: 50% !important;
|
||||
}
|
||||
.modal-header {
|
||||
.diff-score {
|
||||
font-size: 12px;
|
||||
position: absolute;
|
||||
right: 38px;
|
||||
.score {
|
||||
color: $popupText;
|
||||
position: unset;
|
||||
font-size: 12px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.search-wrap {
|
||||
button {
|
||||
// background: linear-gradient(47deg, rgba(238, 76, 126, 1) 0%, rgba(238, 130, 80, 1) 100%);
|
||||
// border: none;
|
||||
// padding: 13px 20px;
|
||||
// border-radius: 30px;
|
||||
// color: #fff;
|
||||
// letter-spacing: 0.5px;
|
||||
// cursor: pointer;
|
||||
// min-width: 125px;
|
||||
margin: 5px;
|
||||
// &:hover {
|
||||
// opacity: 0.9;
|
||||
// }
|
||||
}
|
||||
}
|
||||
|
||||
.Question {
|
||||
border: 1px solid $popupBorder;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
width: calc(100% - 20px) !important;
|
||||
label {
|
||||
margin: 0 0 10px 0;
|
||||
color: $PopupLabel;
|
||||
}
|
||||
textarea {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
width: 100%;
|
||||
color: $popupText;
|
||||
scrollbar-width: thin;
|
||||
// scrollbar-color: #343560 #090f2f;
|
||||
}
|
||||
}
|
||||
.cutome-modal {
|
||||
.cutome-modal-content {
|
||||
.modal-body {
|
||||
.avatar {
|
||||
text-align: center;
|
||||
|
||||
img {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
border-radius: 50%;
|
||||
}
|
||||
}
|
||||
|
||||
.email-name {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
flex-wrap: wrap;
|
||||
|
||||
.name {
|
||||
width: 49%;
|
||||
}
|
||||
}
|
||||
|
||||
.titles {
|
||||
display: flex;
|
||||
|
||||
span {
|
||||
width: 15%;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
p {
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
overflow: hidden;
|
||||
width: 85%;
|
||||
}
|
||||
}
|
||||
.format {
|
||||
margin-top: 10px;
|
||||
.bbulkupload {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #000000;
|
||||
span {
|
||||
color: #000000;
|
||||
}
|
||||
mat-icon {
|
||||
margin-left: 3px;
|
||||
}
|
||||
}
|
||||
span {
|
||||
color: #000000;
|
||||
}
|
||||
a {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: $Pink;
|
||||
cursor: pointer;
|
||||
width: 25px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::ng-deep tr.mat-header-row th {
|
||||
&:first-child {
|
||||
min-width: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
min-width: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
min-width: 110px;
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
min-width: 110px;
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
min-width: 110px;
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(6) {
|
||||
min-width: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
&:nth-child(7) {
|
||||
min-width: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(8) {
|
||||
min-width: 90px;
|
||||
width: 90px;
|
||||
}
|
||||
&:last-child {
|
||||
min-width: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
::ng-deep tr td.mat-cell {
|
||||
&:first-child {
|
||||
min-width: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
min-width: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
min-width: 110px;
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
min-width: 110px;
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
min-width: 110px;
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(6) {
|
||||
min-width: 100px;
|
||||
width: 100px;
|
||||
}
|
||||
&:nth-child(7) {
|
||||
min-width: 120px;
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(8) {
|
||||
min-width: 90px;
|
||||
width: 90px;
|
||||
}
|
||||
&:last-child {
|
||||
min-width: 50px;
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
::ng-deep .mat-paginator-container {
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
.mat-icon-button {
|
||||
background: $paginationBtnBg !important;
|
||||
border-radius: 5px !important;
|
||||
border: 1px solid $paginationBtnBorder !important;
|
||||
margin: 0 5px !important;
|
||||
cursor: pointer;
|
||||
color: $paginationBtnText !important;
|
||||
|
||||
&:hover {
|
||||
border: 1px solid $PaginationBtnHover !important;
|
||||
color: $PaginationBtnHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-paginator-page-size-label {
|
||||
color: $paginationText !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.mat-paginator-range-label {
|
||||
color: $Pink;
|
||||
width: 140px;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CateexamtestquestionComponent } from './cateexamtestquestion.component';
|
||||
|
||||
describe('CateexamtestquestionComponent', () => {
|
||||
let component: CateexamtestquestionComponent;
|
||||
let fixture: ComponentFixture<CateexamtestquestionComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CateexamtestquestionComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CateexamtestquestionComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,726 @@
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import Swal from 'sweetalert2/dist/sweetalert2.js'
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { FormBuilder, FormGroup, Validators, FormArray, FormControl } from '@angular/forms';
|
||||
import { CatexamService } from '../../services/catexam/catexam.service';
|
||||
import * as ClassicEditor from '@blowstack/ckeditor5-full-free-build';
|
||||
import * as XLSX from 'xlsx';
|
||||
import { ExcelService } from 'src/app/services/excelservices/excel.service';
|
||||
import { Location } from '@angular/common';
|
||||
@Component({
|
||||
selector: 'app-cateexamtestquestion',
|
||||
templateUrl: './cateexamtestquestion.component.html',
|
||||
styleUrls: ['./cateexamtestquestion.component.scss']
|
||||
})
|
||||
export class CateexamtestquestionComponent implements OnInit {
|
||||
displayedColumns: string[] = ['srno', 'certificate_name', "domin_name", 'subdomain_name', 'topic_name', 'ketexam_name', 'title', 'type', 'actions'];
|
||||
dataSource: MatTableDataSource<courselist>;
|
||||
Search: any;
|
||||
addCateExamQua: boolean = false;
|
||||
Domain = [];
|
||||
SubDomain = [];
|
||||
Topics = [];
|
||||
filterTopics = [];
|
||||
Certificates = [];
|
||||
filterDomain = [];
|
||||
filtersubDomain = [];
|
||||
CatExams = [];
|
||||
public PraacticeQueForm: FormGroup;
|
||||
Domainname: any;
|
||||
subdomainname: any;
|
||||
Topicname: any;
|
||||
title: any;
|
||||
option1: any;
|
||||
option2: any;
|
||||
option3: any;
|
||||
option4: any;
|
||||
CorrectAnswer: any;
|
||||
Type: any;
|
||||
test_id: any;
|
||||
Explanation: any;
|
||||
Id: any;
|
||||
IsUpdate: boolean = false;
|
||||
CertificateName: any;
|
||||
isBulkUpload: boolean = false;
|
||||
files: File[] = [];
|
||||
myEvent: any;
|
||||
progress: any = 0;
|
||||
selectBulkupload: boolean = false;
|
||||
selectprogress: boolean = false;
|
||||
@Input('pagination') pagination: boolean;
|
||||
@ViewChild(MatPaginator, { static: false }) set matPaginator(paginator: MatPaginator) {
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator = paginator;
|
||||
}
|
||||
}
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
loglist = [];
|
||||
public Editor = ClassicEditor;
|
||||
editFromExam: boolean = false;
|
||||
selecteds = [];
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
DifficultyScore: any;
|
||||
oldAuditValueArray = { "Certificate": "", "Domain": "", "Subdomain": "", "Topic": "", "Question": "", "Answer A": "", "Answer B": "", "Answer C": "", "Answer D": "", "Answer": "", "Explanation": "", "Exam Name": "", "Difficulty": "" }
|
||||
newAuditValueArray = { "Certificate": "", "Domain": "", "Subdomain": "", "Topic": "", "Question": "", "Answer A": "", "Answer B": "", "Answer C": "", "Answer D": "", "Answer": "", "Explanation": "", "Exam Name": "", "Difficulty": "" }
|
||||
auditHistory = "";
|
||||
constructor(private location: Location, private catTestService: CatexamService, public ActiveRoute: ActivatedRoute, public fb: FormBuilder, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService, private excelService: ExcelService) {
|
||||
var setlogin = this.auth.isLoggedIn();
|
||||
if (!setlogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
addNewCatExamQua() {
|
||||
this.Id = "";
|
||||
this.Domainname = "";
|
||||
this.subdomainname = "";
|
||||
this.test_id = "";
|
||||
this.Topicname = "";
|
||||
this.title = "";
|
||||
this.option1 = "";
|
||||
this.option2 = "";
|
||||
this.option3 = "";
|
||||
this.option4 = "";
|
||||
this.Type = "";
|
||||
this.Explanation = "";
|
||||
this.CorrectAnswer = "";
|
||||
this.CertificateName = "";
|
||||
this.addCateExamQua = true;
|
||||
this.IsUpdate = false;
|
||||
}
|
||||
closeModal() {
|
||||
this.addCateExamQua = false;
|
||||
this.IsUpdate = false;
|
||||
this.Id = "";
|
||||
this.Domainname = "";
|
||||
this.subdomainname = "";
|
||||
this.test_id = "";
|
||||
this.selecteds = [];
|
||||
this.Topicname = "";
|
||||
this.title = "";
|
||||
this.option1 = "";
|
||||
this.option2 = "";
|
||||
this.option3 = "";
|
||||
this.option4 = "";
|
||||
this.Type = "";
|
||||
this.Explanation = "";
|
||||
this.CorrectAnswer = "";
|
||||
this.DifficultyScore = "";
|
||||
this.oldAuditValueArray = { "Certificate": "", "Domain": "", "Subdomain": "", "Topic": "", "Question": "", "Answer A": "", "Answer B": "", "Answer C": "", "Answer D": "", "Answer": "", "Explanation": "", "Exam Name": "", "Difficulty": "" }
|
||||
this.newAuditValueArray = { "Certificate": "", "Domain": "", "Subdomain": "", "Topic": "", "Question": "", "Answer A": "", "Answer B": "", "Answer C": "", "Answer D": "", "Answer": "", "Explanation": "", "Exam Name": "", "Difficulty": "" }
|
||||
this.auditHistory = "";
|
||||
}
|
||||
async ngOnInit() {
|
||||
this.PraacticeQueForm = this.fb.group({
|
||||
CertificateName: ['', Validators.required],
|
||||
test_id: new FormControl(),
|
||||
catexamsid: ['', Validators.required],
|
||||
Domainname: ['', Validators.required],
|
||||
subdomainname: ['', Validators.required],
|
||||
Topicname: ['', Validators.required],
|
||||
title: ['', Validators.required],
|
||||
option1: ['', Validators.required],
|
||||
option2: ['', Validators.required],
|
||||
option3: ['', Validators.required],
|
||||
option4: ['', Validators.required],
|
||||
CorrectAnswer: ['', Validators.required],
|
||||
Type: ['', Validators.required],
|
||||
Explanation: ['', Validators.required],
|
||||
});
|
||||
await this.spinner.show();
|
||||
try {
|
||||
await this.GetAllDropdown();
|
||||
await this.getAllCatExam();
|
||||
await this.getAllCatQuestions();
|
||||
await this.spinner.hide();
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(e.message);
|
||||
}
|
||||
}
|
||||
async delete(item) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You want to delete!",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete'
|
||||
}).then(async (result) => {
|
||||
if (result.value) {
|
||||
await this.spinner.show();
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.catTestService.DeletecateexamQuestion(item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + item.title + "</span> Cat Question is deleted by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "cateexamquestion", this.Id, token);
|
||||
await this.getAllCatQuestions();
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
list.message,
|
||||
'CAT Question has been deleted.',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(e.message);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
async getAllCatQuestions() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
const users: courselist[] = [];
|
||||
var token = ''
|
||||
await this.catTestService.ListcateexamQuestion(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
"srno": srno,
|
||||
"id": element.id,
|
||||
"test_id": element.test_id,
|
||||
"exam_id": element.exam_id ? element.exam_id : [],
|
||||
"title": element.title,
|
||||
"first_choice": element.first_choice,
|
||||
"second_choice": element.second_choice,
|
||||
"third_choice": element.third_choice,
|
||||
"fourth_choice": element.fourth_choice,
|
||||
"answer": element.answer,
|
||||
"type": element.type,
|
||||
"d_id": element.d_id,
|
||||
"sd_id": element.sd_id,
|
||||
"topic_id": element.topic_id,
|
||||
"ref_link": element.ref_link,
|
||||
"youtube_link": element.youtube_link,
|
||||
"bookpage_no": element.bookpage_no,
|
||||
"blog_url": element.blog_url,
|
||||
"createdAt": element.createdAt,
|
||||
"updatedAt": element.updatedAt,
|
||||
"domin_name": element.domain.domin_name,
|
||||
"subdomain_name": element.subdomain.subdomain_name,
|
||||
"topic_name": element.topic.topic_name,
|
||||
"ketexam_name": element.ketexamtest.ketexam_name,
|
||||
"description": element.description,
|
||||
"certi_id": element.certi_id,
|
||||
"certificate_name": element.certificate.certificate_name
|
||||
})
|
||||
});
|
||||
this.ActiveRoute.params.subscribe(async (params) => {
|
||||
try {
|
||||
var data = JSON.parse(atob(params['id']));
|
||||
let edited = users.filter(x => x.id == data)
|
||||
this.editFromExam = true;
|
||||
this.edit(edited[0])
|
||||
} catch (error) {
|
||||
}
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.sort = this.sort;
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.filter();
|
||||
this.pagination = true;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
async edit(item) {
|
||||
this.CertificateName = item.certi_id;
|
||||
this.addCateExamQua = true;
|
||||
this.IsUpdate = true;
|
||||
this.Id = item.id;
|
||||
this.Domainname = item.d_id;
|
||||
this.subdomainname = item.sd_id;
|
||||
this.test_id = item.test_id
|
||||
this.selecteds = item.exam_id.map(Number);
|
||||
this.Topicname = item.topic_id;
|
||||
this.title = item.title;
|
||||
this.option1 = item.first_choice;
|
||||
this.option2 = item.second_choice;
|
||||
this.option3 = item.third_choice;
|
||||
this.option4 = item.fourth_choice;
|
||||
this.Type = item.type;
|
||||
//DifficultyScore
|
||||
item.type == 'VERY SIMPLE' ? this.DifficultyScore = "1" :
|
||||
item.type == 'SIMPLE' ? this.DifficultyScore = "1.5" :
|
||||
item.type == 'AVERAGE' ? this.DifficultyScore = "2" :
|
||||
item.type == 'ABOVE AVERAGE' ? this.DifficultyScore = "2.5" :
|
||||
item.type == 'HARD' ? this.DifficultyScore = "3" :
|
||||
item.type == 'DIFFICULT' ? this.DifficultyScore = "3.5" :
|
||||
item.type == 'TRICKY' ? this.DifficultyScore = "4" : "0";
|
||||
this.Explanation = item.description;
|
||||
this.CorrectAnswer = item.answer;
|
||||
this.loglist = [];
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
this.service.get_logs("cateexamquestion", item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
this.loglist = list.data;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
})
|
||||
this.Domain = this.filterDomain.filter(x => x.certi_id == this.CertificateName);
|
||||
this.SubDomain = this.filtersubDomain.filter(x => x.d_id == this.Domainname);
|
||||
this.Topics = this.filterTopics.filter(x => x.sd_id == this.subdomainname)
|
||||
this.oldAuditValueArray = { "Certificate": this.Certificates.find(x => x.id == this.CertificateName) ? this.Certificates.find(x => x.id == this.CertificateName).certificate_name : '', "Domain": this.filterDomain.find(x => x.id == this.Domainname) ? this.filterDomain.find(x => x.id == this.Domainname).domin_name : '', "Subdomain": this.filtersubDomain.find(x => x.id == this.subdomainname) ? this.filtersubDomain.find(x => x.id == this.subdomainname).subdomain_name : '', "Topic": this.Topics.find(x => x.id == this.Topicname) ? this.Topics.find(x => x.id == this.Topicname).topic_name : '', "Question": this.title, "Answer A": this.option1, "Answer B": this.option2, "Answer C": this.option3, "Answer D": this.option4, "Answer": this.CorrectAnswer == 1 ? "Answer A" : (this.CorrectAnswer == 2 ? "Answer B" : (this.CorrectAnswer == 3 ? "Answer C" : (this.CorrectAnswer == 4 ? "Answer D" : ""))), "Explanation": this.Explanation, "Exam Name": this.CatExams.filter((item) => { return this.selecteds.includes(item.id) }).map(function (elem) { return elem.ketexam_name; }).join(","), "Difficulty": this.Type }
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator._changePageSize(this.dataSource.paginator.pageSize);
|
||||
}
|
||||
}
|
||||
async GetAllDropdown() {
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.service.GetAllDropdown(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Domain = list.data.Domain;
|
||||
this.filterDomain = list.data.Domain;
|
||||
this.SubDomain = list.data.SubDomain;
|
||||
this.Topics = list.data.Topic;
|
||||
this.filterTopics = list.data.Topic;
|
||||
this.filtersubDomain = list.data.SubDomain;
|
||||
this.Certificates = list.data.Certificate;
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
async certificatechange(ev) {
|
||||
const val = ev.target.value;
|
||||
if (val && val.trim() != '') {
|
||||
this.Domain = this.filterDomain.filter((itemset) => {
|
||||
return (
|
||||
itemset.certi_id == val
|
||||
);
|
||||
})
|
||||
this.subdomainname = "";
|
||||
this.Topicname = '';
|
||||
}
|
||||
else {
|
||||
this.Domainname = "";
|
||||
this.subdomainname = "";
|
||||
this.Topicname = '';
|
||||
this.Domain = this.filterDomain;
|
||||
}
|
||||
}
|
||||
async domainchange(ev) {
|
||||
const val = ev.target.value;
|
||||
if (val && val.trim() != '') {
|
||||
this.SubDomain = this.filtersubDomain.filter((itemset) => {
|
||||
return (
|
||||
itemset.d_id == val
|
||||
);
|
||||
})
|
||||
this.subdomainname = "";
|
||||
this.Topicname = '';
|
||||
}
|
||||
else {
|
||||
this.Domainname = "";
|
||||
this.subdomainname = "";
|
||||
this.Topicname = '';
|
||||
this.SubDomain = this.filtersubDomain;
|
||||
}
|
||||
}
|
||||
async SubDomainchange(ev) {
|
||||
const val = ev.target.value;
|
||||
if (val && val.trim() != '') {
|
||||
this.Topics = this.filterTopics.filter((itemset) => {
|
||||
return (
|
||||
itemset.sd_id == val
|
||||
);
|
||||
});
|
||||
this.Topicname = '';
|
||||
} else {
|
||||
this.Topicname = '';
|
||||
this.Topics = this.filterTopics;
|
||||
}
|
||||
}
|
||||
async getAllCatExam() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.catTestService.ListCateExamTest(token).then(async (data) => {
|
||||
this.CatExams = [];
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.CatExams = list.data;
|
||||
this.test_id = "";
|
||||
this.selecteds = [];
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
markFormTouched(group: FormGroup | FormArray) {
|
||||
Object.keys(group.controls).forEach((key: string) => {
|
||||
const control = group.controls[key];
|
||||
if (control instanceof FormGroup || control instanceof FormArray) { control.markAsTouched(); this.markFormTouched(control); }
|
||||
else { control.markAsTouched(); };
|
||||
});
|
||||
};
|
||||
async onSubmit() {
|
||||
this.markFormTouched(this.PraacticeQueForm);
|
||||
if (this.PraacticeQueForm.valid) {
|
||||
await this.spinner.show();
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.catTestService.AddcateexamQuestion(this.CertificateName, this.selecteds.toString(), this.selecteds.toString(), this.title, this.option1, this.option2, this.option3, this.option4, this.CorrectAnswer, this.Type, this.Domainname, this.subdomainname, this.Topicname, token, "0", this.Explanation).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.getAllCatQuestions();
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + this.title + "</span> Cat Question is added by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "cateexamquestion", list.data.id, token);
|
||||
this.closeModal();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess(list.message);
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
async UpdateCatQue() {
|
||||
this.markFormTouched(this.PraacticeQueForm);
|
||||
if (this.PraacticeQueForm.valid) {
|
||||
await this.spinner.show();
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.catTestService.UpdatecateexamQuestion(this.CertificateName, this.test_id, this.selecteds.toString(), this.title, this.option1, this.option2, this.option3, this.option4, this.CorrectAnswer, this.Type, this.Domainname, this.subdomainname, this.Topicname, this.Id, token, "0", this.Explanation).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
this.newAuditValueArray = { "Certificate": this.Certificates.find(x => x.id == this.CertificateName) ? this.Certificates.find(x => x.id == this.CertificateName).certificate_name : '', "Domain": this.filterDomain.find(x => x.id == this.Domainname) ? this.filterDomain.find(x => x.id == this.Domainname).domin_name : '', "Subdomain": this.filtersubDomain.find(x => x.id == this.subdomainname) ? this.filtersubDomain.find(x => x.id == this.subdomainname).subdomain_name : '', "Topic": this.Topics.find(x => x.id == this.Topicname) ? this.Topics.find(x => x.id == this.Topicname).topic_name : '', "Question": this.title, "Answer A": this.option1, "Answer B": this.option2, "Answer C": this.option3, "Answer D": this.option4, "Answer": this.CorrectAnswer == 1 ? "Answer A" : (this.CorrectAnswer == 2 ? "Answer B" : (this.CorrectAnswer == 3 ? "Answer C" : (this.CorrectAnswer == 4 ? "Answer D" : ""))), "Explanation": this.Explanation, "Exam Name": this.CatExams.filter((item) => { return this.selecteds.includes(item.id) }).map(function (elem) { return elem.ketexam_name; }).join(","), "Difficulty": this.Type };
|
||||
var audit = this.auth.compareAuditHist(this.oldAuditValueArray, this.newAuditValueArray);
|
||||
var desc = audit;
|
||||
await this.service.addAdminLogs(desc, "cateexamquestion", this.Id, token);
|
||||
await this.getAllCatQuestions();
|
||||
this.closeModal();
|
||||
await this.spinner.hide();
|
||||
this.service.ShowSuccess("Question update successfully");
|
||||
if (this.editFromExam == true) {
|
||||
this.editFromExam = false;
|
||||
await this.spinner.hide();
|
||||
this.location.back();
|
||||
} else {
|
||||
await this.getAllCatQuestions();
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (e) {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(e.message);
|
||||
}
|
||||
}
|
||||
}
|
||||
async bulkCheckDKIM(data) {
|
||||
let response = 0;
|
||||
data.forEach(async (element) => {
|
||||
let domain = element.email.split("@")[1];
|
||||
await this.auth.verifyDKIM(domain).then(async (result) => {
|
||||
if (result[0].StatusCode == 1) {
|
||||
response = 1;
|
||||
}
|
||||
})
|
||||
});
|
||||
return response;
|
||||
}
|
||||
async openBulkUploadModal() {
|
||||
this.isBulkUpload = true;
|
||||
}
|
||||
async closeBulkUploadModal() {
|
||||
this.isBulkUpload = false;
|
||||
this.progress = 0;
|
||||
this.selectBulkupload = true;
|
||||
this.selectprogress = false;
|
||||
this.files = [];
|
||||
this.myEvent = "";
|
||||
}
|
||||
async bulkUpload() {
|
||||
let workBook = null;
|
||||
let jsonData = null;
|
||||
const reader = new FileReader();
|
||||
const file = this.myEvent.addedFiles[0];
|
||||
reader.onload = async (event) => {
|
||||
const data = reader.result;
|
||||
workBook = XLSX.read(data, { type: 'binary' });
|
||||
jsonData = workBook.SheetNames.reduce((initial, name) => {
|
||||
const sheet = workBook.Sheets[name];
|
||||
initial[name] = XLSX.utils.sheet_to_json(sheet);
|
||||
return initial;
|
||||
}, {});
|
||||
const dataString = (jsonData);
|
||||
this.spinner.show();
|
||||
if (await this.bulkCheckDKIM(dataString.Sheet1) == 0) {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.service.bulkuploded(dataString.Sheet1, "User", token).then(data => {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
if (data[0].status == 200) {
|
||||
this.service.ShowSuccess(list.data.length + " Students added successfully");
|
||||
this.closeBulkUploadModal();
|
||||
this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
this.service.ShowError(list.message)
|
||||
this.spinner.hide();
|
||||
}
|
||||
}, error => {
|
||||
console.log(error);
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
});
|
||||
} else {
|
||||
this.service.ShowError("Invalid domain found in email")
|
||||
}
|
||||
}
|
||||
reader.readAsBinaryString(file);
|
||||
}
|
||||
onRemove(event) {
|
||||
this.files.splice(this.files.indexOf(event), 1);
|
||||
this.selectBulkupload = true;
|
||||
this.selectprogress = false;
|
||||
}
|
||||
onSelect(event) {
|
||||
let me = this;
|
||||
var timeleft = 10;
|
||||
me.progress = 0;
|
||||
me.selectprogress = true;
|
||||
me.selectBulkupload = true;
|
||||
this.files.push(event.addedFiles);
|
||||
var downloadTimer = setInterval(function () {
|
||||
if (timeleft <= 0) {
|
||||
me.progress = 10 - timeleft;
|
||||
me.myEvent = event
|
||||
me.selectBulkupload = false;
|
||||
me.selectprogress = false;
|
||||
clearInterval(downloadTimer);
|
||||
}
|
||||
me.progress = 10 - timeleft;
|
||||
timeleft -= 1;
|
||||
}, 200);
|
||||
}
|
||||
ExportExcel() {
|
||||
var certification = Object.assign(this.Certificates.map(k => ({ name: k.certificate_name })));
|
||||
var domain = Object.assign(this.Domain.map(k => ({ name: k.domin_name })));
|
||||
var subdomain = Object.assign(this.SubDomain.map(k => ({ name: k.subdomain_name })));
|
||||
var topic = Object.assign(this.Topics.map(k => ({ name: k.topic_name })));
|
||||
var Exam = Object.assign(this.CatExams.map(k => ({ name: k.ketexam_name })));
|
||||
var Correct = [{ workSheet: "Correct", rows: [{ name: "1" }, { name: "2" }, { name: "3" }, { name: "4" }], properties: { state: 'hidden' } }]
|
||||
var Type = [{ workSheet: "Type", rows: [{ name: "VERY SIMPLE" }, { name: "SIMPLE" }, { name: "AVERAGE" }, { name: "ABOVE AVERAGE" }, { name: "HARD" }, { name: "DIFFICULT" }, , { name: "TRICKY" }], properties: { state: 'hidden' } }]
|
||||
var certificationData = [
|
||||
{
|
||||
workSheet: "certification",
|
||||
rows: certification,
|
||||
properties:
|
||||
{ state: 'hidden' }
|
||||
}
|
||||
];
|
||||
var domainData = [
|
||||
{
|
||||
workSheet: "domain",
|
||||
rows: domain,
|
||||
properties:
|
||||
{ state: 'hidden' }
|
||||
}
|
||||
];
|
||||
var subdomainData = [
|
||||
{
|
||||
workSheet: "subdomain",
|
||||
rows: subdomain,
|
||||
properties:
|
||||
{ state: 'hidden' }
|
||||
}
|
||||
];
|
||||
var topicData = [
|
||||
{
|
||||
workSheet: "topic",
|
||||
rows: topic,
|
||||
properties:
|
||||
{ state: 'hidden' }
|
||||
}
|
||||
];
|
||||
var ExamData = [
|
||||
{
|
||||
workSheet: "Exam",
|
||||
rows: Exam,
|
||||
properties:
|
||||
{ state: 'hidden' }
|
||||
}
|
||||
];
|
||||
var Cat_sample = [
|
||||
{
|
||||
name: "Cat_sample",
|
||||
values: [{ header: "certification", value: [{ name: "certification!$A$2:$A$" + (certification.length + 1) }] },
|
||||
{ header: "domain", value: [{ name: "domain!$A$2:$A$" + (domain.length + 1) }] },
|
||||
{ header: "subdomain", value: [{ name: "subdomain!$A$2:$A$" + (subdomain.length + 1) }] },
|
||||
{ header: "topic", value: [{ name: "topic!$A$2:$A$" + (topic.length + 1) }] },
|
||||
{ header: "Exam", value: [{ name: "Exam!$A$2:$A$" + (Exam.length + 1) }] },
|
||||
{ header: "question", value: "" },
|
||||
{ header: "answer_a", value: "" },
|
||||
{ header: "answer_b", value: "" },
|
||||
{ header: "answer_c", value: "" },
|
||||
{ header: "answer_d", value: "" },
|
||||
{ header: "correct_answer", value: [{ name: "Correct!$A$2:$A$5" }] },
|
||||
{ header: "difficult_type", value: [{ name: "Type!$A$2:$A$8" }] },
|
||||
{ header: "explanation", value: "" }
|
||||
],
|
||||
properties: { state: "visible" }
|
||||
}
|
||||
];
|
||||
var workbookData = [this.transform(Cat_sample)[0], certificationData[0], domainData[0], subdomainData[0], topicData[0], ExamData[0], Correct[0], Type[0]]
|
||||
this.excelService.exportAsExcelFile(workbookData, Cat_sample[0].name);
|
||||
}
|
||||
transform(data) {
|
||||
const noOfRowaToGenerate = 5;
|
||||
return data.map(({ name, values, properties }) => {
|
||||
const headers = values.reduce((prev, next) =>
|
||||
({
|
||||
...prev, [next.header]: Array.isArray
|
||||
(next.value) ? next.value.map(({ name }) => name) : next.value
|
||||
}), {})
|
||||
return {
|
||||
workSheet: name,
|
||||
rows: Array(noOfRowaToGenerate).fill(headers),
|
||||
properties: properties
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
export interface courselist {
|
||||
srno: number;
|
||||
id: string;
|
||||
test_id: string;
|
||||
exam_id: string;
|
||||
title: string;
|
||||
first_choice: string;
|
||||
second_choice: string;
|
||||
third_choice: string;
|
||||
fourth_choice: string;
|
||||
answer: string;
|
||||
type: string;
|
||||
d_id: string;
|
||||
sd_id: string;
|
||||
topic_id: string;
|
||||
ref_link: string;
|
||||
youtube_link: string;
|
||||
bookpage_no: string;
|
||||
blog_url: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
domin_name: string;
|
||||
subdomain_name: string;
|
||||
topic_name: string;
|
||||
ketexam_name: string;
|
||||
description: string;
|
||||
certi_id: string;
|
||||
certificate_name: string;
|
||||
}
|
||||
@ -0,0 +1,317 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3 (click)="s3Upload()">Certifications</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Certification Name" [(ngModel)]="Search" autocomplete="off"
|
||||
(keyup)="filter()" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
<button (click)="openPopup()">Add Certification</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="srno">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> <span>#</span> </th>
|
||||
<td mat-cell *matCellDef="let element"><span>{{ element.srno }}</span></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="certificate_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>
|
||||
<span>Certification Name</span>
|
||||
</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.certificate_name }}">{{ element.certificate_name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let row">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="edit(row)" alt="Edit" class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="delete(row)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<mat-paginator style-paginator showFirstLastButtons [showTotalPages]="3" *ngIf="pagination"
|
||||
[length]="dataSource.data ? dataSource.data.length : 0" [pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
<div class="cutome-modal" *ngIf="addNew">
|
||||
<div class="cutome-modal-content">
|
||||
<div class="modal-header">
|
||||
<p *ngIf="!EditHideen">Add Certification</p>
|
||||
<p *ngIf="EditHideen">Edit Certification</p>
|
||||
<span (click)="closeModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<form class="example-form" [formGroup]="CourseForm">
|
||||
<div class="formwrapper">
|
||||
<div>
|
||||
<input [(ngModel)]="CertificateName" formControlName="CertificateName"
|
||||
placeholder="Certification Name" required [ngClass]="{
|
||||
err:
|
||||
CourseForm.controls['CertificateName'].hasError('required') &&
|
||||
(CourseForm.controls['CertificateName'].dirty ||
|
||||
CourseForm.controls['CertificateName'].touched)
|
||||
}" />
|
||||
</div>
|
||||
<div>
|
||||
<!-- <label>Short Name</label> -->
|
||||
<input [(ngModel)]="CourseShort" formControlName="CourseShort" placeholder="Short Name"
|
||||
type="text" required [ngClass]="{
|
||||
err:
|
||||
CourseForm.controls['CourseShort'].hasError('required') &&
|
||||
(CourseForm.controls['CourseShort'].dirty ||
|
||||
CourseForm.controls['CourseShort'].touched)
|
||||
}" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="formwrapper">
|
||||
<!-- domain code start -->
|
||||
<label>Material Sequence</label>
|
||||
<div class="add-new-event w-100" *ngIf="EditHideen">
|
||||
<div class="course-input">
|
||||
<div cdkDropList (cdkDropListDropped)="drop($event)">
|
||||
<div cdkDrag *ngFor="let item of Domains; let i = index">
|
||||
<div id="select" class="all-domain" style="
|
||||
border: 1px solid #000000;
|
||||
padding: 5px 10px;
|
||||
border-radius: 5px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
cursor: move;
|
||||
">
|
||||
<div style="display: flex; width: 100%">
|
||||
<div style="width: 90%; display: flex; align-items: center">
|
||||
<div style="line-height: 0; margin-right: 10px">
|
||||
<img src="../../../assets/images/sidebar.JPG" alt=""
|
||||
style="width: 13px; line-height: 0" />
|
||||
</div>
|
||||
<div class="domain-name" style="
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
">
|
||||
<span style="color: #000000; width: 100%">
|
||||
<label for="Domain" style="margin: 0;">Material {{
|
||||
item.domin_name
|
||||
}}</label>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div style="
|
||||
width: 10%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: flex-end;
|
||||
">
|
||||
<span (click)="moveup(i)" style="
|
||||
background: #fff;
|
||||
border: 1px solid #DF166A;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 4px;
|
||||
margin-left: 4px;
|
||||
">
|
||||
<mat-icon style="
|
||||
font-size: 20px;
|
||||
color: #DF166A;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">
|
||||
arrow_upward</mat-icon>
|
||||
</span>
|
||||
<span (click)="movedown(i)" style="
|
||||
background: #fff;
|
||||
border: 1px solid #DF166A;
|
||||
width: 25px;
|
||||
height: 25px;
|
||||
border-radius: 4px;
|
||||
margin-left: 4px;
|
||||
">
|
||||
<mat-icon style="
|
||||
font-size: 20px;
|
||||
color: #DF166A;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
">arrow_downward</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- domain code end -->
|
||||
</div>
|
||||
<!-- <div class="formwrapper">
|
||||
<label>Live Class</label>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="live_course_thumbnail"
|
||||
formControlName="live_course_thumbnail" placeholder="Course thumbnail" />
|
||||
<span>
|
||||
<label for="live_course_thumbnail" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="live_course_thumbnail"
|
||||
(change)="handleFileSelect($event)" />
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="live_welcome_thumbnail"
|
||||
formControlName="live_welcome_thumbnail" placeholder="Course welcome video thumbnail" />
|
||||
<span>
|
||||
<label for="live_welcome_thumbnail" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="live_welcome_thumbnail"
|
||||
(change)="handleFileSelect($event)">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="live_welcome_video" formControlName="live_welcome_video"
|
||||
placeholder="Course welcome video" />
|
||||
<span>
|
||||
<label for="live_welcome_video" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="live_welcome_video"
|
||||
(change)="handleFileSelect($event)">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="formwrapper">
|
||||
<!-- <label>Self-paced Class</label> -->
|
||||
<label>Class</label>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="self_course_thumbnail"
|
||||
formControlName="self_course_thumbnail" placeholder="Course thumbnail" />
|
||||
<span>
|
||||
<label for="self_course_thumbnail" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="self_course_thumbnail"
|
||||
(change)="handleFileSelect($event)">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="self_welcome_thumbnail"
|
||||
formControlName="self_welcome_thumbnail" placeholder="Course welcome video thumbnail" />
|
||||
<span>
|
||||
<label for="self_welcome_thumbnail" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="self_welcome_thumbnail"
|
||||
(change)="handleFileSelect($event)">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="self_welcome_video" formControlName="self_welcome_video"
|
||||
placeholder="Course welcome video" />
|
||||
<span>
|
||||
<label for="self_welcome_video" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="self_welcome_video"
|
||||
(change)="handleFileSelect($event)">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="formwrapper">
|
||||
<label>Hybrid Class</label>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="hybrid_course_thumbnail"
|
||||
formControlName="hybrid_course_thumbnail" placeholder="Course thumbnail" />
|
||||
<span>
|
||||
<label for="hybrid_course_thumbnail" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="hybrid_course_thumbnail">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="hybrid_welcome_thumbnail"
|
||||
formControlName="hybrid_welcome_thumbnail"
|
||||
placeholder="Course welcome video thumbnail" />
|
||||
<span>
|
||||
<label for="hybrid_welcome_thumbnail" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="hybrid_welcome_thumbnail">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
<div class="d-flex2">
|
||||
<input type="text" [(ngModel)]="hybrid_welcome_video" formControlName="hybrid_welcome_video"
|
||||
placeholder="Course welcome video" />
|
||||
<span>
|
||||
<label for="hybrid_welcome_video" class="upload-label">
|
||||
<mat-icon class="upload">upload</mat-icon>Select File
|
||||
</label>
|
||||
<input type="file" class="file" id="hybrid_welcome_video">
|
||||
<mat-icon class="link">link</mat-icon>
|
||||
</span>
|
||||
</div>
|
||||
</div> -->
|
||||
</form>
|
||||
</div>
|
||||
<div class="history-div" *ngIf="EditHideen">
|
||||
<h3><span class="material-icons"> history </span>Audit history</h3>
|
||||
<div class="audit-table">
|
||||
<div class="table-header">
|
||||
<div class="date-title"><span>Date & Time</span></div>
|
||||
<div class="action-title"><span>Action</span></div>
|
||||
</div>
|
||||
<div class="main-body-audit">
|
||||
<div class="table-body" *ngFor="let log of loglist">
|
||||
<div class="date-title"><span>{{log.createdAt | date:'medium'}}</span></div>
|
||||
<div class="action-title">
|
||||
<span [innerHTML]="log.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeModal()">Cancel</button>
|
||||
<div *ngIf="!EditHideen">
|
||||
<button class="submit-btn" (click)="onSubmit()">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
<div *ngIf="EditHideen">
|
||||
<button class="submit-btn" (click)="UpdateCertificate()">
|
||||
Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,138 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
.search-wrap {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
align-items: center;
|
||||
}
|
||||
.mat-button.mat-primary {
|
||||
background-color: #3f51b5 !important;
|
||||
color: #fff;
|
||||
margin-left: 15px;
|
||||
}
|
||||
|
||||
.inputsearch {
|
||||
min-width: 200px;
|
||||
}
|
||||
mat-icon {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
th.mat-sort-header-sorted {
|
||||
color: black;
|
||||
}
|
||||
tr.mat-header-row th:first-child {
|
||||
width: 15px !important;
|
||||
}
|
||||
|
||||
tr.mat-header-row th:last-child {
|
||||
width: 60px !important;
|
||||
}
|
||||
|
||||
.formwrapper {
|
||||
label {
|
||||
color: $PopupLabel;
|
||||
}
|
||||
.w-100 {
|
||||
width: 100%;
|
||||
}
|
||||
.d-flex2 {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
position: relative;
|
||||
width: 100%;
|
||||
input {
|
||||
padding-right: 165px;
|
||||
// border-color: #595690;
|
||||
}
|
||||
span {
|
||||
position: absolute;
|
||||
display: flex;
|
||||
right: 10px;
|
||||
color: $Black;
|
||||
line-height: 1;
|
||||
padding-left: 8px;
|
||||
.upload-label {
|
||||
background: #fafafa;
|
||||
border: solid 1px #DF166A;
|
||||
border-radius: 5px;
|
||||
color: #DF166A;
|
||||
padding: 3px 10px 3px 3px;
|
||||
margin: 0px 10px 0px 0px;
|
||||
cursor: pointer;
|
||||
.upload {
|
||||
height: 15px;
|
||||
width: 15px;
|
||||
font-size: 12px;
|
||||
margin: 0 5px;
|
||||
}
|
||||
}
|
||||
.link {
|
||||
border-left: solid 1px #DF166A;
|
||||
padding-left: 7px;
|
||||
color: #DF166A;
|
||||
}
|
||||
.file {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
> div {
|
||||
.select-box {
|
||||
span {
|
||||
right: 20px;
|
||||
}
|
||||
}
|
||||
select {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.Question {
|
||||
border: 1px solid #595690;
|
||||
border-radius: 4px;
|
||||
padding: 10px;
|
||||
width: calc(100% - 20px) !important;
|
||||
label {
|
||||
margin: 0 0 10px 0;
|
||||
color: #d7779b;
|
||||
}
|
||||
textarea {
|
||||
border: none;
|
||||
border-radius: 0;
|
||||
padding: 0;
|
||||
background: none;
|
||||
width: 100%;
|
||||
color: #a099da;
|
||||
}
|
||||
}
|
||||
::ng-deep .mat-paginator-container {
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
.mat-icon-button {
|
||||
background: $paginationBtnBg !important;
|
||||
border-radius: 5px !important;
|
||||
border: 1px solid $paginationBtnBorder !important;
|
||||
margin: 0 5px !important;
|
||||
cursor: pointer;
|
||||
color: $paginationBtnText !important;
|
||||
|
||||
&:hover {
|
||||
border: 1px solid $PaginationBtnHover !important;
|
||||
color: $PaginationBtnHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-paginator-page-size-label {
|
||||
color: $paginationText !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.mat-paginator-range-label {
|
||||
color: $Pink;
|
||||
width: 140px;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { CertificateComponent } from './certificate.component';
|
||||
|
||||
describe('CertificateComponent', () => {
|
||||
let component: CertificateComponent;
|
||||
let fixture: ComponentFixture<CertificateComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ CertificateComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CertificateComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1,240 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Clients</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<div class="search-icon">
|
||||
<input placeholder="Search by Name, Email Company" [(ngModel)]="Search" autocomplete="off"
|
||||
(keyup)="filter()" name="search" />
|
||||
<span class="material-icons">search</span>
|
||||
</div>
|
||||
<button (click)="addNewClient()">Add Client</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" (matSortChange)="sortData($event)" matSort
|
||||
style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="SrNo">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let element"><span>{{ element.SrNo }}</span></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="chortname">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Live Class</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.chortname ? element.chortname : '-' }}">{{ element.chortname ?
|
||||
element.chortname : "-" }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Name</th>
|
||||
<td mat-cell *matCellDef="let element"><span title="{{ element.name }}">{{ element.name }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="email">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Email</th>
|
||||
<td mat-cell *matCellDef="let element"><span title="{{ element.email }}">{{ element.email }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="mobile">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Phone</th>
|
||||
<td mat-cell *matCellDef="let element"><span title="{{ element.mobile }}">{{ element.mobile
|
||||
}}</span></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="company_name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Company</th>
|
||||
<td mat-cell *matCellDef="let element"><span title="{{ element.company_name }}">{{
|
||||
element.company_name }}</span></td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="add_update_cohort">
|
||||
<th mat-header-cell *matHeaderCellDef>Add / Update Live Class</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<mat-icon (click)="ShowPop(element)">add_circle_outline</mat-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef>Actions</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<img src="../../../assets/images/edit-1.png" (click)="edit(element)" alt="Edit"
|
||||
class="action-icon">
|
||||
<img src="../../../assets/images/remove.png" (click)="delete(element)" alt="Delete"
|
||||
class="action-icon">
|
||||
</td>
|
||||
</ng-container>
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="page-footer">
|
||||
<mat-paginator style-paginator (page)="pageEvents($event)" showFirstLastButtons [showTotalPages]="3"
|
||||
*ngIf="pagination" [length]="dataSource.data ? dataSource.data.length : 0" [pageSize]="10"
|
||||
[pageSizeOptions]="[10, 20, 50, 100, 500]">
|
||||
</mat-paginator>
|
||||
</div>
|
||||
<div class="cutome-modal" *ngIf="PopUpshow">
|
||||
<div class="cutome-modal-content">
|
||||
<div class="cutome-container">
|
||||
<div class="modal-header">
|
||||
<p>Add / Update Live Class</p>
|
||||
<span class="material-icons close-right" (click)="PopUpshow = false">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="cohortwrap" *ngFor="let item of listCohortData">
|
||||
<div class="cohortname">
|
||||
{{ item.cohort_name }}
|
||||
</div>
|
||||
<div class="cohortchk">
|
||||
<input type="checkbox" (change)="checkchange($event, item)" [checked]="item.checked" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<div class="check-reset">
|
||||
<button type="button" class="submit-btn" (click)="checkall(true)">
|
||||
Check All
|
||||
</button>
|
||||
<button type="button" class="submit-btn" (click)="checkall(false)">
|
||||
Reset All
|
||||
</button>
|
||||
</div>
|
||||
<div class="cancel-send">
|
||||
<button type="button" class="submit-btn" (click)="PopUpshow = false">
|
||||
Cancel
|
||||
</button>
|
||||
<button class="mr-0" type="button" class="submit-btn" (click)="submit()">
|
||||
Submit
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
<div class="cutome-modal" *ngIf="addClient">
|
||||
<div class="cutome-modal-content">
|
||||
<div class="modal-header">
|
||||
<p *ngIf="!IsUpdate">Add Client</p>
|
||||
<p *ngIf="IsUpdate">Edit Client</p>
|
||||
|
||||
<span (click)="closeModal()" class="material-icons">close</span>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div>
|
||||
<form class="example-form" [formGroup]="LoginForm">
|
||||
<div class="formwrapper">
|
||||
<div>
|
||||
<div class="select-box">
|
||||
<select [(ngModel)]="SelectedCompany" formControlName="SelectedCompany" required
|
||||
[ngClass]="{
|
||||
err:
|
||||
LoginForm.controls['SelectedCompany'].hasError('required') &&
|
||||
(LoginForm.controls['SelectedCompany'].dirty ||
|
||||
LoginForm.controls['SelectedCompany'].touched)
|
||||
}">
|
||||
<option value="">Select Company</option>
|
||||
<option *ngFor="let item of Companies" value="{{ item.id }}">
|
||||
{{ item.name }}
|
||||
</option>
|
||||
</select>
|
||||
<span></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="input-fill">
|
||||
<input placeholder="Client Name" required (focusout)="ClientNameFocus=false"
|
||||
(focus)="ClientNameFocus=true" formControlName="ClientName" [(ngModel)]="ClientName"
|
||||
[ngClass]="{ err: LoginForm.controls['ClientName'].hasError('required') && (LoginForm.controls['ClientName'].dirty || LoginForm.controls['ClientName'].touched) }" />
|
||||
<span [ngClass]="{'active-icon-fill':ClientNameFocus}">
|
||||
<svg fill="#DF166A" width="21" viewBox="0 0 512 512"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path
|
||||
d="m437.019531 74.980469c-48.351562-48.351563-112.640625-74.980469-181.019531-74.980469-68.382812 0-132.667969 26.628906-181.019531 74.980469-48.351563 48.351562-74.980469 112.636719-74.980469 181.019531 0 68.378906 26.628906 132.667969 74.980469 181.019531 48.351562 48.351563 112.636719 74.980469 181.019531 74.980469 68.378906 0 132.667969-26.628906 181.019531-74.980469 48.351563-48.351562 74.980469-112.640625 74.980469-181.019531 0-68.382812-26.628906-132.667969-74.980469-181.019531zm-308.679687 367.40625c10.707031-61.648438 64.128906-107.121094 127.660156-107.121094 63.535156 0 116.953125 45.472656 127.660156 107.121094-36.347656 24.972656-80.324218 39.613281-127.660156 39.613281s-91.3125-14.640625-127.660156-39.613281zm46.261718-218.519531c0-44.886719 36.515626-81.398438 81.398438-81.398438s81.398438 36.515625 81.398438 81.398438c0 44.882812-36.515626 81.398437-81.398438 81.398437s-81.398438-36.515625-81.398438-81.398437zm235.042969 197.710937c-8.074219-28.699219-24.109375-54.738281-46.585937-75.078125-13.789063-12.480469-29.484375-22.328125-46.359375-29.269531 30.5-19.894531 50.703125-54.3125 50.703125-93.363281 0-61.425782-49.976563-111.398438-111.402344-111.398438s-111.398438 49.972656-111.398438 111.398438c0 39.050781 20.203126 73.46875 50.699219 93.363281-16.871093 6.941406-32.570312 16.785156-46.359375 29.265625-22.472656 20.339844-38.511718 46.378906-46.585937 75.078125-44.472657-41.300781-72.355469-100.238281-72.355469-165.574219 0-124.617188 101.382812-226 226-226s226 101.382812 226 226c0 65.339844-27.882812 124.277344-72.355469 165.578125zm0 0" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="input-fill">
|
||||
<input placeholder="Client Email" [attr.disabled]="IsUpdate == true ? true : null"
|
||||
required (focusout)="EmailFocus=false" (focus)="EmailFocus=true"
|
||||
formControlName="email" [(ngModel)]="email"
|
||||
[ngClass]="{ err: LoginForm.controls['email'].hasError('required') && (LoginForm.controls['email'].dirty || LoginForm.controls['email'].touched) }" />
|
||||
<span [ngClass]="{'active-icon':EmailFocus}">
|
||||
<svg width="17" height="17" viewBox="0 0 17 12" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg" class="maill">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M14.789 0H2.21098C0.990338 0 0 1.01062 0 2.25627V9.74373C0 10.9894 0.990338 12 2.21098 12H14.789C16.0097 12 17 10.9894 17 9.74373V2.25627C17 1.01062 16.0097 0 14.789 0ZM2.21098 1.30362H14.789C15.3041 1.30362 15.7225 1.73059 15.7225 2.25627V9.74373C15.7225 10.2694 15.3041 10.6964 14.789 10.6964H2.21098C1.69586 10.6964 1.27746 10.2694 1.27746 9.74373V2.25627C1.27746 1.73059 1.69586 1.30362 2.21098 1.30362ZM14.3683 3.36019C14.1825 3.05416 13.7888 2.95974 13.4889 3.14931L9.9686 5.37403C9.85874 5.40653 9.75708 5.46906 9.67654 5.5586L8.50098 6.3015L7.31492 5.54929C7.23926 5.46843 7.14602 5.41066 7.04536 5.37833L3.53161 3.14988L3.43921 3.1013C3.15534 2.98068 2.81956 3.08413 2.65193 3.35927C2.46567 3.66499 2.55754 4.0669 2.85712 4.25697L5.63005 6.01629L2.85381 7.80182L2.77061 7.8654C2.54026 8.07327 2.48472 8.42669 2.654 8.70078C2.84209 9.00533 3.23649 9.09662 3.53492 8.90468L6.83615 6.78151L8.16275 7.62319L8.25415 7.67125C8.4424 7.75139 8.65944 7.73558 8.83635 7.62375L10.1673 6.78246L13.486 8.90552L13.5783 8.95444C13.8617 9.07614 14.1978 8.97396 14.3665 8.69945C14.5538 8.39444 14.4634 7.99218 14.1645 7.80098L11.377 6.01776L14.1616 4.25754L14.2453 4.19462C14.4772 3.98858 14.5355 3.63562 14.3683 3.36019Z"
|
||||
fill="#DF166A"></path>
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<div class="input-fill">
|
||||
<input type="number" placeholder="Client Phone Number" (focusout)="PhoneFocus=false"
|
||||
(focus)="PhoneFocus=true" [(ngModel)]="ContactNumber"
|
||||
formControlName="ContactNumber"
|
||||
[ngClass]="{ err: LoginForm.controls['ContactNumber'].hasError( 'required' ) && (LoginForm.controls['ContactNumber'].dirty || LoginForm.controls['ContactNumber'].touched) }" />
|
||||
<span [ngClass]="{'active-icon':PhoneFocus}">
|
||||
<svg version="1.1" baseProfile="basic" id="Layer_1"
|
||||
xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
|
||||
x="0px" y="0px" width="21px" height="21px" viewBox="0 0 90 100"
|
||||
xml:space="preserve" stroke="#DF166A" fill="none" stroke-width="5px">
|
||||
<path
|
||||
d="M38.789,51.211l10.876,10.876c0.974,0.974,2.471,1.194,3.684,0.543l13.034-6.997c0.964-0.518,2.129-0.493,3.07,0.066
|
||||
l19.017,11.285c1.357,0.805,1.903,2.489,1.268,3.933c-1.625,3.698-4.583,10.476-5.758,13.473c-0.247,0.631-0.615,1.209-1.127,1.652
|
||||
c-12.674,10.986-37.89-2.4-57.191-21.701C6.358,45.039-7.028,19.823,3.958,7.149c0.444-0.512,1.022-0.88,1.652-1.127
|
||||
c2.996-1.175,9.775-4.133,13.473-5.758c1.444-0.635,3.128-0.089,3.933,1.268l11.285,19.017c0.558,0.941,0.583,2.106,0.066,3.07
|
||||
L27.37,36.651c-0.651,1.213-0.431,2.71,0.543,3.684C27.913,40.335,38.789,51.211,38.789,51.211z" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="w-100">
|
||||
<textarea placeholder="Client Address" name="Address" [(ngModel)]="Address"
|
||||
formControlName="Address"
|
||||
[ngClass]="{ err: LoginForm.controls['Address'].hasError('required') && (LoginForm.controls['Address'].dirty || LoginForm.controls['Address'].touched) }"></textarea>
|
||||
</div>
|
||||
<div class="w-100">
|
||||
<textarea placeholder="Client Notes" name="Notes" [(ngModel)]="Notes"
|
||||
formControlName="Notes" placeholder="Enter Notes"
|
||||
[ngClass]="{ err: LoginForm.controls['Notes'].hasError('required') && (LoginForm.controls['Notes'].dirty || LoginForm.controls['Notes'].touched) }"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="history-div" *ngIf="IsUpdate">
|
||||
<h3><span class="material-icons"> history </span>Audit history</h3>
|
||||
<div class="audit-table">
|
||||
<div class="table-header">
|
||||
<div class="date-title"><span>Date & Time</span></div>
|
||||
<div class="action-title"><span>Action</span></div>
|
||||
</div>
|
||||
<div class="main-body-audit">
|
||||
<div class="table-body" *ngFor="let log of loglist">
|
||||
<div class="date-title"><span>{{log.createdAt | date:'medium'}}</span></div>
|
||||
<div class="action-title">
|
||||
<span [innerHTML]="log.description"></span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button class="cancel-btn" (click)="closeModal()">Cancel</button>
|
||||
<button *ngIf="!IsUpdate" class="submit-btn" (click)="saveClient()">Save</button>
|
||||
<button *ngIf="IsUpdate" class="submit-btn" (click)="updateClient()">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -0,0 +1,198 @@
|
||||
@import "../../../utils/theme/colorVariable.scss";
|
||||
.mat-button.mat-primary {
|
||||
background-color: #3f51b5 !important;
|
||||
color: #fff;
|
||||
margin-right: 15px;
|
||||
}
|
||||
|
||||
.formwrapper {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.sub-cohort-div {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
ng-select {
|
||||
margin: 0 10px;
|
||||
}
|
||||
}
|
||||
.mat-form-field {
|
||||
min-width: 30%;
|
||||
}
|
||||
textarea {
|
||||
width: calc(100% - 20px);
|
||||
}
|
||||
}
|
||||
|
||||
.cutome-modal {
|
||||
.flex-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
.mat-primary {
|
||||
margin: 0 10px 0 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.cutome-modal-content {
|
||||
.lbl {
|
||||
font-size: 18px;
|
||||
}
|
||||
.modal-div {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
position: absolute;
|
||||
width: 92%;
|
||||
bottom: 15px;
|
||||
.cancel-send {
|
||||
span {
|
||||
font-size: 14px;
|
||||
}
|
||||
}
|
||||
}
|
||||
.mat-button.mat-primary {
|
||||
margin: 0 15px 0 0;
|
||||
}
|
||||
.mr-0 {
|
||||
margin: 0 !important;
|
||||
}
|
||||
.cohortwrap {
|
||||
width: 94%;
|
||||
display: flex;
|
||||
background: #0d0e26;
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
.cohortname {
|
||||
width: 95%;
|
||||
}
|
||||
.cohortchk {
|
||||
width: 5%;
|
||||
}
|
||||
}
|
||||
.projectorlink {
|
||||
width: 94%;
|
||||
display: flex;
|
||||
background: #0d0e26;
|
||||
padding: 10px;
|
||||
margin: 5px;
|
||||
.name {
|
||||
width: 20%;
|
||||
}
|
||||
.link {
|
||||
width: 80%;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.close-right {
|
||||
float: right;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.select-box {
|
||||
select {
|
||||
width: 100%;
|
||||
}
|
||||
span {
|
||||
right: 0px;
|
||||
}
|
||||
}
|
||||
|
||||
.w-100 {
|
||||
width: 100% !important;
|
||||
}
|
||||
::ng-deep tr.mat-header-row th {
|
||||
&:first-child {
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(6) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(7) {
|
||||
width: 110px;
|
||||
}
|
||||
&:last-child {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
::ng-deep tr td.mat-cell {
|
||||
&:first-child {
|
||||
width: 50px;
|
||||
}
|
||||
&:nth-child(2) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(3) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(4) {
|
||||
width: 120px;
|
||||
}
|
||||
&:nth-child(5) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(6) {
|
||||
width: 110px;
|
||||
}
|
||||
&:nth-child(7) {
|
||||
width: 110px;
|
||||
}
|
||||
&:last-child {
|
||||
width: 50px;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (max-width: 450px) {
|
||||
.modal-footer {
|
||||
.check-reset,
|
||||
.cancel-send {
|
||||
text-align: center;
|
||||
button {
|
||||
margin: 5px;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
::ng-deep .mat-paginator-container {
|
||||
padding: 0 !important;
|
||||
display: flex !important;
|
||||
justify-content: space-between !important;
|
||||
.mat-icon-button {
|
||||
background: $paginationBtnBg !important;
|
||||
border-radius: 5px !important;
|
||||
border: 1px solid $paginationBtnBorder !important;
|
||||
margin: 0 5px !important;
|
||||
cursor: pointer;
|
||||
color: $paginationBtnText !important;
|
||||
|
||||
&:hover {
|
||||
border: 1px solid $PaginationBtnHover !important;
|
||||
color: $PaginationBtnHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.mat-paginator-page-size-label {
|
||||
color: $paginationText !important;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
|
||||
.mat-paginator-range-label {
|
||||
color: $Pink;
|
||||
width: 140px;
|
||||
font-size: 14px !important;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ClientcohortComponent } from './clientcohort.component';
|
||||
|
||||
describe('ClientcohortComponent', () => {
|
||||
let component: ClientcohortComponent;
|
||||
let fixture: ComponentFixture<ClientcohortComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ClientcohortComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ClientcohortComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,636 @@
|
||||
import { Component, Input, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import Swal from 'sweetalert2/dist/sweetalert2.js'
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { ClientService } from '../../services/client/client.service';
|
||||
import { CohortService } from '../../services/cohort/cohort.service';
|
||||
import { CompanyService } from '../../services/company/company.service';
|
||||
|
||||
@Component({
|
||||
selector: 'app-clientcohort',
|
||||
templateUrl: './clientcohort.component.html',
|
||||
styleUrls: ['./clientcohort.component.scss']
|
||||
})
|
||||
export class ClientcohortComponent implements OnInit {
|
||||
SortingData = {
|
||||
active: "",
|
||||
direction: ""
|
||||
};
|
||||
addClient: boolean = false
|
||||
PhoneFocus: boolean = false
|
||||
EmailFocus: boolean = false
|
||||
ClientNameFocus: boolean = false
|
||||
public LoginForm: FormGroup;
|
||||
listCohortData = [];
|
||||
bkplistCohortData = [];
|
||||
Companies = [];
|
||||
displayedColumns: string[] = ['SrNo', 'chortname', 'name', 'email', 'mobile', 'company_name', 'add_update_cohort', 'actions'];
|
||||
dataSource: MatTableDataSource<Userlist>;
|
||||
Search: any;
|
||||
PopUpshow = false;
|
||||
SrNo: number = 0;
|
||||
totalUsers: number;
|
||||
@Input('pagination') pagination: boolean;
|
||||
@ViewChild(MatPaginator, { static: false }) set matPaginator(paginator: MatPaginator) {
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator = paginator;
|
||||
}
|
||||
}
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort, { static: true }) sort: MatSort;
|
||||
constructor(public companyService: CompanyService, public cohortService: CohortService, public clientService: ClientService, public fb: FormBuilder, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService) {
|
||||
var IsLogin = this.auth.isLoggedIn();
|
||||
if (!IsLogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
}
|
||||
email: any;
|
||||
ClientName: any;
|
||||
ContactNumber: any;
|
||||
selectCohortData: any;
|
||||
Address: any;
|
||||
Notes: any;
|
||||
SelectedCompany: any;
|
||||
IsUpdate: boolean = false;
|
||||
Id: any;
|
||||
loglist = [];
|
||||
oldAuditValueArray = { "Company Name": "", "Client Name": "", "Email": "", "Phone Number": "", "Address": "", "Notes": "" }
|
||||
newAuditValueArray = { "Company Name": "", "Client Name": "", "Email": "", "Phone Number": "", "Address": "", "Notes": "" }
|
||||
auditHistory = "";
|
||||
async ngOnInit() {
|
||||
this.LoginForm = this.fb.group({
|
||||
email: ['', Validators.compose([Validators.required, Validators.pattern('^[_A-Za-z0-9-]+(\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)*((\\.[A-Za-z]{2,4})$)')])],
|
||||
ClientName: ['', Validators.required],
|
||||
ContactNumber: new FormControl(),
|
||||
Address: new FormControl(),
|
||||
Notes: new FormControl(),
|
||||
SelectedCompany: ['', Validators.required],
|
||||
})
|
||||
await this.spinner.show();
|
||||
await this.getAllClients(1, this.paginator ? this.paginator.pageSize : 10, "");
|
||||
await this.getAllCompanies();
|
||||
await this.listCohort();
|
||||
|
||||
await this.spinner.hide();
|
||||
}
|
||||
async getAllCompanies() {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.companyService.GetAllCompany(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.Companies = list.data;
|
||||
this.SelectedCompany = "";
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
closeModal() {
|
||||
this.addClient = false;
|
||||
this.IsUpdate = false;
|
||||
this.SelectedCompany = '';
|
||||
this.ClientName = "";
|
||||
this.email = "";
|
||||
this.ContactNumber = "";
|
||||
this.Address = "";
|
||||
this.Notes = "";
|
||||
this.oldAuditValueArray = { "Company Name": "", "Client Name": "", "Email": "", "Phone Number": "", "Address": "", "Notes": "" }
|
||||
this.newAuditValueArray = { "Company Name": "", "Client Name": "", "Email": "", "Phone Number": "", "Address": "", "Notes": "" }
|
||||
this.auditHistory = "";
|
||||
}
|
||||
markFormTouched(group: FormGroup | FormArray) {
|
||||
Object.keys(group.controls).forEach((key: string) => {
|
||||
const control = group.controls[key];
|
||||
if (control instanceof FormGroup || control instanceof FormArray) { control.markAsTouched(); this.markFormTouched(control); }
|
||||
else { control.markAsTouched(); };
|
||||
});
|
||||
};
|
||||
addNewClient() {
|
||||
this.addClient = true;
|
||||
}
|
||||
get f() {
|
||||
return this.LoginForm.controls;
|
||||
}
|
||||
delete(element) {
|
||||
Swal.fire({
|
||||
title: 'Are you sure?',
|
||||
text: "You want to delete this client?",
|
||||
icon: 'warning',
|
||||
showCancelButton: true,
|
||||
confirmButtonColor: '#3085d6',
|
||||
cancelButtonColor: '#d33',
|
||||
confirmButtonText: 'Delete'
|
||||
}).then(async (result) => {
|
||||
if (result.value) {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
|
||||
var token = ''
|
||||
await this.auth.deleteuser(element.email).then(async (data) => {
|
||||
if (data[0].StatusCode == 1) {
|
||||
await this.clientService.deleteuser(element.id, token).then(async (userdata) => {
|
||||
if (userdata[0].status == 200) {
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + element.email + "</span> is deleted as client by <span> " + e + "</span>";
|
||||
|
||||
await this.service.addAdminLogs(desc, "client", element.id, token);
|
||||
|
||||
await this.clientService.deleteClientCohort(element.clientcohortId, token);
|
||||
}
|
||||
});
|
||||
await this.getAllClients(1, this.paginator ? this.paginator.pageSize : 10, this.Search);
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Client delete successfully',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
await this.service.ShowError("Delete client unsuccessfully");
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
if (data[0].message == "User does not exist.") {
|
||||
await this.clientService.deleteuser(element.id, token).then(async (userdata) => {
|
||||
if (userdata[0].status == 200) {
|
||||
await this.getAllClients(1, this.paginator ? this.paginator.pageSize : 10, this.Search);
|
||||
await this.spinner.hide();
|
||||
Swal.fire(
|
||||
'Deleted!',
|
||||
'Client delete successfully',
|
||||
'success'
|
||||
)
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
await this.service.ShowError("Delete client unsuccessfully");
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
await this.service.ShowError(data[0].message);
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
async pageEvents(event: any) {}
|
||||
async getAllClients(pageNo, limit, search, active = "", direction = "") {
|
||||
try {
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
const users: Userlist[] = [];
|
||||
if (!this.Search) {
|
||||
this.Search = "";
|
||||
}
|
||||
await this.clientService.getLimitClient(pageNo, limit, search, active, direction, token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.SrNo = (pageNo - 1) * limit;
|
||||
await list.data.rows.forEach(async (element) => {
|
||||
var chortname = "";
|
||||
if (element.cohorts.length > 0) {
|
||||
for (let i = 0; i < element.cohorts.length; i++) {
|
||||
chortname = chortname + element.cohorts[i].cohort_name + ","
|
||||
}
|
||||
if (chortname.endsWith(",") == true) {
|
||||
chortname = chortname.substring(0, chortname.length - 1);
|
||||
}
|
||||
}
|
||||
var company_name = "";
|
||||
if (element.company.length > 0) {
|
||||
for (let i = 0; i < element.company.length; i++) {
|
||||
company_name = company_name + element.company[i].name + ","
|
||||
}
|
||||
if (company_name.endsWith(",") == true) {
|
||||
company_name = company_name.substring(0, company_name.length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
this.SrNo = this.SrNo + 1;
|
||||
await users.push({
|
||||
"SrNo": this.SrNo,
|
||||
"id": element.id,
|
||||
"name": element.name,
|
||||
"email": element.email,
|
||||
"roll_id": element.roll_id,
|
||||
"email_verified_at": element.email_verified_at,
|
||||
"email_verified": element.email_verified,
|
||||
"mobile": element.mobile ? element.mobile : "",
|
||||
"address": element.address,
|
||||
"notes": element.notes,
|
||||
"profile_img": element.profile_img,
|
||||
"permissions": element.permissions,
|
||||
"password": element.password,
|
||||
"status": element.status,
|
||||
"createdAt": element.createdAt,
|
||||
"updatedAt": element.updatedAt,
|
||||
"free_flashcard": element.free_flashcard,
|
||||
"free_flashccsp": element.free_flashccsp,
|
||||
"chortname": chortname,
|
||||
"cohorts": element.cohorts,
|
||||
"clientcohortId": element.clientcohortId,
|
||||
"company_name": company_name,
|
||||
"company_id": element.company_id ? element.company_id : ""
|
||||
})
|
||||
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.pagination = true;
|
||||
this.totalUsers = list.data.count;
|
||||
this.dataSource.sort = this.sort;
|
||||
this.dataSource.sortingDataAccessor = (data, sortHeaderId) => {
|
||||
switch (sortHeaderId) {
|
||||
case 'SrNo':
|
||||
return data[sortHeaderId];
|
||||
default:
|
||||
return data[sortHeaderId].toLocaleLowerCase();
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
else {
|
||||
this.spinner.hide();
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
} catch (e) {
|
||||
this.spinner.hide();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
async sortData(event) {}
|
||||
ShowPop(element) {
|
||||
this.listCohortData = this.bkplistCohortData.filter(x => x.company_id == element.company_id);
|
||||
this.listCohortData.forEach(list => {
|
||||
list["checked"] = false;
|
||||
element.cohorts.forEach(elements => {
|
||||
if (list.id == elements.id) {
|
||||
list["checked"] = true;
|
||||
}
|
||||
});
|
||||
})
|
||||
this.PopUpshow = true;
|
||||
this.selectCohortData = element;
|
||||
}
|
||||
async listCohort() {
|
||||
this.listCohortData = [];
|
||||
this.bkplistCohortData = [];
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.cohortService.ListCohort(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.listCohortData = list.data;
|
||||
this.bkplistCohortData = list.data;
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
async submit() {
|
||||
var data = []
|
||||
data = this.listCohortData.filter(x => x.checked == true);
|
||||
if (data.length > 0) {
|
||||
var CohortId = "";
|
||||
var c_name = "";
|
||||
await data.forEach(async (element) => {
|
||||
CohortId = CohortId + element.id + ',';
|
||||
c_name = c_name + element.cohort_name + ', '
|
||||
});
|
||||
if (c_name.endsWith(",") == true) {
|
||||
c_name = c_name.substring(0, c_name.length - 2);
|
||||
}
|
||||
if (CohortId.endsWith(",") == true) {
|
||||
CohortId = CohortId.substring(0, CohortId.length - 1);
|
||||
}
|
||||
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.clientService.client_addclientcohort(this.selectCohortData.id, CohortId, token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + c_name + "</span> Cohorts is assign to client <span>" + this.selectCohortData.email + "</span> by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "assigncohort", this.selectCohortData.id, token);
|
||||
|
||||
}
|
||||
});
|
||||
await this.getAllClients(1, this.paginator ? this.paginator.pageSize : 10, "");
|
||||
this.PopUpshow = false;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
this.PopUpshow = false;
|
||||
await this.spinner.hide();
|
||||
|
||||
}
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.clientService.client_emptyclientcohort(this.selectCohortData.id, token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
await this.getAllClients(1, this.paginator ? this.paginator.pageSize : 10, "");
|
||||
this.PopUpshow = false;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
this.PopUpshow = false;
|
||||
await this.spinner.hide();
|
||||
}
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
checkall(value) {
|
||||
this.listCohortData.forEach(data => {
|
||||
data.checked = value
|
||||
})
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
if (this.pagination) {
|
||||
this.dataSource.paginator._changePageSize(this.dataSource.paginator.pageSize);
|
||||
}
|
||||
}
|
||||
async edit(item) {
|
||||
this.loglist = [];
|
||||
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
|
||||
var token = ''
|
||||
this.service.get_logs("client", item.id, token).then(async (value) => {
|
||||
if (value[0].status == 200) {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
|
||||
this.loglist = list.data;
|
||||
await this.spinner.hide();
|
||||
|
||||
|
||||
}
|
||||
else {
|
||||
var list = JSON.parse(<string>value[0].json);
|
||||
await this.spinner.hide();
|
||||
|
||||
|
||||
this.service.ShowError(list.message);
|
||||
}
|
||||
|
||||
}, err => {
|
||||
this.spinner.hide();
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
this.addClient = true;
|
||||
this.IsUpdate = true;
|
||||
this.Id = item.id;
|
||||
this.ClientName = item.name;
|
||||
this.SelectedCompany = item.company_id;
|
||||
this.ContactNumber = item.mobile;
|
||||
this.Address = item.address;
|
||||
this.Notes = item.notes;
|
||||
this.email = item.email;
|
||||
this.oldAuditValueArray = { "Company Name": this.Companies.find(x => x.id == this.SelectedCompany) ? this.Companies.find(x => x.id == this.SelectedCompany).name : "", "Client Name": this.ClientName, "Email": this.email, "Phone Number": this.ContactNumber, "Address": this.Address, "Notes": this.Notes }
|
||||
}
|
||||
checkchange(event, item) {
|
||||
item.checked = event.target.checked
|
||||
}
|
||||
async saveClient() {
|
||||
this.markFormTouched(this.LoginForm);
|
||||
if (this.LoginForm.valid) {
|
||||
this.ClientName = this.ClientName.trim();
|
||||
if (this.ClientName == "" || this.ClientName == undefined || this.ClientName == null) {
|
||||
this.service.ShowError("Client Name is required")
|
||||
return;
|
||||
}
|
||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
if (!re.test(this.email)) {
|
||||
this.service.ShowError("Please enter a valid email!")
|
||||
await this.spinner.hide();
|
||||
return
|
||||
}
|
||||
else {
|
||||
await this.spinner.show();
|
||||
await this.auth.CreateUser(this.email).then(async (data) => {
|
||||
if (data[0].StatusCode == 1) {
|
||||
await this.clientService.addClienttemp(this.ClientName, this.email, 4, "REWerew889##", 0, "0", this.Address, this.Notes, this.ContactNumber, this.SelectedCompany).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.service.ShowSuccess("Client add successfully");
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
var desc = "<span> " + this.email + "</span> is added as client by <span> " + e + "</span>";
|
||||
await this.service.addAdminLogs(desc, "client", list.data.id, token);
|
||||
|
||||
}
|
||||
});
|
||||
this.addClient = false;
|
||||
this.pagination = false;
|
||||
this.closeModal();
|
||||
await this.getAllClients(1, this.paginator ? this.paginator.pageSize : 10, "");
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
this.service.ShowError(data[0].message)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
async updateClient() {
|
||||
this.markFormTouched(this.LoginForm);
|
||||
if (this.LoginForm.valid) {
|
||||
this.ClientName = this.ClientName.trim();
|
||||
if (this.ClientName == "" || this.ClientName == undefined || this.ClientName == null) {
|
||||
this.service.ShowError("Client Name is required")
|
||||
return;
|
||||
}
|
||||
var re = /^(([^<>()[\]\\.,;:\s@\"]+(\.[^<>()[\]\\.,;:\s@\"]+)*)|(\".+\"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/;
|
||||
if (!re.test(this.email)) {
|
||||
this.service.ShowError("Please enter a valid email!")
|
||||
await this.spinner.hide();
|
||||
return
|
||||
}
|
||||
else {
|
||||
await this.spinner.show();
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.clientService.UpdateClient(this.Id, this.ClientName, this.SelectedCompany, this.ContactNumber, this.Address, this.Notes, token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
this.service.ShowSuccess("Client update successfully");
|
||||
this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
var e = window.localStorage.getItem("adminUser");
|
||||
if (e == null || e == undefined || e == "") {
|
||||
e = 'admin';
|
||||
}
|
||||
this.newAuditValueArray = { "Company Name": this.Companies.find(x => x.id == this.SelectedCompany) ? this.Companies.find(x => x.id == this.SelectedCompany).name : "", "Client Name": this.ClientName, "Email": this.email, "Phone Number": this.ContactNumber, "Address": this.Address, "Notes": this.Notes }
|
||||
var audit = this.auth.compareAuditHist(this.oldAuditValueArray, this.newAuditValueArray);
|
||||
var desc = audit;
|
||||
if (desc != "")
|
||||
await this.service.addAdminLogs(desc, "client", this.Id, token);
|
||||
|
||||
}
|
||||
});
|
||||
this.pagination = false;
|
||||
this.closeModal();
|
||||
await this.getAllClients(1, this.paginator ? this.paginator.pageSize : 10, this.Search);
|
||||
await this.spinner.hide();
|
||||
}
|
||||
else {
|
||||
await this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
export interface Userlist {
|
||||
SrNo: number;
|
||||
id: string;
|
||||
name: string;
|
||||
email: string;
|
||||
roll_id: string;
|
||||
email_verified_at: string;
|
||||
email_verified: string;
|
||||
mobile: string;
|
||||
address: string;
|
||||
notes: string;
|
||||
profile_img: string;
|
||||
permissions: string;
|
||||
password: string;
|
||||
status: string;
|
||||
createdAt: string;
|
||||
updatedAt: string;
|
||||
free_flashcard: string;
|
||||
free_flashccsp: string;
|
||||
chortname: string;
|
||||
cohorts: string;
|
||||
clientcohortId: string;
|
||||
company_name: string;
|
||||
company_id: string;
|
||||
}
|
||||
@ -0,0 +1,40 @@
|
||||
<div class="pagemain">
|
||||
<div class="main-pagemain">
|
||||
<div class="pagetitle">
|
||||
<h3>Client Logs History</h3>
|
||||
</div>
|
||||
<div class="search-wrap">
|
||||
<input placeholder="Search.." [(ngModel)]="Search" autocomplete="off" (keyup)="filter()" name="search" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="pagesection">
|
||||
<div class="mat-elevation-z8">
|
||||
<table mat-table [dataSource]="dataSource" matSort style="border-spacing: 0 10px">
|
||||
<ng-container matColumnDef="SrNo">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>#</th>
|
||||
<td mat-cell *matCellDef="let element"><span>{{ element.SrNo }}</span></td>
|
||||
</ng-container>
|
||||
<ng-container matColumnDef="description">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Description</th>
|
||||
<td mat-cell *matCellDef="let element">
|
||||
<div class="spn-color" [innerHTML]="element.description"></div>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="createdAt">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header>Date</th>
|
||||
<td class="date-times" mat-cell *matCellDef="let element">
|
||||
<span title="{{ element.createdAt }}">{{ element.createdAt }}</span>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
||||
<tr mat-row *matRowDef="let row; columns: displayedColumns"></tr>
|
||||
</table>
|
||||
<mat-paginator [pageSizeOptions]="[25, 50, 100, 500]" showFirstLastButtons></mat-paginator>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
@ -0,0 +1,7 @@
|
||||
.date-times {
|
||||
width: 125px;
|
||||
}
|
||||
.spn-color{
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
@ -0,0 +1,25 @@
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { ClientlogsComponent } from './clientlogs.component';
|
||||
|
||||
describe('ClientlogsComponent', () => {
|
||||
let component: ClientlogsComponent;
|
||||
let fixture: ComponentFixture<ClientlogsComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ ClientlogsComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(ClientlogsComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@ -0,0 +1,87 @@
|
||||
import { Component, OnInit, ViewChild } from '@angular/core';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { ServicesService } from '../../services.service';
|
||||
import { NgxSpinnerService } from "ngx-spinner";
|
||||
import { Router } from '@angular/router';
|
||||
import { AuthorizationService } from '../../service/authorization.service';
|
||||
import { formatDate } from '@angular/common';
|
||||
import { ClientlogsService } from '../../services/clientlogs/clientlogs.service';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
|
||||
|
||||
@Component({
|
||||
selector: 'app-clientlogs',
|
||||
templateUrl: './clientlogs.component.html',
|
||||
styleUrls: ['./clientlogs.component.scss']
|
||||
})
|
||||
export class ClientlogsComponent implements OnInit {
|
||||
|
||||
displayedColumns: string[] = ['SrNo', 'description', 'createdAt'];
|
||||
dataSource: MatTableDataSource<Userlist>;
|
||||
Search: any;
|
||||
@ViewChild(MatPaginator, { static: true }) paginator: MatPaginator;
|
||||
@ViewChild(MatSort) matSort: MatSort;
|
||||
constructor(public clientLogsService: ClientlogsService, public auth: AuthorizationService, public router: Router, public spinner: NgxSpinnerService, public service: ServicesService) {
|
||||
var setlogin = this.auth.isLoggedIn();
|
||||
if (!setlogin) {
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
async ngOnInit() {
|
||||
await this.spinner.show();
|
||||
await this.getAllAdminLogs();
|
||||
await this.spinner.hide();
|
||||
}
|
||||
|
||||
async getAllAdminLogs() {
|
||||
try {
|
||||
const users: Userlist[] = [];
|
||||
await this.auth.getAuthenticatedUser().getSession(async (err, session) => {
|
||||
if (err) {
|
||||
await this.spinner.hide();
|
||||
this.router.navigate(['/login']);
|
||||
}
|
||||
else {
|
||||
var token = ''
|
||||
await this.clientLogsService.getAllClientLogs(token).then(async (data) => {
|
||||
if (data[0].status == 200) {
|
||||
var list = JSON.parse(<string>data[0].json);
|
||||
var srno = 0;
|
||||
await list.data.forEach(async (element) => {
|
||||
let dt = formatDate(element.createdAt, 'yyyy-MM-dd, hh:mm', 'en_US');
|
||||
srno = srno + 1;
|
||||
await users.push({
|
||||
"SrNo": srno,
|
||||
"id": element.id,
|
||||
"description": element.description,
|
||||
"createdAt": dt
|
||||
})
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(users);
|
||||
this.dataSource.paginator = this.paginator;
|
||||
this.dataSource.sort = this.matSort;
|
||||
}
|
||||
else {
|
||||
this.spinner.hide();
|
||||
}
|
||||
})
|
||||
}
|
||||
});
|
||||
} catch (e) {
|
||||
this.spinner.hide();
|
||||
}
|
||||
}
|
||||
async filter() {
|
||||
this.dataSource.filter = this.Search;
|
||||
}
|
||||
}
|
||||
export interface Userlist {
|
||||
SrNo: number;
|
||||
id: string;
|
||||
description: string;
|
||||
createdAt: string;
|
||||
}
|
||||
|
||||
@ -0,0 +1,180 @@
|
||||
<div class="main-report-div" id="printable" #printable>
|
||||
<div class="title-div" id="titlediv">
|
||||
<div class="back-btn" id="backbtn">
|
||||
<button (click)=" back()"><span class="material-icons">arrow_back</span> Back</button>
|
||||
</div>
|
||||
<div class="master-class">
|
||||
<h2 id="cohortreport"><span>{{cohort_name}}</span> Report</h2>
|
||||
<span id="printicon" (click)="SavePDF()"><svg width="25" height="23" viewBox="0 0 25 23" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M16.1109 0.133293C15.9922 0.0471999 15.8485 0 15.7 0H14.7H5.7L5.60501 0.00639017C5.26334 0.0527418 5 0.345617 5 0.7V4.7L5.00639 4.79499C5.05274 5.13666 5.34562 5.4 5.7 5.4L5.79499 5.39361C6.13666 5.34726 6.4 5.05438 6.4 4.7V1.4H14V4.7L14.0064 4.79499C14.0527 5.13666 14.3456 5.4 14.7 5.4H18.7C18.7322 5.4 18.7639 5.39782 18.795 5.39361C19.1367 5.34725 19.4 5.05438 19.4 4.7V3.7L19.3913 3.58983C19.3682 3.445 19.3 3.31005 19.195 3.20503L16.195 0.205025L16.1109 0.133293ZM15.4 4V1.4H15.411L18 3.989V4H15.4ZM21.7 6C23.1301 6 24.3063 7.12159 24.3947 8.5297L24.4 8.7V14.7C24.4 16.1297 23.2788 17.3063 21.8703 17.3947L21.7 17.4H19.4V21.7C19.4 22.0866 19.0866 22.4 18.7 22.4H5.7C5.3134 22.4 5 22.0866 5 21.7V17.4H2.7C1.27058 17.4 0.0937427 16.2781 0.00533142 14.8703L0 14.7V8.7C0 7.27058 1.12186 6.09374 2.52974 6.00533L2.7 6H21.7ZM21.7 16H19.4V12.7C19.4 12.3134 19.0866 12 18.7 12H5.7C5.3134 12 5 12.3134 5 12.7V16H2.7L2.56784 15.9932C1.91557 15.9262 1.4 15.3688 1.4 14.7V8.7L1.40676 8.56784C1.47382 7.91557 2.03119 7.4 2.7 7.4H21.7L21.8323 7.40676C22.485 7.47377 23 8.03081 23 8.7V14.7L22.9932 14.8322C22.9263 15.4848 22.3694 16 21.7 16ZM6.4 21V16.7V13.4H18V16.7V21H6.4ZM5.7 10.2C5.7 11.028 5.0295 11.7 4.2 11.7C3.372 11.7 2.7 11.028 2.7 10.2C2.7 9.3705 3.372 8.7 4.2 8.7C5.0295 8.7 5.7 9.3705 5.7 10.2ZM15.795 16.3936C16.1367 16.3473 16.4 16.0544 16.4 15.7C16.4 15.3134 16.0866 15 15.7 15H8.7L8.60501 15.0064C8.26334 15.0527 8 15.3456 8 15.7C8 16.0866 8.3134 16.4 8.7 16.4H15.7L15.795 16.3936ZM16.4 18.7C16.4 18.3134 16.0866 18 15.7 18H8.7L8.60501 18.0064C8.26334 18.0527 8 18.3456 8 18.7C8 19.0866 8.3134 19.4 8.7 19.4H15.7L15.795 19.3936C16.1367 19.3473 16.4 19.0544 16.4 18.7Z"
|
||||
fill="#C2B8FF" />
|
||||
</svg>
|
||||
</span>
|
||||
</div>
|
||||
<div class="headerlogo">
|
||||
<img src="../../../assets/images/logo.png" alt="CISSP" id="printlogo" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="cohort-table">
|
||||
<div class="limiter">
|
||||
<div class="container-table100">
|
||||
<div class="wrap-table100">
|
||||
<div class="table100 ver1" id="dflex">
|
||||
<div class="table100-firstcol">
|
||||
<table border="1" id="left-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="bg-color"></th>
|
||||
</tr>
|
||||
<tr class="row100 head">
|
||||
<th class="cell100 column1 averageScore" id="height129">Student Name</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row100 body studentName" *ngFor="let item of Reports">
|
||||
<td class="cell100 column2 UserBackground" title="{{item.name}}"
|
||||
style="white-space: nowrap;">
|
||||
<div class="user-name">
|
||||
<img src="{{item.avatar_url}}"
|
||||
style="height: 38px; width: 38px;border-radius: 50%;margin: 0 10px;"
|
||||
onError="this.src='../../assets/images/avatar.png'" alt="user">
|
||||
<p>
|
||||
{{item.name ? item.name : "-"}}
|
||||
</p>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="wrap-table100-nextcols js-pscroll">
|
||||
<div class="table100-nextcols">
|
||||
<table border="1" id="right-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th [attr.colspan]="KnowledgeAssessments.length + 1" class="bg-color">
|
||||
<span>Knowledge Assessments</span>
|
||||
</th>
|
||||
<th colspan="4" class="bg-color"><span>Flashcard App</span></th>
|
||||
<th colspan="4" class="bg-color"><span>Practice Tests</span>
|
||||
</th>
|
||||
<th colspan="1" class="bg-color"></th>
|
||||
</tr>
|
||||
<tr class="row100 head" id="height110">
|
||||
<th class="cell100 column2" *ngFor="let item of KnowledgeAssessments">
|
||||
<div class="knowldgeAssement">{{item.knowass_name}}</div>
|
||||
</th>
|
||||
<th class="cell100 column18 color">
|
||||
<div class="knowldgeAssement averageScore">Average Score</div>
|
||||
</th>
|
||||
<th class="cell100 column19">
|
||||
<div class="knowldgeAssement">Know</div>
|
||||
</th>
|
||||
<th class="cell100 column20">
|
||||
<div class="knowldgeAssement">Review</div>
|
||||
</th>
|
||||
<th class="cell100 column21">
|
||||
<div class="knowldgeAssement">Marked</div>
|
||||
</th>
|
||||
<th class="cell100 column22 color">
|
||||
<div class="knowldgeAssement averageScore">Unseen</div>
|
||||
</th>
|
||||
<th class="cell100 column23">
|
||||
<div class="knowldgeAssement">Right</div>
|
||||
</th>
|
||||
<th class="cell100 column24">
|
||||
<div class="knowldgeAssement">Wrong</div>
|
||||
</th>
|
||||
<th class="cell100 column25">
|
||||
<div class="knowldgeAssement">Marked</div>
|
||||
</th>
|
||||
<th class="cell100 column26 color">
|
||||
<div class="knowldgeAssement averageScore">Unseen</div>
|
||||
</th>
|
||||
<th class="cell100 column27 color">
|
||||
<div class="knowldgeAssement averageScore">Practice Exam Score</div>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr class="row100 body height46" *ngFor="let item of Results;let i=index">
|
||||
<th class="cell100 column2" *ngFor="let mainKA of KnowledgeAssessments">
|
||||
<span *ngFor="let ka of item.KnowAss">
|
||||
<span *ngIf="mainKA.knowass_name==ka.knowass_name && !ka.type">
|
||||
{{ka.percent}}%
|
||||
</span>
|
||||
<span *ngIf="mainKA.knowass_name==ka.knowass_name && ka.type">
|
||||
<svg class="svgSize" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z"
|
||||
fill="url(#paint0_linear)" />
|
||||
<path d="M5.59902 10.5144L10.4539 5.88573" stroke="white"
|
||||
stroke-width="1.6" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M10.4537 10.5144L5.59882 5.88573" stroke="white"
|
||||
stroke-width="1.6" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear" x1="16" y1="0" x2="0"
|
||||
y2="0" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E44A44" />
|
||||
<stop offset="1" stop-color="#FF8D68" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
</span>
|
||||
</span>
|
||||
<span *ngIf="item.KnowAss.length <= 0">
|
||||
<svg class="svgSize" viewBox="0 0 16 16" fill="none"
|
||||
xmlns="http://www.w3.org/2000/svg">
|
||||
<path fill-rule="evenodd" clip-rule="evenodd"
|
||||
d="M0 8C0 3.58172 3.58172 0 8 0C12.4183 0 16 3.58172 16 8C16 12.4183 12.4183 16 8 16C3.58172 16 0 12.4183 0 8Z"
|
||||
fill="url(#paint0_linear)" />
|
||||
<path d="M5.59902 10.5144L10.4539 5.88573" stroke="white"
|
||||
stroke-width="1.6" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<path d="M10.4537 10.5144L5.59882 5.88573" stroke="white"
|
||||
stroke-width="1.6" stroke-linecap="round"
|
||||
stroke-linejoin="round" />
|
||||
<defs>
|
||||
<linearGradient id="paint0_linear" x1="16" y1="0" x2="0"
|
||||
y2="0" gradientUnits="userSpaceOnUse">
|
||||
<stop stop-color="#E44A44" />
|
||||
<stop offset="1" stop-color="#FF8D68" />
|
||||
</linearGradient>
|
||||
</defs>
|
||||
</svg>
|
||||
</span>
|
||||
</th>
|
||||
<th class="cell100 column18 color averageScore">{{item.AvgKnowPer}}%</th>
|
||||
<th class="cell100 column19">{{item.Flashcards.ttlright}}</th>
|
||||
<th class="cell100 column20">{{item.Flashcards.ttlreview}}</th>
|
||||
<th class="cell100 column21">{{item.Flashcards.ttlbookmark}}</th>
|
||||
<th class="cell100 column22 color averageScore">
|
||||
{{item.Flashcards.ttlunseen}}
|
||||
</th>
|
||||
<th class="cell100 column23">{{item.Practice.right}}</th>
|
||||
<th class="cell100 column24">{{item.Practice.wrong}}</th>
|
||||
<th class="cell100 column25">{{item.Practice.marked}}</th>
|
||||
<th class="cell100 column26 color averageScore">{{item.Practice.unseen}}
|
||||
</th>
|
||||
<th class="cell100 column27 color averageScore">{{item.Practice.percent}}%
|
||||
</th>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ngx-spinner bdColor="#00041aa6" size="default" color="##d7779b"
|
||||
template="<img src='../../../assets/images/loading.gif' class='loading-indicator'/>" [fullScreen]="true">
|
||||
</ngx-spinner>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user