[init] -init version
This commit is contained in:
12
.browserslistrc
Normal file
12
.browserslistrc
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'.
|
||||
13
.editorconfig
Normal file
13
.editorconfig
Normal file
@@ -0,0 +1,13 @@
|
||||
# Editor configuration, see https://editorconfig.org
|
||||
root = true
|
||||
|
||||
[*]
|
||||
charset = utf-8
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
insert_final_newline = true
|
||||
trim_trailing_whitespace = true
|
||||
|
||||
[*.md]
|
||||
max_line_length = off
|
||||
trim_trailing_whitespace = false
|
||||
46
.gitignore
vendored
Normal file
46
.gitignore
vendored
Normal file
@@ -0,0 +1,46 @@
|
||||
# See http://help.github.com/ignore-files/ for more about ignoring files.
|
||||
|
||||
# compiled output
|
||||
/dist
|
||||
/tmp
|
||||
/out-tsc
|
||||
# Only exists if Bazel was run
|
||||
/bazel-out
|
||||
|
||||
# dependencies
|
||||
/node_modules
|
||||
|
||||
# profiling files
|
||||
chrome-profiler-events.json
|
||||
speed-measure-plugin.json
|
||||
|
||||
# IDEs and editors
|
||||
/.idea
|
||||
.project
|
||||
.classpath
|
||||
.c9/
|
||||
*.launch
|
||||
.settings/
|
||||
*.sublime-workspace
|
||||
|
||||
# IDE - VSCode
|
||||
.vscode/*
|
||||
!.vscode/settings.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/launch.json
|
||||
!.vscode/extensions.json
|
||||
.history/*
|
||||
|
||||
# misc
|
||||
/.sass-cache
|
||||
/connect.lock
|
||||
/coverage
|
||||
/libpeerconnection.log
|
||||
npm-debug.log
|
||||
yarn-error.log
|
||||
testem.log
|
||||
/typings
|
||||
|
||||
# System Files
|
||||
.DS_Store
|
||||
Thumbs.db
|
||||
9
.vscode/settings.json
vendored
Normal file
9
.vscode/settings.json
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"javascript.implicitProjectConfig.experimentalDecorators": true,
|
||||
"typescript.tsdk": "node_modules/typescript/lib",
|
||||
"enable_typescript_language_service": false,
|
||||
"css.validate": false,
|
||||
"less.validate": false,
|
||||
"scss.validate": false,
|
||||
"angular.enable-strict-mode-prompt": false
|
||||
}
|
||||
14
Dockerfile
Normal file
14
Dockerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM node:12.19.0-buster AS compile-image
|
||||
|
||||
WORKDIR /opt/ng
|
||||
COPY package.json /opt/ng/package.json
|
||||
RUN npm install
|
||||
RUN npm install -g @angular/cli
|
||||
ENV PATH="./node_modules/.bin:$PATH"
|
||||
|
||||
COPY . ./
|
||||
RUN ng build --configuration production --base-href /manage-testing/ --deploy-url /manage-testing/
|
||||
|
||||
FROM nginx
|
||||
COPY nginx.conf /etc/nginx/conf.d/default.conf
|
||||
COPY --from=compile-image /opt/ng/dist/ru-manage-testing /usr/share/nginx/html
|
||||
27
README.md
Normal file
27
README.md
Normal file
@@ -0,0 +1,27 @@
|
||||
# AngularFolderStructure
|
||||
|
||||
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 8.0.1.
|
||||
|
||||
## Development server
|
||||
|
||||
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`. The app will automatically reload if you change any of the source files.
|
||||
|
||||
## Code scaffolding
|
||||
|
||||
Run `ng generate component component-name` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module`.
|
||||
|
||||
## Build
|
||||
|
||||
Run `ng build` to build the project. The build artifacts will be stored in the `dist/` directory. Use the `--prod` flag for a production build.
|
||||
|
||||
## Running unit tests
|
||||
|
||||
Run `ng test` to execute the unit tests via [Karma](https://karma-runner.github.io).
|
||||
|
||||
## Running end-to-end tests
|
||||
|
||||
Run `ng e2e` to execute the end-to-end tests via [Protractor](http://www.protractortest.org/).
|
||||
|
||||
## Further help
|
||||
|
||||
To get more help on the Angular CLI use `ng help` or go check out the [Angular CLI README](https://github.com/angular/angular-cli/blob/master/README.md).
|
||||
167
angular.json
Normal file
167
angular.json
Normal file
@@ -0,0 +1,167 @@
|
||||
{
|
||||
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
|
||||
"version": 1,
|
||||
"newProjectRoot": "projects",
|
||||
"projects": {
|
||||
"ru-manage-testing": {
|
||||
"projectType": "application",
|
||||
"schematics": {
|
||||
"@schematics/angular:component": {
|
||||
"style": "scss",
|
||||
"changeDetection": "OnPush"
|
||||
}
|
||||
},
|
||||
"root": "",
|
||||
"sourceRoot": "src",
|
||||
"prefix": "app",
|
||||
"architect": {
|
||||
"build": {
|
||||
"builder": "@angular-builders/custom-webpack:browser",
|
||||
"options": {
|
||||
"aot": true,
|
||||
"outputPath": "dist/ru-manage-testing",
|
||||
"index": "src/index.html",
|
||||
"main": "src/main.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.app.json",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"customWebpackConfig": {
|
||||
"path": "webpack.config.js"
|
||||
}
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.prod.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
]
|
||||
},
|
||||
"ru": {
|
||||
"fileReplacements": [
|
||||
{
|
||||
"replace": "src/environments/environment.ts",
|
||||
"with": "src/environments/environment.ru.ts"
|
||||
}
|
||||
],
|
||||
"optimization": true,
|
||||
"outputHashing": "all",
|
||||
"sourceMap": false,
|
||||
"namedChunks": false,
|
||||
"aot": true,
|
||||
"extractLicenses": true,
|
||||
"vendorChunk": false,
|
||||
"buildOptimizer": true,
|
||||
"budgets": [
|
||||
{
|
||||
"type": "initial",
|
||||
"maximumWarning": "2mb",
|
||||
"maximumError": "5mb"
|
||||
},
|
||||
{
|
||||
"type": "anyComponentStyle",
|
||||
"maximumWarning": "6kb"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"serve": {
|
||||
"builder": "@angular-builders/custom-webpack:dev-server",
|
||||
"options": {
|
||||
"browserTarget": "ru-manage-testing:build"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"browserTarget": "ru-manage-testing:build:production"
|
||||
}
|
||||
}
|
||||
},
|
||||
"extract-i18n": {
|
||||
"builder": "@angular-devkit/build-angular:extract-i18n",
|
||||
"options": {
|
||||
"browserTarget": "ru-manage-testing:build"
|
||||
}
|
||||
},
|
||||
"test": {
|
||||
"builder": "@angular-builders/custom-webpack:karma",
|
||||
"options": {
|
||||
"main": "src/test.ts",
|
||||
"polyfills": "src/polyfills.ts",
|
||||
"tsConfig": "tsconfig.spec.json",
|
||||
"karmaConfig": "karma.conf.js",
|
||||
"assets": [
|
||||
"src/favicon.ico",
|
||||
"src/assets"
|
||||
],
|
||||
"styles": [
|
||||
"./node_modules/@angular/material/prebuilt-themes/indigo-pink.css",
|
||||
"src/styles.scss"
|
||||
],
|
||||
"scripts": [],
|
||||
"customWebpackConfig": {
|
||||
"path": "webpack.config.js"
|
||||
}
|
||||
}
|
||||
},
|
||||
"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": "ru-manage-testing:serve"
|
||||
},
|
||||
"configurations": {
|
||||
"production": {
|
||||
"devServerTarget": "ru-manage-testing:serve:production"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"defaultProject": "ru-manage-testing",
|
||||
"cli": {
|
||||
"analytics": "96b6b0a2-0a7f-4f8a-b945-c66b60e3c39c"
|
||||
}
|
||||
}
|
||||
31
bitbucket-pipelines.yml
Normal file
31
bitbucket-pipelines.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
pipelines:
|
||||
branches:
|
||||
master:
|
||||
- step:
|
||||
# runs-on:
|
||||
# - self.hosted
|
||||
# - linux
|
||||
# - 8x
|
||||
size: 2x
|
||||
services:
|
||||
- docker
|
||||
caches:
|
||||
- docker
|
||||
script: # Modify the commands below to build your repository.
|
||||
- docker login --username $DOCKER_USERNAME --password $DOCKER_PASSWORD
|
||||
- docker build -f Dockerfile -t 71dev/ru-manage-testing-web:dev .
|
||||
- docker push 71dev/ru-manage-testing-web:dev
|
||||
- step:
|
||||
# runs-on:
|
||||
# - self.hosted
|
||||
# - linux
|
||||
# - 8x
|
||||
name: deploy to kubernates
|
||||
image: atlassian/pipelines-kubectl
|
||||
script:
|
||||
- echo $KUBE_CONFIG_DELL | base64 -d > kubeconfig
|
||||
- kubectl --insecure-skip-tls-verify --kubeconfig=kubeconfig rollout restart deployment/ru-manage-testing-deployment -n ru
|
||||
definitions:
|
||||
services:
|
||||
docker:
|
||||
memory: 6144
|
||||
32
e2e/protractor.conf.js
Normal file
32
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
e2e/src/app.e2e-spec.ts
Normal file
23
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('Welcome to angular-folder-structure!');
|
||||
});
|
||||
|
||||
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
e2e/src/app.po.ts
Normal file
11
e2e/src/app.po.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { browser, by, element } from 'protractor';
|
||||
|
||||
export class AppPage {
|
||||
navigateTo() {
|
||||
return browser.get(browser.baseUrl) as Promise<any>;
|
||||
}
|
||||
|
||||
getTitleText() {
|
||||
return element(by.css('app-root h1')).getText() as Promise<string>;
|
||||
}
|
||||
}
|
||||
13
e2e/tsconfig.json
Normal file
13
e2e/tsconfig.json
Normal file
@@ -0,0 +1,13 @@
|
||||
{
|
||||
"extends": "../tsconfig.json",
|
||||
"compilerOptions": {
|
||||
"outDir": "../out-tsc/e2e",
|
||||
"module": "commonjs",
|
||||
"target": "es2018",
|
||||
"types": [
|
||||
"jasmine",
|
||||
"jasminewd2",
|
||||
"node"
|
||||
]
|
||||
}
|
||||
}
|
||||
32
karma.conf.js
Normal file
32
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/angular-folder-structure'),
|
||||
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
|
||||
});
|
||||
};
|
||||
9
nginx.conf
Normal file
9
nginx.conf
Normal file
@@ -0,0 +1,9 @@
|
||||
server {
|
||||
listen 8080;
|
||||
root /usr/share/nginx/html;
|
||||
include /etc/nginx/mime.types;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
35312
package-lock.json
generated
Normal file
35312
package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
72
package.json
Normal file
72
package.json
Normal file
@@ -0,0 +1,72 @@
|
||||
{
|
||||
"name": "angular-folder-structure",
|
||||
"version": "0.0.0",
|
||||
"scripts": {
|
||||
"ng": "ng",
|
||||
"start": "ng serve",
|
||||
"build": "ng build",
|
||||
"test": "ng test",
|
||||
"lint": "ng lint",
|
||||
"e2e": "ng e2e"
|
||||
},
|
||||
"private": true,
|
||||
"dependencies": {
|
||||
"@angular/animations": "~11.0.0",
|
||||
"@angular/cdk": "^11.2.7",
|
||||
"@angular/common": "~11.0.0",
|
||||
"@angular/compiler": "~11.0.0",
|
||||
"@angular/core": "~11.0.0",
|
||||
"@angular/forms": "~11.0.0",
|
||||
"@angular/material": "^11.2.7",
|
||||
"@angular/platform-browser": "~11.0.0",
|
||||
"@angular/platform-browser-dynamic": "~11.0.0",
|
||||
"@angular/router": "~11.0.0",
|
||||
"@auth0/angular-jwt": "5.0.2",
|
||||
"@briebug/jest-schematic": "^2.1.1",
|
||||
"@ngneat/tailwind": "^6.0.3",
|
||||
"@ngrx/effects": "^10.0.0",
|
||||
"@ngrx/router-store": "^10.0.0",
|
||||
"@ngrx/schematics": "^10.0.0",
|
||||
"@ngrx/store": "^10.0.0",
|
||||
"@ngrx/store-devtools": "^10.0.0",
|
||||
"@tinymce/tinymce-angular": "^4.2.2",
|
||||
"ngx-material-timepicker": "^5.5.3",
|
||||
"ngx-multiple-dates": "^13.1.0",
|
||||
"ngx-progressbar": "^6.1.1",
|
||||
"oidc-client": "^1.11.5",
|
||||
"rxjs": "~6.6.3",
|
||||
"sweetalert2": "^10.16.9",
|
||||
"tslib": "^2.0.0",
|
||||
"zone.js": "~0.10.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@angular-builders/custom-webpack": "11.1.1",
|
||||
"@angular-devkit/build-angular": "~0.1100.1",
|
||||
"@angular/cli": "~11.0.1",
|
||||
"@angular/compiler-cli": "~11.0.0",
|
||||
"@angular/language-service": "~11.0.0",
|
||||
"@tailwindcss/aspect-ratio": "0.2.0",
|
||||
"@tailwindcss/forms": "0.3.2",
|
||||
"@tailwindcss/line-clamp": "0.2.0",
|
||||
"@tailwindcss/typography": "0.4.0",
|
||||
"@types/jasmine": "~3.6.0",
|
||||
"@types/jasminewd2": "~2.0.3",
|
||||
"@types/node": "^12.11.1",
|
||||
"autoprefixer": "^10.2.5",
|
||||
"codelyzer": "^6.0.0",
|
||||
"jasmine-core": "~3.6.0",
|
||||
"jasmine-spec-reporter": "~5.0.0",
|
||||
"karma": "~5.1.1",
|
||||
"karma-chrome-launcher": "~3.1.0",
|
||||
"karma-coverage-istanbul-reporter": "~3.0.2",
|
||||
"karma-jasmine": "~4.0.0",
|
||||
"karma-jasmine-html-reporter": "^1.5.0",
|
||||
"postcss": "^8.2.9",
|
||||
"postcss-ng-tailwind-in-components": "0.0.4",
|
||||
"protractor": "~7.0.0",
|
||||
"tailwindcss": "^2.0.4",
|
||||
"ts-node": "~7.0.0",
|
||||
"tslint": "~6.1.0",
|
||||
"typescript": "~4.0.5"
|
||||
}
|
||||
}
|
||||
610
report.20210410.171439.4055.0.001.json
Normal file
610
report.20210410.171439.4055.0.001.json
Normal file
@@ -0,0 +1,610 @@
|
||||
|
||||
{
|
||||
"header": {
|
||||
"reportVersion": 2,
|
||||
"event": "Allocation failed - JavaScript heap out of memory",
|
||||
"trigger": "FatalError",
|
||||
"filename": "report.20210410.171439.4055.0.001.json",
|
||||
"dumpEventTime": "2021-04-10T17:14:39Z",
|
||||
"dumpEventTimeStamp": "1618049679328",
|
||||
"processId": 4055,
|
||||
"threadId": null,
|
||||
"cwd": "/Users/phet/Documents/angular/ru-manage-testing",
|
||||
"commandLine": [
|
||||
"node",
|
||||
"/usr/local/bin/ng",
|
||||
"serve",
|
||||
"--hmr"
|
||||
],
|
||||
"nodejsVersion": "v12.16.3",
|
||||
"wordSize": 64,
|
||||
"arch": "x64",
|
||||
"platform": "darwin",
|
||||
"componentVersions": {
|
||||
"node": "12.16.3",
|
||||
"v8": "7.8.279.23-node.35",
|
||||
"uv": "1.34.2",
|
||||
"zlib": "1.2.11",
|
||||
"brotli": "1.0.7",
|
||||
"ares": "1.16.0",
|
||||
"modules": "72",
|
||||
"nghttp2": "1.40.0",
|
||||
"napi": "5",
|
||||
"llhttp": "2.0.4",
|
||||
"http_parser": "2.9.3",
|
||||
"openssl": "1.1.1g",
|
||||
"cldr": "36.0",
|
||||
"icu": "65.1",
|
||||
"tz": "2019c",
|
||||
"unicode": "12.1"
|
||||
},
|
||||
"release": {
|
||||
"name": "node",
|
||||
"lts": "Erbium",
|
||||
"headersUrl": "https://nodejs.org/download/release/v12.16.3/node-v12.16.3-headers.tar.gz",
|
||||
"sourceUrl": "https://nodejs.org/download/release/v12.16.3/node-v12.16.3.tar.gz"
|
||||
},
|
||||
"osName": "Darwin",
|
||||
"osRelease": "19.6.0",
|
||||
"osVersion": "Darwin Kernel Version 19.6.0: Thu Jun 18 20:49:00 PDT 2020; root:xnu-6153.141.1~1/RELEASE_X86_64",
|
||||
"osMachine": "x86_64",
|
||||
"cpus": [
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz",
|
||||
"speed": 1600,
|
||||
"user": 2250440,
|
||||
"nice": 0,
|
||||
"sys": 736020,
|
||||
"idle": 3175690,
|
||||
"irq": 0
|
||||
},
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz",
|
||||
"speed": 1600,
|
||||
"user": 737160,
|
||||
"nice": 0,
|
||||
"sys": 304160,
|
||||
"idle": 5120310,
|
||||
"irq": 0
|
||||
},
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz",
|
||||
"speed": 1600,
|
||||
"user": 2222370,
|
||||
"nice": 0,
|
||||
"sys": 662170,
|
||||
"idle": 3277080,
|
||||
"irq": 0
|
||||
},
|
||||
{
|
||||
"model": "Intel(R) Core(TM) i5-8210Y CPU @ 1.60GHz",
|
||||
"speed": 1600,
|
||||
"user": 683610,
|
||||
"nice": 0,
|
||||
"sys": 263420,
|
||||
"idle": 5214590,
|
||||
"irq": 0
|
||||
}
|
||||
],
|
||||
"networkInterfaces": [
|
||||
{
|
||||
"name": "lo0",
|
||||
"internal": true,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"address": "127.0.0.1",
|
||||
"netmask": "255.0.0.0",
|
||||
"family": "IPv4"
|
||||
},
|
||||
{
|
||||
"name": "lo0",
|
||||
"internal": true,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"address": "::1",
|
||||
"netmask": "ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff",
|
||||
"family": "IPv6",
|
||||
"scopeid": 0
|
||||
},
|
||||
{
|
||||
"name": "lo0",
|
||||
"internal": true,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"address": "fe80::1",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 1
|
||||
},
|
||||
{
|
||||
"name": "en3",
|
||||
"internal": false,
|
||||
"mac": "ac:de:48:00:11:22",
|
||||
"address": "fe80::aede:48ff:fe00:1122",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 4
|
||||
},
|
||||
{
|
||||
"name": "en0",
|
||||
"internal": false,
|
||||
"mac": "38:f9:d3:36:7e:22",
|
||||
"address": "fe80::14f5:1b7f:bb09:1775",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 6
|
||||
},
|
||||
{
|
||||
"name": "en0",
|
||||
"internal": false,
|
||||
"mac": "38:f9:d3:36:7e:22",
|
||||
"address": "192.168.43.131",
|
||||
"netmask": "255.255.255.0",
|
||||
"family": "IPv4"
|
||||
},
|
||||
{
|
||||
"name": "awdl0",
|
||||
"internal": false,
|
||||
"mac": "4e:9c:55:57:0a:fa",
|
||||
"address": "fe80::4c9c:55ff:fe57:afa",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 11
|
||||
},
|
||||
{
|
||||
"name": "llw0",
|
||||
"internal": false,
|
||||
"mac": "4e:9c:55:57:0a:fa",
|
||||
"address": "fe80::4c9c:55ff:fe57:afa",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 12
|
||||
},
|
||||
{
|
||||
"name": "utun0",
|
||||
"internal": false,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"address": "fe80::ba73:9d23:3603:769c",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 13
|
||||
},
|
||||
{
|
||||
"name": "utun1",
|
||||
"internal": false,
|
||||
"mac": "00:00:00:00:00:00",
|
||||
"address": "fe80::f5dd:88c5:68a8:9f21",
|
||||
"netmask": "ffff:ffff:ffff:ffff::",
|
||||
"family": "IPv6",
|
||||
"scopeid": 14
|
||||
}
|
||||
],
|
||||
"host": "Phet"
|
||||
},
|
||||
"javascriptStack": {
|
||||
"message": "No stack.",
|
||||
"stack": [
|
||||
"Unavailable."
|
||||
]
|
||||
},
|
||||
"nativeStack": [
|
||||
{
|
||||
"pc": "0x0000000100164e03",
|
||||
"symbol": "report::TriggerNodeReport(v8::Isolate*, node::Environment*, char const*, char const*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, v8::Local<v8::String>) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x000000010008645a",
|
||||
"symbol": "node::OnFatalError(char const*, char const*) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x0000000100187c07",
|
||||
"symbol": "v8::Utils::ReportOOMFailure(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x0000000100187ba7",
|
||||
"symbol": "v8::internal::V8::FatalProcessOutOfMemory(v8::internal::Isolate*, char const*, bool) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x0000000100315955",
|
||||
"symbol": "v8::internal::Heap::FatalProcessOutOfMemory(char const*) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x00000001003171ca",
|
||||
"symbol": "v8::internal::Heap::RecomputeLimits(v8::internal::GarbageCollector) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x0000000100313bfc",
|
||||
"symbol": "v8::internal::Heap::PerformGarbageCollection(v8::internal::GarbageCollector, v8::GCCallbackFlags) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x00000001003119fe",
|
||||
"symbol": "v8::internal::Heap::CollectGarbage(v8::internal::AllocationSpace, v8::internal::GarbageCollectionReason, v8::GCCallbackFlags) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x0000000100311f63",
|
||||
"symbol": "v8::internal::Heap::CollectAllAvailableGarbage(v8::internal::GarbageCollectionReason) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x000000010031d98e",
|
||||
"symbol": "v8::internal::Heap::AllocateRawWithRetryOrFail(int, v8::internal::AllocationType, v8::internal::AllocationOrigin, v8::internal::AllocationAlignment) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x00000001002e9fed",
|
||||
"symbol": "v8::internal::Factory::NewFixedArrayWithFiller(v8::internal::RootIndex, int, v8::internal::Object, v8::internal::AllocationType) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x0000000100465fe4",
|
||||
"symbol": "v8::internal::(anonymous namespace)::ElementsAccessorBase<v8::internal::(anonymous namespace)::FastPackedObjectElementsAccessor, v8::internal::(anonymous namespace)::ElementsKindTraits<(v8::internal::ElementsKind)2> >::GrowCapacity(v8::internal::Handle<v8::internal::JSObject>, unsigned int) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x0000000100617f74",
|
||||
"symbol": "v8::internal::Runtime_GrowArrayElements(int, unsigned long*, v8::internal::Isolate*) [/usr/local/bin/node]"
|
||||
},
|
||||
{
|
||||
"pc": "0x000000010097cc39",
|
||||
"symbol": "Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_NoBuiltinExit [/usr/local/bin/node]"
|
||||
}
|
||||
],
|
||||
"javascriptHeap": {
|
||||
"totalMemory": 2188132352,
|
||||
"totalCommittedMemory": 2166641768,
|
||||
"usedMemory": 2104702952,
|
||||
"availableMemory": 43201536,
|
||||
"memoryLimit": 2197815296,
|
||||
"heapSpaces": {
|
||||
"read_only_space": {
|
||||
"memorySize": 262144,
|
||||
"committedMemory": 33088,
|
||||
"capacity": 32808,
|
||||
"used": 32808,
|
||||
"available": 0
|
||||
},
|
||||
"new_space": {
|
||||
"memorySize": 33554432,
|
||||
"committedMemory": 12589720,
|
||||
"capacity": 16759296,
|
||||
"used": 0,
|
||||
"available": 16759296
|
||||
},
|
||||
"old_space": {
|
||||
"memorySize": 1998987264,
|
||||
"committedMemory": 1998855896,
|
||||
"capacity": 1953173384,
|
||||
"used": 1953173384,
|
||||
"available": 0
|
||||
},
|
||||
"code_space": {
|
||||
"memorySize": 3837952,
|
||||
"committedMemory": 3673184,
|
||||
"capacity": 3442176,
|
||||
"used": 3442176,
|
||||
"available": 0
|
||||
},
|
||||
"map_space": {
|
||||
"memorySize": 6819840,
|
||||
"committedMemory": 6819160,
|
||||
"capacity": 3669760,
|
||||
"used": 3669760,
|
||||
"available": 0
|
||||
},
|
||||
"large_object_space": {
|
||||
"memorySize": 144048128,
|
||||
"committedMemory": 144048128,
|
||||
"capacity": 143840280,
|
||||
"used": 143840280,
|
||||
"available": 0
|
||||
},
|
||||
"code_large_object_space": {
|
||||
"memorySize": 622592,
|
||||
"committedMemory": 622592,
|
||||
"capacity": 544544,
|
||||
"used": 544544,
|
||||
"available": 0
|
||||
},
|
||||
"new_large_object_space": {
|
||||
"memorySize": 0,
|
||||
"committedMemory": 0,
|
||||
"capacity": 16759296,
|
||||
"used": 0,
|
||||
"available": 16759296
|
||||
}
|
||||
}
|
||||
},
|
||||
"resourceUsage": {
|
||||
"userCpuSeconds": 518.762,
|
||||
"kernelCpuSeconds": 24.5595,
|
||||
"cpuConsumptionPercent": 47.4516,
|
||||
"maxRss": 2293747417088,
|
||||
"pageFaults": {
|
||||
"IORequired": 182,
|
||||
"IONotRequired": 4483845
|
||||
},
|
||||
"fsActivity": {
|
||||
"reads": 0,
|
||||
"writes": 0
|
||||
}
|
||||
},
|
||||
"libuv": [
|
||||
],
|
||||
"workers": [
|
||||
],
|
||||
"environmentVariables": {
|
||||
"TERM_PROGRAM": "vscode",
|
||||
"TERM": "xterm-256color",
|
||||
"SHELL": "/bin/bash",
|
||||
"TMPDIR": "/var/folders/qh/0k2vch4538v3skzch3k_dlgc0000gn/T/",
|
||||
"TERM_PROGRAM_VERSION": "1.55.1",
|
||||
"ORIGINAL_XDG_CURRENT_DESKTOP": "undefined",
|
||||
"USER": "phet",
|
||||
"COMMAND_MODE": "unix2003",
|
||||
"SSH_AUTH_SOCK": "/private/tmp/com.apple.launchd.b4OjLajf0w/Listeners",
|
||||
"__CF_USER_TEXT_ENCODING": "0x1F5:0x0:0x0",
|
||||
"PATH": "/Users/phet/Documents/flutter/flutter/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/share/dotnet:~/.dotnet/tools:/Users/phet/Documents/flutter/flutter/bin",
|
||||
"LaunchInstanceID": "F7C2A2FF-30F8-4F7F-9022-8959AF9ADAA8",
|
||||
"PWD": "/Users/phet/Documents/angular/ru-manage-testing",
|
||||
"LANG": "en_US.UTF-8",
|
||||
"XPC_FLAGS": "0x0",
|
||||
"XPC_SERVICE_NAME": "0",
|
||||
"SHLVL": "2",
|
||||
"HOME": "/Users/phet",
|
||||
"VSCODE_GIT_ASKPASS_MAIN": "/Users/phet/Desktop/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass-main.js",
|
||||
"LOGNAME": "phet",
|
||||
"VSCODE_GIT_IPC_HANDLE": "/var/folders/qh/0k2vch4538v3skzch3k_dlgc0000gn/T/vscode-git-df91da68cd.sock",
|
||||
"VSCODE_GIT_ASKPASS_NODE": "/Users/phet/Desktop/Visual Studio Code.app/Contents/Frameworks/Code Helper (Renderer).app/Contents/MacOS/Code Helper (Renderer)",
|
||||
"GIT_ASKPASS": "/Users/phet/Desktop/Visual Studio Code.app/Contents/Resources/app/extensions/git/dist/askpass.sh",
|
||||
"SECURITYSESSIONID": "186a6",
|
||||
"COLORTERM": "truecolor",
|
||||
"_": "/usr/local/bin/ng",
|
||||
"BROWSERSLIST_IGNORE_OLD_DATA": "1",
|
||||
"WEBPACK_DEV_SERVER": "true"
|
||||
},
|
||||
"userLimits": {
|
||||
"core_file_size_blocks": {
|
||||
"soft": 0,
|
||||
"hard": "unlimited"
|
||||
},
|
||||
"data_seg_size_kbytes": {
|
||||
"soft": "unlimited",
|
||||
"hard": "unlimited"
|
||||
},
|
||||
"file_size_blocks": {
|
||||
"soft": "unlimited",
|
||||
"hard": "unlimited"
|
||||
},
|
||||
"max_locked_memory_bytes": {
|
||||
"soft": "unlimited",
|
||||
"hard": "unlimited"
|
||||
},
|
||||
"max_memory_size_kbytes": {
|
||||
"soft": "unlimited",
|
||||
"hard": "unlimited"
|
||||
},
|
||||
"open_files": {
|
||||
"soft": 10240,
|
||||
"hard": "unlimited"
|
||||
},
|
||||
"stack_size_bytes": {
|
||||
"soft": 8388608,
|
||||
"hard": 67104768
|
||||
},
|
||||
"cpu_time_seconds": {
|
||||
"soft": "unlimited",
|
||||
"hard": "unlimited"
|
||||
},
|
||||
"max_user_processes": {
|
||||
"soft": 1392,
|
||||
"hard": 2088
|
||||
},
|
||||
"virtual_memory_kbytes": {
|
||||
"soft": "unlimited",
|
||||
"hard": "unlimited"
|
||||
}
|
||||
},
|
||||
"sharedObjects": [
|
||||
"/usr/local/bin/node",
|
||||
"/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation",
|
||||
"/usr/lib/libSystem.B.dylib",
|
||||
"/usr/lib/libc++.1.dylib",
|
||||
"/usr/lib/libobjc.A.dylib",
|
||||
"/usr/lib/libfakelink.dylib",
|
||||
"/usr/lib/libDiagnosticMessagesClient.dylib",
|
||||
"/usr/lib/libicucore.A.dylib",
|
||||
"/usr/lib/libz.1.dylib",
|
||||
"/usr/lib/libc++abi.dylib",
|
||||
"/usr/lib/system/libcache.dylib",
|
||||
"/usr/lib/system/libcommonCrypto.dylib",
|
||||
"/usr/lib/system/libcompiler_rt.dylib",
|
||||
"/usr/lib/system/libcopyfile.dylib",
|
||||
"/usr/lib/system/libcorecrypto.dylib",
|
||||
"/usr/lib/system/libdispatch.dylib",
|
||||
"/usr/lib/system/libdyld.dylib",
|
||||
"/usr/lib/system/libkeymgr.dylib",
|
||||
"/usr/lib/system/liblaunch.dylib",
|
||||
"/usr/lib/system/libmacho.dylib",
|
||||
"/usr/lib/system/libquarantine.dylib",
|
||||
"/usr/lib/system/libremovefile.dylib",
|
||||
"/usr/lib/system/libsystem_asl.dylib",
|
||||
"/usr/lib/system/libsystem_blocks.dylib",
|
||||
"/usr/lib/system/libsystem_c.dylib",
|
||||
"/usr/lib/system/libsystem_configuration.dylib",
|
||||
"/usr/lib/system/libsystem_coreservices.dylib",
|
||||
"/usr/lib/system/libsystem_darwin.dylib",
|
||||
"/usr/lib/system/libsystem_dnssd.dylib",
|
||||
"/usr/lib/system/libsystem_featureflags.dylib",
|
||||
"/usr/lib/system/libsystem_info.dylib",
|
||||
"/usr/lib/system/libsystem_m.dylib",
|
||||
"/usr/lib/system/libsystem_malloc.dylib",
|
||||
"/usr/lib/system/libsystem_networkextension.dylib",
|
||||
"/usr/lib/system/libsystem_notify.dylib",
|
||||
"/usr/lib/system/libsystem_sandbox.dylib",
|
||||
"/usr/lib/system/libsystem_secinit.dylib",
|
||||
"/usr/lib/system/libsystem_kernel.dylib",
|
||||
"/usr/lib/system/libsystem_platform.dylib",
|
||||
"/usr/lib/system/libsystem_pthread.dylib",
|
||||
"/usr/lib/system/libsystem_symptoms.dylib",
|
||||
"/usr/lib/system/libsystem_trace.dylib",
|
||||
"/usr/lib/system/libunwind.dylib",
|
||||
"/usr/lib/system/libxpc.dylib",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices",
|
||||
"/System/Library/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics",
|
||||
"/System/Library/Frameworks/CoreText.framework/Versions/A/CoreText",
|
||||
"/System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO",
|
||||
"/System/Library/Frameworks/ColorSync.framework/Versions/A/ColorSync",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSyncLegacy.framework/Versions/A/ColorSyncLegacy",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis",
|
||||
"/System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight",
|
||||
"/System/Library/PrivateFrameworks/FontServices.framework/libFontParser.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate",
|
||||
"/System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface",
|
||||
"/usr/lib/libxml2.2.dylib",
|
||||
"/System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork",
|
||||
"/System/Library/Frameworks/Foundation.framework/Versions/C/Foundation",
|
||||
"/System/Library/PrivateFrameworks/WatchdogClient.framework/Versions/A/WatchdogClient",
|
||||
"/usr/lib/libcompression.dylib",
|
||||
"/System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration",
|
||||
"/System/Library/Frameworks/CoreDisplay.framework/Versions/A/CoreDisplay",
|
||||
"/System/Library/PrivateFrameworks/IOAccelerator.framework/Versions/A/IOAccelerator",
|
||||
"/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit",
|
||||
"/System/Library/Frameworks/Metal.framework/Versions/A/Metal",
|
||||
"/System/Library/Frameworks/MetalPerformanceShaders.framework/Versions/A/MetalPerformanceShaders",
|
||||
"/System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport",
|
||||
"/System/Library/Frameworks/Security.framework/Versions/A/Security",
|
||||
"/System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore",
|
||||
"/usr/lib/libbsm.0.dylib",
|
||||
"/usr/lib/liblzma.5.dylib",
|
||||
"/usr/lib/libauto.dylib",
|
||||
"/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration",
|
||||
"/usr/lib/libarchive.2.dylib",
|
||||
"/usr/lib/liblangid.dylib",
|
||||
"/usr/lib/libCRFSuite.dylib",
|
||||
"/usr/lib/libenergytrace.dylib",
|
||||
"/usr/lib/system/libkxld.dylib",
|
||||
"/System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression",
|
||||
"/usr/lib/libcoretls.dylib",
|
||||
"/usr/lib/libcoretls_cfhelpers.dylib",
|
||||
"/usr/lib/libpam.2.dylib",
|
||||
"/usr/lib/libsqlite3.dylib",
|
||||
"/usr/lib/libxar.1.dylib",
|
||||
"/usr/lib/libbz2.1.0.dylib",
|
||||
"/usr/lib/libiconv.2.dylib",
|
||||
"/usr/lib/libcharset.1.dylib",
|
||||
"/usr/lib/libnetwork.dylib",
|
||||
"/usr/lib/libpcap.A.dylib",
|
||||
"/usr/lib/libapple_nghttp2.dylib",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/FSEvents.framework/Versions/A/FSEvents",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices",
|
||||
"/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SharedFileList.framework/Versions/A/SharedFileList",
|
||||
"/System/Library/Frameworks/NetFS.framework/Versions/A/NetFS",
|
||||
"/System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth",
|
||||
"/System/Library/PrivateFrameworks/login.framework/Versions/A/Frameworks/loginsupport.framework/Versions/A/loginsupport",
|
||||
"/System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC",
|
||||
"/System/Library/PrivateFrameworks/CoreNLP.framework/Versions/A/CoreNLP",
|
||||
"/System/Library/PrivateFrameworks/MetadataUtilities.framework/Versions/A/MetadataUtilities",
|
||||
"/usr/lib/libmecabra.dylib",
|
||||
"/usr/lib/libmecab.dylib",
|
||||
"/usr/lib/libgermantok.dylib",
|
||||
"/usr/lib/libThaiTokenizer.dylib",
|
||||
"/usr/lib/libChineseTokenizer.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLinearAlgebra.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparseBLAS.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libQuadrature.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBNNS.dylib",
|
||||
"/System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libSparse.dylib",
|
||||
"/System/Library/PrivateFrameworks/LanguageModeling.framework/Versions/A/LanguageModeling",
|
||||
"/System/Library/PrivateFrameworks/CoreEmoji.framework/Versions/A/CoreEmoji",
|
||||
"/System/Library/PrivateFrameworks/LinguisticData.framework/Versions/A/LinguisticData",
|
||||
"/System/Library/PrivateFrameworks/Lexicon.framework/Versions/A/Lexicon",
|
||||
"/usr/lib/libcmph.dylib",
|
||||
"/System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory",
|
||||
"/System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory",
|
||||
"/System/Library/PrivateFrameworks/APFS.framework/Versions/A/APFS",
|
||||
"/System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation",
|
||||
"/usr/lib/libutil.dylib",
|
||||
"/System/Library/PrivateFrameworks/CoreServicesStore.framework/Versions/A/CoreServicesStore",
|
||||
"/System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement",
|
||||
"/System/Library/PrivateFrameworks/BackgroundTaskManagement.framework/Versions/A/BackgroundTaskManagement",
|
||||
"/usr/lib/libxslt.1.dylib",
|
||||
"/System/Library/PrivateFrameworks/GPUWrangler.framework/Versions/A/GPUWrangler",
|
||||
"/System/Library/PrivateFrameworks/IOPresentment.framework/Versions/A/IOPresentment",
|
||||
"/System/Library/PrivateFrameworks/DSExternalDisplay.framework/Versions/A/DSExternalDisplay",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreFSCache.dylib",
|
||||
"/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSCore.framework/Versions/A/MPSCore",
|
||||
"/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSImage.framework/Versions/A/MPSImage",
|
||||
"/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNeuralNetwork.framework/Versions/A/MPSNeuralNetwork",
|
||||
"/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSMatrix.framework/Versions/A/MPSMatrix",
|
||||
"/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSRayIntersector.framework/Versions/A/MPSRayIntersector",
|
||||
"/System/Library/Frameworks/MetalPerformanceShaders.framework/Frameworks/MPSNDArray.framework/Versions/A/MPSNDArray",
|
||||
"/System/Library/PrivateFrameworks/MetalTools.framework/Versions/A/MetalTools",
|
||||
"/System/Library/PrivateFrameworks/AggregateDictionary.framework/Versions/A/AggregateDictionary",
|
||||
"/System/Library/PrivateFrameworks/CoreAnalytics.framework/Versions/A/CoreAnalytics",
|
||||
"/System/Library/PrivateFrameworks/AppleSauce.framework/Versions/A/AppleSauce",
|
||||
"/usr/lib/libMobileGestalt.dylib",
|
||||
"/System/Library/PrivateFrameworks/AppleSystemInfo.framework/Versions/A/AppleSystemInfo",
|
||||
"/usr/lib/libIOReport.dylib",
|
||||
"/System/Library/Frameworks/CoreImage.framework/Versions/A/CoreImage",
|
||||
"/System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL",
|
||||
"/System/Library/PrivateFrameworks/GraphVisualizer.framework/Versions/A/GraphVisualizer",
|
||||
"/System/Library/PrivateFrameworks/FaceCore.framework/Versions/A/FaceCore",
|
||||
"/System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL",
|
||||
"/usr/lib/libFosl_dynamic.dylib",
|
||||
"/System/Library/PrivateFrameworks/OTSVG.framework/Versions/A/OTSVG",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib",
|
||||
"/usr/lib/libate.dylib",
|
||||
"/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib",
|
||||
"/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib",
|
||||
"/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib",
|
||||
"/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib",
|
||||
"/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib",
|
||||
"/System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib",
|
||||
"/usr/lib/libexpat.1.dylib",
|
||||
"/System/Library/PrivateFrameworks/AppleJPEG.framework/Versions/A/AppleJPEG",
|
||||
"/System/Library/PrivateFrameworks/FontServices.framework/libhvf.dylib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib",
|
||||
"/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib",
|
||||
"/usr/lib/libncurses.5.4.dylib",
|
||||
"/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATSUI.framework/Versions/A/ATSUI",
|
||||
"/usr/lib/libcups.2.dylib",
|
||||
"/System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos",
|
||||
"/System/Library/Frameworks/GSS.framework/Versions/A/GSS",
|
||||
"/usr/lib/libresolv.9.dylib",
|
||||
"/System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal",
|
||||
"/System/Library/Frameworks/Kerberos.framework/Versions/A/Libraries/libHeimdalProxy.dylib",
|
||||
"/usr/lib/libheimdal-asn1.dylib",
|
||||
"/System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth",
|
||||
"/System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio",
|
||||
"/System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox",
|
||||
"/System/Library/PrivateFrameworks/AssertionServices.framework/Versions/A/AssertionServices",
|
||||
"/System/Library/PrivateFrameworks/AudioToolboxCore.framework/Versions/A/AudioToolboxCore",
|
||||
"/System/Library/PrivateFrameworks/caulk.framework/Versions/A/caulk",
|
||||
"/System/Library/PrivateFrameworks/BaseBoard.framework/Versions/A/BaseBoard",
|
||||
"/System/Library/PrivateFrameworks/RunningBoardServices.framework/Versions/A/RunningBoardServices",
|
||||
"/System/Library/PrivateFrameworks/PersistentConnection.framework/Versions/A/PersistentConnection",
|
||||
"/System/Library/PrivateFrameworks/ProtocolBuffer.framework/Versions/A/ProtocolBuffer",
|
||||
"/System/Library/PrivateFrameworks/CommonUtilities.framework/Versions/A/CommonUtilities",
|
||||
"/System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom",
|
||||
"/usr/lib/libAudioToolboxUtility.dylib",
|
||||
"/System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal",
|
||||
"/Users/phet/Documents/angular/ru-manage-testing/node_modules/webpack-dev-server/node_modules/fsevents/build/Release/fse.node",
|
||||
"/Users/phet/Documents/angular/ru-manage-testing/node_modules/fsevents/fsevents.node"
|
||||
]
|
||||
}
|
||||
613
src/app/app-routing.module.ts
Normal file
613
src/app/app-routing.module.ts
Normal file
@@ -0,0 +1,613 @@
|
||||
import { NgModule } from "@angular/core";
|
||||
import { Routes, RouterModule } from "@angular/router";
|
||||
import { MainLayoutComponent } from "./layout/main-layout/main-layout.component";
|
||||
import { AuthGuard } from "./core/guards/auth.guard";
|
||||
import { settingFinanceRoutes } from "./feature/settings-finance/routes";
|
||||
import { examRegisterRoutes } from "./feature/exam-register/routes";
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: "",
|
||||
pathMatch: "full",
|
||||
redirectTo: "/setting-exam",
|
||||
},
|
||||
{
|
||||
path: "auth",
|
||||
loadChildren: () =>
|
||||
import("./feature/auth-callback/auth-callback.module").then(
|
||||
(x) => x.AuthCallbackModule
|
||||
),
|
||||
},
|
||||
{
|
||||
path: "",
|
||||
component: MainLayoutComponent,
|
||||
canActivate: [AuthGuard],
|
||||
canActivateChild: [AuthGuard],
|
||||
children: [
|
||||
...settingFinanceRoutes,
|
||||
...examRegisterRoutes,
|
||||
{
|
||||
path: "home",
|
||||
loadChildren: () =>
|
||||
import("./feature/default/default.module").then((m) => m.DefaultModule),
|
||||
},
|
||||
{
|
||||
path: "change-exam-room",
|
||||
loadChildren: () =>
|
||||
import("./feature/change-exam-room/change-exam-room.module").then((m) => m.ChangeExamRoomModule),
|
||||
data: {
|
||||
menu: 'ย้ายห้องสอบ',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "change-password",
|
||||
loadChildren: () =>
|
||||
import("./feature/change-password/change-password.module").then((m) => m.ChangePasswodModule),
|
||||
},
|
||||
{
|
||||
path: "report",
|
||||
loadChildren: () =>
|
||||
import("./feature/report/report.module").then((m) => m.ReportModule),
|
||||
data: {
|
||||
menu: 'รายงาน',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "import-payment",
|
||||
loadChildren: () =>
|
||||
import("./feature/manage-payment/import/import.module").then(
|
||||
(m) => m.ImportModule
|
||||
),
|
||||
data: {
|
||||
menu: 'จัดการรายการชำระเงิน',
|
||||
sub_menu: 'นำเข้ารายการชำระเงิน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "confirm-payment",
|
||||
loadChildren: () =>
|
||||
import("./feature/manage-payment/confirm/confirm.module").then(
|
||||
(m) => m.ConfirmModule
|
||||
),
|
||||
data: {
|
||||
menu: 'จัดการรายการชำระเงิน',
|
||||
sub_menu: 'ยืนยันรายการชำระเงิน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "manage-exam-officer",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/exam-setting/manage-exam-officer/manage-exam-officer.module"
|
||||
).then((m) => m.ManageExamOfficerModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลการสอบ',
|
||||
sub_menu: 'กำหนดกรรมการคุมสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "create-user",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/set-permission/create-user/create-user.module"
|
||||
).then((m) => m.CreateUserModule),
|
||||
data: {
|
||||
menu: 'กำหนดสิทธิ์',
|
||||
sub_menu: 'สร้าง User'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "set-user",
|
||||
loadChildren: () =>
|
||||
import("./feature/set-permission/set-user/set-user.module").then(
|
||||
(m) => m.SetUserModule
|
||||
),
|
||||
data: {
|
||||
menu: 'กำหนดสิทธิ์',
|
||||
sub_menu: 'User ผู้ใช้งาน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "set-role",
|
||||
loadChildren: () =>
|
||||
import("./feature/set-permission/set-role/set-role.module").then(
|
||||
(m) => m.SetRoleModule
|
||||
),
|
||||
data: {
|
||||
menu: 'กำหนดสิทธิ์',
|
||||
sub_menu: 'กลุ่มสิทธิ์'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "change-exam-day",
|
||||
loadChildren: () =>
|
||||
import("./feature/change-exam-day/change-exam-day.module").then(
|
||||
(m) => m.ChangeExamDayModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ขออนุมัติเปลี่ยนวันสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "testing-field",
|
||||
loadChildren: () =>
|
||||
import("./feature/settings/testing-field/testing-field.module").then(
|
||||
(m) => m.TestingFieldModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'จัดการสนามสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "candidate-list",
|
||||
loadChildren: () =>
|
||||
import("./feature/candidate-list/candidate-list/candidate-list.module").then(
|
||||
(m) => m.CandidateListModule
|
||||
),
|
||||
data: {
|
||||
menu: 'จัดการรายชื่อผู้เข้าสอบ',
|
||||
sub_menu: 'ข้อมูลผู้สอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "check-candidate-list",
|
||||
loadChildren: () =>
|
||||
import("./feature/candidate-list/check-candidate-list/check-candidate-list.module").then(
|
||||
(m) => m.CheckCandidateListModule
|
||||
),
|
||||
data: {
|
||||
menu: 'จัดการรายชื่อผู้เข้าสอบ',
|
||||
sub_menu: 'สร้างข้อสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "approve-examination",
|
||||
loadChildren: () =>
|
||||
import("./feature/approve-examination/approve-examination.module").then(
|
||||
(m) => m.ApproveExaminationModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ปล่อยข้อสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "change-exam-information",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/exam-setting/change-exam-information/change-exam-information.module"
|
||||
).then((m) => m.ChangeExamInformationModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลการสอบ',
|
||||
sub_menu: 'ขยายรอบสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "grade-summary",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/exam-setting/grade-summary/grade-summary.module"
|
||||
).then((m) => m.GradeSummaryModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลการสอบ',
|
||||
sub_menu: 'กำหนดเกณฑ์คะแนน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "random-questions",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/exam-setting/random-questions/random-questions.module"
|
||||
).then((m) => m.RandomQuestionsModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลการสอบ',
|
||||
sub_menu: 'สร้างเงื่อนไขการสุ่มคำถาม'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "academic-semesters",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/settings/academic-semesters/academic-semesters.module"
|
||||
).then((m) => m.AcademicSemestersModule),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'ภาคการศึกษา'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "department",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/settings/department/department.module"
|
||||
).then((m) => m.DepartmentModule),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'สร้างภาควิชา'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "academic-years",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/settings/academic-years/academic-years.module"
|
||||
).then((m) => m.AcademicYearsModule),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'ปีการศึกษา'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "testing-vdos",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/settings/testing-vdos/testing-vdos.module"
|
||||
).then((m) => m.TestingVdosModule),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'วิดีโอ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "faculties",
|
||||
loadChildren: () =>
|
||||
import("./feature/settings/faculties/faculties.module").then(
|
||||
(m) => m.FacultiesModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'ข้อมูลหน่วยงานคณะ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "subject-type",
|
||||
loadChildren: () =>
|
||||
import("./feature/settings/typesubject/typesubject.module").then(
|
||||
(m) => m.TypesubjectModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'ประเภทวิชา'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "calendars",
|
||||
loadChildren: () =>
|
||||
import("./feature/settings/calendars/calendars.module").then(
|
||||
(m) => m.CalendarsModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'รายการปฎิทิน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "branch",
|
||||
loadChildren: () =>
|
||||
import("./feature/settings/testcenter/testcenter.module").then(
|
||||
(m) => m.TestcenterModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'สร้างศูนย์สอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "online-counter",
|
||||
loadChildren: () =>
|
||||
import("./feature/settings/online-counter/online-counter.module").then(
|
||||
(m) => m.OnlineCounterModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'ชื่อเค้าเตอร์รับเงินออนไลน์'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "signature",
|
||||
loadChildren: () =>
|
||||
import("./feature/settings/signature/signature.module").then(
|
||||
(m) => m.SignatureModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'ลายเซ็นผู้รับเงิน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "candidate-payment-status",
|
||||
loadChildren: () =>
|
||||
import("./feature/candidate-payment-status/candidate-payment-status.module").then(
|
||||
(m) => m.CandidatePaymentStatusModule
|
||||
),
|
||||
data: {
|
||||
menu: 'จัดการรายชื่อผู้เข้าสอบ',
|
||||
sub_menu: 'สถานะการชำระค่าสมัคร'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "education-type",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/settings/education-type/education-type.module"
|
||||
).then((m) => m.EducationTypeModule),
|
||||
data: {
|
||||
menu: 'ตั้งค่าข้อมูลตั้งต้น',
|
||||
sub_menu: 'ข้อมูลระดับการศึกษา'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "setting-exam",
|
||||
loadChildren: () =>
|
||||
import("./feature/setting-exam/setting-exam.module").then(
|
||||
(m) => m.SettingExamModule
|
||||
),
|
||||
data: {
|
||||
menu: 'กำหนดรายวิชาสอบ',
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "manage-test-center",
|
||||
loadChildren: () =>
|
||||
import("./feature/manage-test-center/manage-test-center.module").then(
|
||||
(m) => m.ManageTestCenterModule
|
||||
),
|
||||
data: {
|
||||
menu: 'การจัดการศูนย์สอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "exam-information",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/set-exam-information/set-exam-information.module"
|
||||
).then((m) => m.SetExamInformationModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลการสอบ',
|
||||
sub_menu: 'ตรวจสอบข้อมูลรอบสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "approve-exam",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/approve-exam/approve-exam.module"
|
||||
).then((m) => m.ApproveExamModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลการสอบ',
|
||||
sub_menu: 'เปิดรอบสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "reject-exam",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/reject-exam/reject-exam.module"
|
||||
).then((m) => m.RejectExamModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลการสอบ',
|
||||
sub_menu: 'ปิดรอบสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "user-counter",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/set-permission/user-couter/user-couter.module"
|
||||
).then((m) => m.UserCouterModule),
|
||||
data: {
|
||||
menu: 'กำหนดสิทธิ์',
|
||||
sub_menu: 'User Counter รับสมัคร'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "print-exam-card",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/print-exam-card/print-exam-card.module"
|
||||
).then((m) => m.PrintExamCardModule),
|
||||
data: {
|
||||
menu: 'พิมพ์บัตรเข้าห้องสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "setting-print-card",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/setting-print-card/setting-print-card.module"
|
||||
).then((m) => m.SettingPrintCardModule),
|
||||
data: {
|
||||
menu: 'ตั้งค่าเวลาพิมพ์บัตร'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "print-exam-result",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/print-exam-result/print-exam-result.module"
|
||||
).then((m) => m.PrintExamResultModule),
|
||||
data: {
|
||||
menu: 'พิมพ์ผลสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "student-info",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/upload-student/upload-student.module"
|
||||
).then((m) => m.UploadStudentModule),
|
||||
data: {
|
||||
menu: 'อัพโหลดข้อมูลผู้เข้าสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "check-student-info",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/student-info/student-info.module"
|
||||
).then((m) => m.StudentInfoModule),
|
||||
data: {
|
||||
menu: 'ตรวจสอบข้อมูลผู้สมัคร'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "create-exam-seat",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam-seat/create-exam-seat.module"
|
||||
).then((m) => m.CreatExamSeatModule),
|
||||
data: {
|
||||
menu: 'สร้างเลขที่นั่งสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "notification-check-exam",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/notification-check-exam/notification-check-exam.module"
|
||||
).then((m) => m.NotificationCheckExamModule),
|
||||
data: {
|
||||
menu: 'แจ้งเตือนการตรวจสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "create-exam-information",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/create-exam-information/create-exam-information.module"
|
||||
).then((m) => m.CreateExamInformationModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลรอบสอบ',
|
||||
sub_menu: 'ข้อมูลพื้นฐาน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "create-exam-subject",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/create-exam-subject/create-exam-subject.module"
|
||||
).then((m) => m.CreateExamSubjectModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลรอบสอบ',
|
||||
sub_menu: 'กำหนดวิชาสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "create-exam-room",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/create-exam-room/create-exam-room.module"
|
||||
).then((m) => m.CreateExamRoomModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลรอบสอบ',
|
||||
sub_menu: 'กำหนดห้องสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "create-exam-condition",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/create-exam-condition/create-exam-condition.module"
|
||||
).then((m) => m.CreateExamConditionModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลรอบสอบ',
|
||||
sub_menu: 'กำหนดเงื่อนไข'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "create-exam-calendar",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/create-exam-calendar/create-exam-calendar.module"
|
||||
).then((m) => m.CreateExamCalendarModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลรอบสอบ',
|
||||
sub_menu: 'กำหนดปฏิทิน'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "seat-change",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/candidate-list/seat-change/seat-change.module"
|
||||
).then((m) => m.SeatChangeModule),
|
||||
data: {
|
||||
menu: 'จัดการที่นั่งสอบกับห้องสอบ',
|
||||
sub_menu: 'ย้ายวันสอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'daily-summary-ttb',
|
||||
loadChildren: () =>
|
||||
import('./feature/exam-register/daily-summary-ttb/daily-summary-ttb.module').then(
|
||||
(m) => m.DailySummaryTtbModule
|
||||
),
|
||||
data: {
|
||||
menu: 'ลงทะเบียนสอบ',
|
||||
sub_menu: 'รายงานรับเงิน TTB',
|
||||
},
|
||||
},
|
||||
{
|
||||
path: "special-period",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/create-exam/create-exam-setup-period-by-subject/create-exam-setup-period-by-subject.module"
|
||||
).then((m) => m.CreateExamSetupPeriodBySubjectModule),
|
||||
data: {
|
||||
menu: 'กำหนดข้อมูลรอบสอบ',
|
||||
sub_menu: 'กำหนดวันสอบของวิชา'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: "online-summary",
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/online-summary/online-summary.module"
|
||||
).then((m) => m.OnlineSummaryModule),
|
||||
data: {
|
||||
menu: 'ลงทะเบียนสอบ',
|
||||
sub_menu: 'รายงานรับเงินออนไลน์'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'register-cancel',
|
||||
loadChildren: () =>
|
||||
import(
|
||||
"./feature/exam-register/register-cancel/register-cancel.module"
|
||||
).then((m) => m.RegisterCancelModule),
|
||||
data: {
|
||||
menu: 'ลงทะเบียนสอบ',
|
||||
sub_menu: 'ยกเลิกรายการสมัคร'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'extend-information-date',
|
||||
loadChildren: () =>
|
||||
import(
|
||||
'./feature/extend-information/extend-information-date/extend-information-date.module'
|
||||
).then((m) => m.ExtendInformationDateModule),
|
||||
data: {
|
||||
menu: 'ขยายรอบสอบ(ที่เปิดแล้ว)',
|
||||
sub_menu: 'ขยายวันที่สอบ'
|
||||
}
|
||||
},
|
||||
{
|
||||
path: 'extend-information-room',
|
||||
loadChildren: () =>
|
||||
import(
|
||||
'./feature/extend-information/extend-information-room/extend-information-room.module'
|
||||
).then((m) => m.ExtendInformationRoomModule),
|
||||
data: {
|
||||
menu: 'ขยายรอบสอบ(ที่เปิดแล้ว)',
|
||||
sub_menu: 'จัดการห้องสอบ'
|
||||
}
|
||||
},
|
||||
],
|
||||
},
|
||||
];
|
||||
|
||||
@NgModule({
|
||||
imports: [RouterModule.forRoot(routes, { relativeLinkResolution: "legacy" })],
|
||||
exports: [RouterModule],
|
||||
})
|
||||
export class AppRoutingModule {}
|
||||
1
src/app/app.component.html
Normal file
1
src/app/app.component.html
Normal file
@@ -0,0 +1 @@
|
||||
<router-outlet></router-outlet>
|
||||
0
src/app/app.component.scss
Normal file
0
src/app/app.component.scss
Normal file
35
src/app/app.component.spec.ts
Normal file
35
src/app/app.component.spec.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { TestBed, waitForAsync } from '@angular/core/testing';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { AppComponent } from './app.component';
|
||||
|
||||
describe('AppComponent', () => {
|
||||
beforeEach(waitForAsync(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [
|
||||
RouterTestingModule
|
||||
],
|
||||
declarations: [
|
||||
AppComponent
|
||||
],
|
||||
}).compileComponents();
|
||||
}));
|
||||
|
||||
it('should create the app', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app).toBeTruthy();
|
||||
});
|
||||
|
||||
it(`should have as title 'angular-folder-structure'`, () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
const app = fixture.debugElement.componentInstance;
|
||||
expect(app.title).toEqual('angular-folder-structure');
|
||||
});
|
||||
|
||||
it('should render title in a h1 tag', () => {
|
||||
const fixture = TestBed.createComponent(AppComponent);
|
||||
fixture.detectChanges();
|
||||
const compiled = fixture.debugElement.nativeElement;
|
||||
expect(compiled.querySelector('h1').textContent).toContain('Welcome to angular-folder-structure!');
|
||||
});
|
||||
});
|
||||
10
src/app/app.component.ts
Normal file
10
src/app/app.component.ts
Normal file
@@ -0,0 +1,10 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-root',
|
||||
templateUrl: './app.component.html',
|
||||
styleUrls: ['./app.component.scss']
|
||||
})
|
||||
export class AppComponent {
|
||||
title = 'angular-folder-structure';
|
||||
}
|
||||
53
src/app/app.module.ts
Normal file
53
src/app/app.module.ts
Normal file
@@ -0,0 +1,53 @@
|
||||
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 { CoreModule } from './core/core.module';
|
||||
import { StoreModule, ActionReducer, MetaReducer } from '@ngrx/store';
|
||||
import { appReducers } from './state/app-reducer';
|
||||
import { environment } from '../environments/environment.prod';
|
||||
import { EffectsModule } from '@ngrx/effects';
|
||||
import { StoreDevtoolsModule } from '@ngrx/store-devtools';
|
||||
import { StoreRouterConnectingModule } from '@ngrx/router-store';
|
||||
import { MainLayoutComponent } from './layout/main-layout/main-layout.component';
|
||||
import { MenuComponent } from './layout/menu/menu/menu.component';
|
||||
import { ToolbarComponent } from './layout/toolbar/toolbar/toolbar.component';
|
||||
import { SharedModule } from './shared/shared.module';
|
||||
// for debugging
|
||||
export function debug(reducer: ActionReducer<any>): ActionReducer<any> {
|
||||
return function(state, action) {
|
||||
// console.log('state', state);
|
||||
return reducer(state, action);
|
||||
};
|
||||
}
|
||||
|
||||
export const metaReducers: MetaReducer<any>[] = [debug];
|
||||
@NgModule({
|
||||
declarations: [
|
||||
AppComponent,
|
||||
MainLayoutComponent,
|
||||
MenuComponent,
|
||||
ToolbarComponent,
|
||||
],
|
||||
imports: [
|
||||
BrowserModule,
|
||||
AppRoutingModule,
|
||||
CoreModule,
|
||||
SharedModule,
|
||||
BrowserAnimationsModule,
|
||||
StoreModule.forRoot(appReducers, {
|
||||
metaReducers,
|
||||
runtimeChecks: {
|
||||
strictStateImmutability: false,
|
||||
strictActionImmutability: false,
|
||||
}
|
||||
}),
|
||||
EffectsModule.forRoot([]),
|
||||
StoreDevtoolsModule.instrument({maxAge: 25, logOnly: environment.production}),
|
||||
StoreRouterConnectingModule.forRoot(),
|
||||
],
|
||||
providers: [],
|
||||
bootstrap: [AppComponent]
|
||||
})
|
||||
export class AppModule { }
|
||||
93
src/app/core/base/base-form-uid.ts
Normal file
93
src/app/core/base/base-form-uid.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { Location } from '@angular/common';
|
||||
import { Directive } from '@angular/core';
|
||||
@Directive()
|
||||
export class BaseFormUid {
|
||||
tinyMCE;
|
||||
isHideForm: boolean = environment.hideForm
|
||||
form: FormGroup
|
||||
state: string
|
||||
id: number
|
||||
constructor(
|
||||
public _router:Router,
|
||||
public _activeRouter: ActivatedRoute,
|
||||
public fb: FormBuilder,
|
||||
public location: Location
|
||||
){
|
||||
this.form = this.createForm()
|
||||
this._activeRouter.params.pipe(
|
||||
tap(x => x.id ? this.state = 'edit' : this.state = 'add'),
|
||||
tap(x => x.id ? this.id = x.id : this.id = null)
|
||||
).subscribe()
|
||||
this.mce()
|
||||
}
|
||||
|
||||
|
||||
back(){
|
||||
// if(this.state == 'add') {
|
||||
// this._router.navigate(['../'],{relativeTo: this._activeRouter})
|
||||
// return
|
||||
// }
|
||||
this.location.back()
|
||||
// this._router.navigate(['../'],{relativeTo: this._activeRouter})
|
||||
|
||||
}
|
||||
|
||||
createForm(){
|
||||
return this.fb.group({})
|
||||
}
|
||||
|
||||
|
||||
|
||||
mce(){
|
||||
return this.tinyMCE = {
|
||||
plugins: [
|
||||
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
|
||||
'searchreplace visualblocks visualchars code fullscreen',
|
||||
'insertdatetime media nonbreaking save table directionality',
|
||||
'emoticons template paste textpattern autoresize',
|
||||
],
|
||||
|
||||
document_base_url: 'test',
|
||||
video_template_callback: function(data) {
|
||||
return '<video width="' + 450 + '" height="' + 225 + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' + '<source src="' + data.source + '"' + (data.sourcemime ? ' type="' + data.sourcemime + '"' : '') + ' />\n' + (data.altsource ? '<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : '') + ' />\n' : '') + '</video>';
|
||||
},
|
||||
relative_urls: false,
|
||||
remove_script_host: true,
|
||||
forced_root_block: false,
|
||||
force_br_newlines: true,
|
||||
force_p_newlines: false,
|
||||
branding: false,
|
||||
toolbar:
|
||||
'media image code link',
|
||||
image_advtab: true,
|
||||
file_picker_callback: function (cb, value, meta) {
|
||||
var input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', 'image/* audio/* video/*');
|
||||
input.onchange = function() {
|
||||
let file = input.files[0];
|
||||
let reader = new FileReader();
|
||||
const formData: FormData = new FormData();
|
||||
formData.append('file', file, file.name)
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
input.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
export var sortByProperty = function (property) {
|
||||
|
||||
return function (x, y) {
|
||||
|
||||
return ((x[property] === y[property]) ? 0 : ((x[property] > y[property]) ? 1 : -1));
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
95
src/app/core/base/base-form.ts
Normal file
95
src/app/core/base/base-form.ts
Normal file
@@ -0,0 +1,95 @@
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { Router, ActivatedRoute, NavigationEnd } from '@angular/router';
|
||||
import { FormGroup, FormBuilder } from '@angular/forms';
|
||||
import { filter, startWith, switchMap, tap } from 'rxjs/operators';
|
||||
import { Location } from '@angular/common';
|
||||
import { Directive } from '@angular/core';
|
||||
@Directive()
|
||||
export class BaseForm {
|
||||
tinyMCE;
|
||||
isHideForm: boolean = environment.hideForm
|
||||
form: FormGroup
|
||||
state: string
|
||||
id: any
|
||||
role;
|
||||
constructor(
|
||||
public _router:Router,
|
||||
public _activeRouter: ActivatedRoute,
|
||||
public fb: FormBuilder,
|
||||
public location: Location
|
||||
){
|
||||
this.form = this.createForm()
|
||||
this._activeRouter.params.pipe(
|
||||
tap(x => x.id ? this.state = 'edit' : this.state = 'add'),
|
||||
tap(x => x.id ? this.id = x.id : this.id = null)
|
||||
).subscribe()
|
||||
this._router.events.pipe(
|
||||
filter(r => r instanceof NavigationEnd),
|
||||
tap(x => this.role = this._activeRouter.snapshot.parent.data)
|
||||
).subscribe()
|
||||
this.mce()
|
||||
}
|
||||
|
||||
|
||||
back(){
|
||||
// if(this.state == 'add') {
|
||||
// this._router.navigate(['../'],{relativeTo: this._activeRouter})
|
||||
// return
|
||||
// }
|
||||
this.location.back()
|
||||
// this._router.navigate(['../'],{relativeTo: this._activeRouter})
|
||||
|
||||
}
|
||||
|
||||
createForm(){
|
||||
return this.fb.group({})
|
||||
}
|
||||
|
||||
mce(){
|
||||
return this.tinyMCE = {
|
||||
plugins: [
|
||||
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
|
||||
'searchreplace visualblocks visualchars code fullscreen',
|
||||
'insertdatetime media nonbreaking save table directionality',
|
||||
'emoticons template paste textpattern autoresize',
|
||||
],
|
||||
|
||||
document_base_url: 'test',
|
||||
video_template_callback: function(data) {
|
||||
return '<video width="' + 450 + '" height="' + 225 + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' + '<source src="' + data.source + '"' + (data.sourcemime ? ' type="' + data.sourcemime + '"' : '') + ' />\n' + (data.altsource ? '<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : '') + ' />\n' : '') + '</video>';
|
||||
},
|
||||
relative_urls: false,
|
||||
remove_script_host: true,
|
||||
forced_root_block: false,
|
||||
force_br_newlines: true,
|
||||
force_p_newlines: false,
|
||||
branding: false,
|
||||
toolbar:
|
||||
'media image code link',
|
||||
image_advtab: true,
|
||||
file_picker_callback: function (cb, value, meta) {
|
||||
var input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', 'image/* audio/* video/*');
|
||||
input.onchange = function() {
|
||||
let file = input.files[0];
|
||||
let reader = new FileReader();
|
||||
const formData: FormData = new FormData();
|
||||
formData.append('file', file, file.name)
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
input.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export var sortByProperty = function (property) {
|
||||
|
||||
return function (x, y) {
|
||||
|
||||
return ((x[property] === y[property]) ? 0 : ((x[property] > y[property]) ? 1 : -1));
|
||||
|
||||
};
|
||||
|
||||
};
|
||||
39
src/app/core/base/base-list-role.ts
Normal file
39
src/app/core/base/base-list-role.ts
Normal file
@@ -0,0 +1,39 @@
|
||||
import { Directive, ViewChild } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { ActivatedRoute, NavigationEnd, NavigationStart, Router } from '@angular/router';
|
||||
import { Observable } from 'rxjs';
|
||||
import { filter, startWith, switchMap, tap } from 'rxjs/operators';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { AppTokenService } from '../service/security/app-token.service';
|
||||
@Directive()
|
||||
export class BaseListRole {
|
||||
isProduction = environment.production
|
||||
@ViewChild(MatSort,{ static: true }) sort: MatSort;
|
||||
@ViewChild(MatPaginator,{ static: true }) paginator: MatPaginator;
|
||||
role;
|
||||
protected updateMatTable(res: any){
|
||||
res = new MatTableDataSource(res)
|
||||
res.paginator = this.paginator
|
||||
res.sort = this.sort
|
||||
return res
|
||||
|
||||
}
|
||||
|
||||
constructor(
|
||||
public router: Router,
|
||||
public activeRoute: ActivatedRoute,
|
||||
public apptokenSV: AppTokenService
|
||||
){
|
||||
this.router.events.pipe(
|
||||
filter(r => r instanceof NavigationEnd),
|
||||
startWith(this.router),
|
||||
// tap(x => console.log(this.activeRoute.firstchild.data)),
|
||||
switchMap(r => this.activeRoute.data),
|
||||
// tap(x => console.log(x)),
|
||||
tap(x => this.role = this.apptokenSV.getPerm(x.role))
|
||||
).subscribe()
|
||||
}
|
||||
|
||||
}
|
||||
98
src/app/core/base/base-list.ts
Normal file
98
src/app/core/base/base-list.ts
Normal file
@@ -0,0 +1,98 @@
|
||||
// import { Directive, ViewChild } from '@angular/core';
|
||||
// import { MatPaginator } from '@angular/material/paginator';
|
||||
// import { MatSort } from '@angular/material/sort';
|
||||
// import { MatTableDataSource } from '@angular/material/table';
|
||||
// import { environment } from 'src/environments/environment';
|
||||
// @Directive()
|
||||
// export class BaseList {
|
||||
// isProduction = environment.production
|
||||
// @ViewChild(MatSort,{ static: true }) sort: MatSort;
|
||||
// @ViewChild(MatPaginator,{ static: true }) paginator: MatPaginator;
|
||||
// protected updateMatTable(res: any){
|
||||
// res = new MatTableDataSource(res)
|
||||
// res.paginator = this.paginator
|
||||
// res.sort = this.sort
|
||||
// return res
|
||||
// }
|
||||
|
||||
// getIndex(i){
|
||||
// return this.paginator.pageIndex * this.paginator.pageSize + i + 1
|
||||
// }
|
||||
// }
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { Directive, Output, ViewChild, EventEmitter } from '@angular/core';
|
||||
import { MatPaginator, PageEvent } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { map, startWith } from 'rxjs/operators';
|
||||
|
||||
|
||||
|
||||
export interface ResultPageEvent<T> {
|
||||
results: T[];
|
||||
current_page: number;
|
||||
page_count: number;
|
||||
page_size: number;
|
||||
row_count: number;
|
||||
first_row_on_page: number;
|
||||
last_row_on_page: number;
|
||||
}
|
||||
|
||||
export interface CustomeEventPage extends PageEvent {
|
||||
queryStringPage?: string,
|
||||
paginator?: MatPaginator
|
||||
}
|
||||
|
||||
@Directive()
|
||||
export class BaseList {
|
||||
protected INT_PAGING:CustomeEventPage = {
|
||||
length: 0,
|
||||
pageIndex: 0,
|
||||
pageSize: 5,
|
||||
previousPageIndex: null,
|
||||
queryStringPage: `0/5`,
|
||||
}
|
||||
isProduction = environment.production
|
||||
@ViewChild(MatSort,{ static: true }) sort: MatSort;
|
||||
@ViewChild(MatPaginator,{ static: true }) paginator: MatPaginator;
|
||||
@Output() onPaginatorPageChange = new EventEmitter<PageEvent>()
|
||||
|
||||
protected updateMatTable(res: any){
|
||||
|
||||
if(res instanceof Array){
|
||||
res = new MatTableDataSource(res)
|
||||
res.paginator = this.paginator
|
||||
res.sort = this.sort
|
||||
return res
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
protected updatePagingMatabe<T>(data: ResultPageEvent<T>){
|
||||
this.paginator.length = data.row_count
|
||||
return data.results
|
||||
}
|
||||
|
||||
|
||||
|
||||
protected getEventPage(): Observable<PageEvent> {
|
||||
return this.paginator.page.pipe(
|
||||
startWith(this.INT_PAGING),
|
||||
map( event => {
|
||||
return {
|
||||
...event,
|
||||
paginator: this.paginator,
|
||||
queryStringPage: `${event.pageIndex + 1}/${event.pageSize}`
|
||||
}
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
getIndex(i){
|
||||
return this.paginator.pageIndex * this.paginator.pageSize + i + 1
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
92
src/app/core/base/base-openid-service.ts
Normal file
92
src/app/core/base/base-openid-service.ts
Normal file
@@ -0,0 +1,92 @@
|
||||
import { HttpClient, HttpEventType } from '@angular/common/http';
|
||||
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { map, catchError } from 'rxjs/operators';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
export interface IapiResponse<T>{
|
||||
apiResponse:{
|
||||
id:number,
|
||||
desc:string,
|
||||
},
|
||||
data:Array<T>
|
||||
}
|
||||
|
||||
export class OpenidService {
|
||||
|
||||
host:string = `${environment.openidPath}`
|
||||
protected prefix:string = `${this.host}/openid`
|
||||
protected fullUrl:string = ''
|
||||
|
||||
constructor(
|
||||
endpoint:string,
|
||||
protected http: HttpClient
|
||||
) {
|
||||
this.fullUrl = this.prefix + endpoint
|
||||
}
|
||||
|
||||
// callService<T>(action: string, data?: any[]): Observable<IapiResponse<T>> {
|
||||
// const body = {
|
||||
// apiRequest: {
|
||||
// action: action
|
||||
// }
|
||||
// , data: data || []
|
||||
// };
|
||||
// return this.http.post<IapiResponse<T>>(this.fullUrl, body)
|
||||
// }
|
||||
uploadDocument<HttpHeaderResponse>(target: FormData){
|
||||
return this.http.post(this.fullUrl,target,{
|
||||
reportProgress: true,
|
||||
observe:'events'
|
||||
}).pipe(
|
||||
map((event) => {
|
||||
switch(event.type){
|
||||
case HttpEventType.UploadProgress:
|
||||
const progress = Math.round(100 * event.loaded / event.total);
|
||||
return { status: 'progress', message: `${progress}` };
|
||||
case HttpEventType.Response:
|
||||
return { status: 'success', message: event.body };
|
||||
default:
|
||||
return `Unhandled event: ${event.type}`;
|
||||
}
|
||||
}
|
||||
),
|
||||
catchError(err => {
|
||||
return of({ status: 'error', message: `${err.message}` })
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
getAll<T>(): Observable<T[]>{
|
||||
return this.http.get<T[]>(this.fullUrl)
|
||||
}
|
||||
|
||||
add<T>(data: T): Observable<T> {
|
||||
return this.http.post<T>(this.fullUrl,data)
|
||||
}
|
||||
|
||||
get<T>(id: any): Observable<T> {
|
||||
return this.http.get<T>(`${this.fullUrl}/${id}`)
|
||||
}
|
||||
|
||||
update<T>(id: number,data: T): Observable<Response>{
|
||||
return this.http.put<Response>(`${this.fullUrl}/${id}`,data)
|
||||
}
|
||||
|
||||
update2<T>(data:T): Observable<Response>{
|
||||
return this.http.put<Response>(this.fullUrl,data)
|
||||
}
|
||||
|
||||
deleteData(id: number): Observable<Response> {
|
||||
return this.http.delete<Response>(`${this.fullUrl}/${id}`)
|
||||
}
|
||||
|
||||
query<T>(query: string): Observable<T> {
|
||||
return this.http.get<T>(`${this.fullUrl}/${query}`)
|
||||
}
|
||||
|
||||
search<T>(query: string): Observable<T> {
|
||||
return this.http.get<T>(`${this.fullUrl}${query}`)
|
||||
}
|
||||
}
|
||||
|
||||
93
src/app/core/base/base-service.ts
Normal file
93
src/app/core/base/base-service.ts
Normal file
@@ -0,0 +1,93 @@
|
||||
import {HttpClient, HttpEventType} from '@angular/common/http';
|
||||
|
||||
import {Observable, of} from 'rxjs';
|
||||
import {map, catchError} from 'rxjs/operators';
|
||||
import {environment} from 'src/environments/environment';
|
||||
|
||||
export interface IapiResponse<T> {
|
||||
apiResponse: {
|
||||
id: number,
|
||||
desc: string,
|
||||
},
|
||||
data: Array<T>
|
||||
}
|
||||
|
||||
|
||||
export class BaseService {
|
||||
// host:string = 'https://ru.71dev.com/etest-admin'
|
||||
host: string = `${environment.adminApi}`
|
||||
protected prefix: string = `${this.host}/api`
|
||||
protected fullUrl: string = ''
|
||||
|
||||
constructor(
|
||||
endpoint: string,
|
||||
protected http: HttpClient
|
||||
) {
|
||||
this.fullUrl = this.prefix + endpoint
|
||||
}
|
||||
|
||||
// callService<T>(action: string, data?: any[]): Observable<IapiResponse<T>> {
|
||||
// const body = {
|
||||
// apiRequest: {
|
||||
// action: action
|
||||
// }
|
||||
// , data: data || []
|
||||
// };
|
||||
// return this.http.post<IapiResponse<T>>(this.fullUrl, body)
|
||||
// }
|
||||
uploadDocument<HttpHeaderResponse>(target: FormData) {
|
||||
return this.http.post(this.fullUrl, target, {
|
||||
reportProgress: true,
|
||||
observe: 'events'
|
||||
}).pipe(
|
||||
map((event) => {
|
||||
switch (event.type) {
|
||||
case HttpEventType.UploadProgress:
|
||||
const progress = Math.round(100 * event.loaded / event.total);
|
||||
return {status: 'progress', message: `${progress}`};
|
||||
case HttpEventType.Response:
|
||||
return {status: 'success', message: event.body};
|
||||
default:
|
||||
return `Unhandled event: ${event.type}`;
|
||||
}
|
||||
}
|
||||
),
|
||||
catchError(err => {
|
||||
return of({status: 'error', message: `${err.message}`})
|
||||
})
|
||||
)
|
||||
}
|
||||
|
||||
getAll<T>(): Observable<T[]> {
|
||||
return this.http.get<T[]>(this.fullUrl)
|
||||
}
|
||||
|
||||
add<T>(data: T): Observable<T> {
|
||||
return this.http.post<T>(this.fullUrl, data)
|
||||
}
|
||||
|
||||
get<T>(id: any): Observable<T> {
|
||||
return this.http.get<T>(`${this.fullUrl}/${id}`)
|
||||
}
|
||||
|
||||
update<T>(id: number, data: T): Observable<Response> {
|
||||
return this.http.put<Response>(`${this.fullUrl}/${id}`, data)
|
||||
}
|
||||
|
||||
update2<T>(data: T): Observable<Response> {
|
||||
return this.http.put<Response>(this.fullUrl, data)
|
||||
}
|
||||
|
||||
deleteData(id: number): Observable<Response> {
|
||||
return this.http.delete<Response>(`${this.fullUrl}/${id}`)
|
||||
}
|
||||
|
||||
query<T>(query: string): Observable<T> {
|
||||
return this.http.get<T>(`${this.fullUrl}/${query}`)
|
||||
}
|
||||
|
||||
search<T>(query: string): Observable<T> {
|
||||
return this.http.get<T>(`${this.fullUrl}${query}`)
|
||||
}
|
||||
}
|
||||
|
||||
36
src/app/core/base/base-sub-list.ts
Normal file
36
src/app/core/base/base-sub-list.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { Router, ActivatedRoute } from '@angular/router';
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { Directive, ViewChild } from '@angular/core';
|
||||
import { MatPaginator } from '@angular/material/paginator';
|
||||
import { MatSort } from '@angular/material/sort';
|
||||
import { MatTableDataSource } from '@angular/material/table';
|
||||
@Directive()
|
||||
export class BaseSubList {
|
||||
state: string
|
||||
id: number
|
||||
constructor(
|
||||
public _activeRouter: ActivatedRoute,
|
||||
){
|
||||
this._activeRouter.params.pipe(
|
||||
tap(x => x.id ? this.state = 'edit' : this.state = 'add'),
|
||||
tap(x => x.id ? this.id = x.id : this.id = null)
|
||||
).subscribe()
|
||||
}
|
||||
|
||||
@ViewChild(MatSort,{ static: true }) sort: MatSort;
|
||||
@ViewChild(MatPaginator,{ static: true }) paginator: MatPaginator;
|
||||
|
||||
protected updateMatTable(res: any){
|
||||
if(res instanceof Array){
|
||||
res = new MatTableDataSource(res)
|
||||
res.paginator = this.paginator
|
||||
res.sort = this.sort
|
||||
return res
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
||||
getIndex(i){
|
||||
return this.paginator.pageIndex * this.paginator.pageSize + i + 1
|
||||
}
|
||||
}
|
||||
49
src/app/core/base/tinymce.ts
Normal file
49
src/app/core/base/tinymce.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
export class BaseTiny {
|
||||
tinyMCE
|
||||
protected id: number
|
||||
protected state: string
|
||||
constructor(
|
||||
|
||||
) {
|
||||
this.tinyMCE = {
|
||||
plugins: [
|
||||
'advlist autolink lists link image charmap print preview hr anchor pagebreak',
|
||||
'searchreplace visualblocks visualchars code fullscreen',
|
||||
'insertdatetime media nonbreaking save table directionality',
|
||||
'emoticons template paste textpattern autoresize',
|
||||
],
|
||||
|
||||
document_base_url: 'test',
|
||||
video_template_callback: function(data) {
|
||||
return '<video width="' + 450 + '" height="' + 225 + '"' + (data.poster ? ' poster="' + data.poster + '"' : '') + ' controls="controls">\n' + '<source src="' + data.source + '"' + (data.sourcemime ? ' type="' + data.sourcemime + '"' : '') + ' />\n' + (data.altsource ? '<source src="' + data.altsource + '"' + (data.altsourcemime ? ' type="' + data.altsourcemime + '"' : '') + ' />\n' : '') + '</video>';
|
||||
},
|
||||
relative_urls: false,
|
||||
remove_script_host: true,
|
||||
forced_root_block: false,
|
||||
force_br_newlines: true,
|
||||
force_p_newlines: false,
|
||||
branding: false,
|
||||
toolbar:
|
||||
'media image code link',
|
||||
image_advtab: true,
|
||||
file_picker_callback: function (cb, value, meta) {
|
||||
var input = document.createElement('input');
|
||||
input.setAttribute('type', 'file');
|
||||
input.setAttribute('accept', 'image/* audio/* video/*');
|
||||
input.onchange = function() {
|
||||
let file = input.files[0];
|
||||
let reader = new FileReader();
|
||||
const formData: FormData = new FormData();
|
||||
formData.append('file', file, file.name);
|
||||
// uploadSV.uploadDocument(formData).subscribe((x: any) => {
|
||||
// if (x.status === 'success'){
|
||||
// cb(x.message[0].file_name)
|
||||
// }
|
||||
// });
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
input.click();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
0
src/app/core/configs/config.ts
Normal file
0
src/app/core/configs/config.ts
Normal file
23
src/app/core/core.module.ts
Normal file
23
src/app/core/core.module.ts
Normal file
@@ -0,0 +1,23 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { HttpClientModule, HTTP_INTERCEPTORS } from '@angular/common/http';
|
||||
import { TokenIntercepterInterceptor } from './intercepter/token-intercepter.interceptor';
|
||||
import { AuthGuard } from './guards/auth.guard';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [],
|
||||
imports: [
|
||||
CommonModule,
|
||||
HttpClientModule,
|
||||
],
|
||||
exports: [
|
||||
CommonModule,
|
||||
HttpClientModule,
|
||||
],
|
||||
providers: [
|
||||
AuthGuard,
|
||||
{ provide: HTTP_INTERCEPTORS, useClass: TokenIntercepterInterceptor, multi: true },
|
||||
]
|
||||
})
|
||||
export class CoreModule { }
|
||||
76
src/app/core/enum/role.ts
Normal file
76
src/app/core/enum/role.ts
Normal file
@@ -0,0 +1,76 @@
|
||||
export enum OBJECT {
|
||||
SET_SUB_EXAM = 'SET-SUB-EXAM',
|
||||
SET_INFO_EXAM = 'SET-INFO-EXAM',
|
||||
MN_EXAM_BRANCH = 'MN-EXAM-BRANCH',
|
||||
EXAM_REG = 'EXAM-REG',
|
||||
CHK_EXM_INFO = 'CHK-EXAMINEE-INFO',
|
||||
CHK_CAD_LIST = 'CHK-CANDIDATE-LIST',
|
||||
PERM = 'PERM',
|
||||
SETTINGS = 'SETTINGS',
|
||||
PAYMENT = 'PAYMENT',
|
||||
CH_EX_DAY_PERM = 'CH-EXAM-DAY-PERM',
|
||||
PRINT_EXAM_CARD = 'PRINT-EX-CARD',
|
||||
SET_PRINT_CARD = 'SET-PRINT-CARD',
|
||||
PRINT_EXAM_RESULT = 'PRINT-EXAM-RESULT',
|
||||
STUDENT_INFO = 'STUDENT-INFO',
|
||||
CHECK_STUDENT_INFO = 'CHECK-STUDENT-INFO',
|
||||
MANAGE_PAYMENT = 'MANAGE-PAYMENT',
|
||||
REPORT = 'REPORT',
|
||||
CRE_EX_INFO = 'CRE-EX-INFO',
|
||||
MN_EX_OFF = 'MN-EX-OFF',
|
||||
CHG_EX_INFO = 'CHG-EX-INFO',
|
||||
RANDOM_QUESTIONS = 'RANDOM-QUESTIONS',
|
||||
GRADE_SUMMARY = 'GRADE-SUMMARY',
|
||||
REGISTER_SUMMARY = 'REGISTER-SUMMARY',
|
||||
MANAGE_RECEIPT = 'MANAGE-RECEIPT',
|
||||
PERIOD_SUMMARY = 'PERIOD-SUMMARY',
|
||||
DAILY_SUMMARY = 'DAILY-SUMMARY',
|
||||
DAILY_SUMMARY_TTB = 'DAILY_SUMMARY_TTB',
|
||||
IMPORT_PAYMENT = 'IMPORT-PAYMENT',
|
||||
CONFIRM_PAYMENT = 'CONFIRM-PAYMENT',
|
||||
PERM_GROUP = 'PERM-GROUP',
|
||||
CREATE_USER = 'CREATE-USER',
|
||||
SET_USER = 'SET-USER',
|
||||
USER_COUNTER = 'USER-COUNTER',
|
||||
CALENDAR = 'CALENDAR',
|
||||
BRANCH = 'BRANCH',
|
||||
TESTING_FIELD = 'TESTING-FIELD',
|
||||
FACULTY = 'FACULTY',
|
||||
EDUCATION_TYPE = 'EDUCATION-TYPE',
|
||||
ACADEMIC_YEAR = 'ACADEMIC-YEAR',
|
||||
ACADEMIC_SEMESTER = 'ACADEMIC-SEMESTER',
|
||||
SUBJECT_TYPE = 'SUBJECT-TYPE',
|
||||
SET_EX_FINANCE = 'SET-EX-FINANCE',
|
||||
SET_TEA_FINANCE = 'SET-TEA-FINANCE',
|
||||
SET_INV_FINANCE = 'SET-INV-FINANCE',
|
||||
CON_EX = 'CON-EX',
|
||||
RES_EX = 'RES-EX',
|
||||
TAB_EX = 'TAB-EX',
|
||||
CHK_EX = 'CHK-EX',
|
||||
CREATE_EXAM_SEAT = 'CREATE-EXAM-SEAT',
|
||||
NOTI_CHECK_EXAM = 'NOTI-CHECK-EXAM',
|
||||
CHANGE_EXAM_ROOM = 'CHANGE-EXAM-ROOM',
|
||||
SET_TESTING_INFO_EXAM = 'SET-TESTING-INFO-EXAM',
|
||||
SET_TESTING_INFO_EXAM_BASIC = 'SET-TESTING-INFO-EXAM-BASIC',
|
||||
SET_TESTING_INFO_EXAM_CALENDAR = 'SET-TESTING-INFO-EXAM-CALENDAR',
|
||||
SET_TESTING_INFO_EXAM_SUBJECT = 'SET-TESTING-INFO-EXAM-SUBJECT',
|
||||
SET_TESTING_INFO_EXAM_ROOM = 'SET-TESTING-INFO-EXAM-ROOM',
|
||||
SET_TESTING_INFO_EXAM_COND = 'SET-TESTING-INFO-EXAM-COND',
|
||||
APPROVE_EXAM = 'APPROVE-EXAM',
|
||||
REJECT_EXAM = 'REJECT-EXAM',
|
||||
SEAT_CHANGE = 'SEAT-CHANGE',
|
||||
SPECIAL_PERIOD = 'SPECIAL-PERIOD',
|
||||
MANAGE_EXAM_ROOM_AND_SEAT = 'MANAGE-EXAM-ROOM-AND-SEAT',
|
||||
EXTEND_INFORMATION_DATE = 'EXTEND_INFORMATION_DATE',
|
||||
EXTEND_INFORMATION_ROOM = 'EXTEND_INFORMATION_ROOM',
|
||||
ONLINE_SUMMARY = 'ONLINE-SUMMARY',
|
||||
CREATE_EXAM = 'CREATE-EXAM',
|
||||
CANDIDATE_PAYMENT_STATUS = 'CANDIDATE-PAYMENT-STATUS',
|
||||
RECIPIENT_SIGNATURE = 'RECIPIENT-SIGNATURE',
|
||||
ONLINE_COUNTER = 'ONLINE-COUNTER',
|
||||
REGISTER_CANCEL = 'REGISTER_CANCEL',
|
||||
CANCEL_TIME = 'CANCEL_TIME',
|
||||
UPLOAD_VIDEO = 'UPLOAD_VIDEO',
|
||||
DEPARTMENT = 'DEPARTMENT',
|
||||
MANAGE_CANDIDATE_LIST = 'MANAGE-CANDIDATE-LIST'
|
||||
}
|
||||
16
src/app/core/guards/auth.guard.spec.ts
Normal file
16
src/app/core/guards/auth.guard.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AuthGuard } from './auth.guard';
|
||||
|
||||
describe('AuthGuard', () => {
|
||||
let guard: AuthGuard;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
guard = TestBed.inject(AuthGuard);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(guard).toBeTruthy();
|
||||
});
|
||||
});
|
||||
29
src/app/core/guards/auth.guard.ts
Normal file
29
src/app/core/guards/auth.guard.ts
Normal file
@@ -0,0 +1,29 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { CanActivate, CanActivateChild, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from "@angular/router";
|
||||
import { Observable } from "rxjs";
|
||||
import { OidcAuthService } from "../service/oidc/oidc.service";
|
||||
@Injectable()
|
||||
export class AuthGuard implements CanActivate,CanActivateChild {
|
||||
|
||||
constructor(
|
||||
private odicSV: OidcAuthService
|
||||
){
|
||||
|
||||
}
|
||||
canActivateChild(childRoute: ActivatedRouteSnapshot, state: RouterStateSnapshot): boolean | UrlTree | Observable<boolean | UrlTree> | Promise<boolean | UrlTree> {
|
||||
return this.canActivate(childRoute,state)
|
||||
}
|
||||
|
||||
canActivate(
|
||||
next: ActivatedRouteSnapshot,
|
||||
state: RouterStateSnapshot
|
||||
): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
|
||||
if (this.odicSV.isLoggedIn()) {
|
||||
return true
|
||||
}
|
||||
|
||||
this.odicSV.startAuthentication()
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TokenIntercepterInterceptor } from './token-intercepter.interceptor';
|
||||
|
||||
describe('TokenIntercepterInterceptor', () => {
|
||||
beforeEach(() => TestBed.configureTestingModule({
|
||||
providers: [
|
||||
TokenIntercepterInterceptor
|
||||
]
|
||||
}));
|
||||
|
||||
it('should be created', () => {
|
||||
const interceptor: TokenIntercepterInterceptor = TestBed.inject(TokenIntercepterInterceptor);
|
||||
expect(interceptor).toBeTruthy();
|
||||
});
|
||||
});
|
||||
41
src/app/core/intercepter/token-intercepter.interceptor.ts
Normal file
41
src/app/core/intercepter/token-intercepter.interceptor.ts
Normal file
@@ -0,0 +1,41 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {
|
||||
HttpRequest,
|
||||
HttpHandler,
|
||||
HttpEvent,
|
||||
HttpInterceptor
|
||||
} from '@angular/common/http';
|
||||
import { Observable, throwError } from 'rxjs';
|
||||
import { catchError, finalize } from 'rxjs/operators';
|
||||
import { OidcAuthService } from '../service/oidc/oidc.service';
|
||||
import { AppTokenService } from '../service/security/app-token.service';
|
||||
import { Router } from '@angular/router';
|
||||
import { NgProgress } from 'ngx-progressbar';
|
||||
// import { NgProgress } from 'ngx-progressbar';
|
||||
// import { AppTokenService } from '../service/security/app-token.service';
|
||||
|
||||
@Injectable()
|
||||
export class TokenIntercepterInterceptor implements HttpInterceptor {
|
||||
|
||||
constructor( private odicOpenService: OidcAuthService,
|
||||
public appTokenService : AppTokenService,
|
||||
private router: Router,
|
||||
private progress: NgProgress
|
||||
) {
|
||||
|
||||
}
|
||||
|
||||
|
||||
intercept(request: HttpRequest<unknown>, next: HttpHandler): Observable<HttpEvent<unknown>> {
|
||||
const customReq = request.clone({
|
||||
setHeaders:{
|
||||
Authorization: request.url.includes('app_tokens') ? this.odicOpenService.getAuthorizationHeaderValue() : `Bearer ${this.appTokenService.getToken()}`
|
||||
}
|
||||
})
|
||||
|
||||
this.progress.ref('home-progress').start()
|
||||
return next.handle(customReq).pipe(
|
||||
finalize(() => this.progress.ref('home-progress').complete())
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { TestingCenterService } from './testing-center.service';
|
||||
|
||||
describe('TestingCenterService', () => {
|
||||
let service: TestingCenterService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(TestingCenterService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
27
src/app/core/service/TestingCenter/testing-center.service.ts
Normal file
27
src/app/core/service/TestingCenter/testing-center.service.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingCenterService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/testing_centers', http);
|
||||
}
|
||||
|
||||
getByBrandID(BrandID){
|
||||
return this.http.get(`${this.fullUrl}?branch_uid=${BrandID}`);
|
||||
}
|
||||
|
||||
getByFiledID(FieldID){
|
||||
return this.http.get(`${this.fullUrl}?testing_field_uid=${FieldID}`);
|
||||
}
|
||||
|
||||
getAvailableSeat(data){
|
||||
return this.http.get(`${this.prefix}/v1/setting/testing_center_chk_seat/${data.testing_center_uid}/${data.from_date}/${data.to_date}`);
|
||||
}
|
||||
}
|
||||
16
src/app/core/service/app.service.spec.ts
Normal file
16
src/app/core/service/app.service.spec.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
import { AppService } from './app.service';
|
||||
|
||||
describe('AppService', () => {
|
||||
let service: AppService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({});
|
||||
service = TestBed.inject(AppService);
|
||||
});
|
||||
|
||||
it('should be created', () => {
|
||||
expect(service).toBeTruthy();
|
||||
});
|
||||
});
|
||||
9
src/app/core/service/app.service.ts
Normal file
9
src/app/core/service/app.service.ts
Normal file
@@ -0,0 +1,9 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppService {
|
||||
|
||||
constructor() { }
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CardPrintingTimeService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http : HttpClient
|
||||
) {
|
||||
super('/v1/information/testing_periods',http)
|
||||
}
|
||||
|
||||
getTime(id){
|
||||
return this.http.get(`${this.prefix}/v1/information/testing_period_list_by_infomation/${id}`);
|
||||
}
|
||||
|
||||
changeTime(data){
|
||||
return this.http.put(`${this.prefix}/v1/information/list_testing_period`,data);
|
||||
}
|
||||
}
|
||||
16
src/app/core/service/card-print/card-printing.service.ts
Normal file
16
src/app/core/service/card-print/card-printing.service.ts
Normal file
@@ -0,0 +1,16 @@
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {BaseService} from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CardPrintingService extends BaseService {
|
||||
studentList: any = [];
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/information/card_printing', http)
|
||||
}
|
||||
}
|
||||
15
src/app/core/service/card-print/testing-score.service.ts
Normal file
15
src/app/core/service/card-print/testing-score.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingScoreService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/information/testing_score',http)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,17 @@
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {Injectable} from '@angular/core';
|
||||
import {environment} from 'src/environments/environment';
|
||||
import {BaseService} from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CandidateTypeService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super(`/${environment.apiVersion}/enrollment/candidate_types`, http)
|
||||
super.fullUrl = `${environment.enrollmentApi}/api/${environment.apiVersion}/enrollment/candidate_types`
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingRegisterEnrollmentService extends BaseService {
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super(`/${environment.apiVersion}/enrollment/testing_registers`,http);
|
||||
super.fullUrl = `${environment.enrollmentApi}/api/${environment.apiVersion}/enrollment`;
|
||||
}
|
||||
|
||||
paid(registerUid){
|
||||
return this.http.put<Response>(`${this.fullUrl}/cancle/${registerUid}`,null);
|
||||
}
|
||||
|
||||
cancle(registerUid){
|
||||
return this.http.put<Response>(`${this.fullUrl}/cancel/${registerUid}`,null);
|
||||
}
|
||||
|
||||
cancleAdmin(registerUid){
|
||||
return this.http.put<Response>(`${this.prefix}/v1/register/cancel_testing_receipts/${registerUid}`,null);
|
||||
}
|
||||
|
||||
deleteAdmin(registerUid){
|
||||
return this.http.delete<Response>(`${this.prefix}/v1/register/testing_registers/${registerUid}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
55
src/app/core/service/oidc/oidc.service.ts
Normal file
55
src/app/core/service/oidc/oidc.service.ts
Normal file
@@ -0,0 +1,55 @@
|
||||
import { Injectable } from "@angular/core";
|
||||
import { User, UserManager, UserManagerSettings } from "oidc-client";
|
||||
import { environment } from "src/environments/environment";
|
||||
|
||||
export function getClientSettings() :UserManagerSettings {
|
||||
return environment.clientSettings
|
||||
}
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class OidcAuthService {
|
||||
|
||||
public manager = new UserManager(getClientSettings())
|
||||
|
||||
public user: User = null
|
||||
|
||||
constructor() {
|
||||
this.manager.getUser().then(user => {
|
||||
this.user = user;
|
||||
});
|
||||
}
|
||||
|
||||
isLoggedIn(): boolean {
|
||||
return this.user != null && !this.user.expired;
|
||||
}
|
||||
|
||||
getClaims(): any {
|
||||
return this.user.profile;
|
||||
}
|
||||
|
||||
getAuthorizationHeaderValue(): string {
|
||||
return `${this.user.token_type} ${this.user.access_token}`;
|
||||
}
|
||||
|
||||
startAuthentication(): Promise<void> {
|
||||
return this.manager.signinRedirect();
|
||||
}
|
||||
|
||||
completeAuthentication(): Promise<void> {
|
||||
return this.manager.signinRedirectCallback().then(user => {
|
||||
// console.log(user)
|
||||
this.user = user;
|
||||
}).catch(err => {
|
||||
// console.log('error')
|
||||
});
|
||||
}
|
||||
|
||||
logout(){
|
||||
this.manager.signoutRedirect(
|
||||
{id_token_hint: this.user.id_token}
|
||||
).then(res => console.log(res))
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
30
src/app/core/service/openid/user.service.ts
Normal file
30
src/app/core/service/openid/user.service.ts
Normal file
@@ -0,0 +1,30 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { OpenidService } from '../../base/base-openid-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UserOpenidService extends OpenidService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/user',http)
|
||||
}
|
||||
changePassword(uid,data){
|
||||
return this.http.put(`${this.prefix}/password/${uid}`,data)
|
||||
}
|
||||
|
||||
active(uid){
|
||||
return this.http.put(`${this.prefix}/user/active/${uid}`,null)
|
||||
}
|
||||
|
||||
inactive(uid){
|
||||
return this.http.put(`${this.prefix}/user/inactive/${uid}`,null)
|
||||
}
|
||||
|
||||
searchUser(uid){
|
||||
return this.http.get(`${this.prefix}/search_user${uid}`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UserCounterLoginService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/permission/counter_login', http);
|
||||
}
|
||||
|
||||
checkpin(pin){
|
||||
return this.http.post(`${this.fullUrl}/${pin}`,null);
|
||||
}
|
||||
}
|
||||
27
src/app/core/service/permission/user-counters.service.ts
Normal file
27
src/app/core/service/permission/user-counters.service.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class UserCountersService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/permission/counters', http)
|
||||
}
|
||||
|
||||
getByInfo(id){
|
||||
return this.http.get(`${this.fullUrl}_by_information/${id}`)
|
||||
}
|
||||
|
||||
getCounterSummary(CounterNo, CounterId, Period){
|
||||
return this.http.get(`${this.prefix}/v1/permission/counter_summary_by_period/${CounterNo}/${CounterId}/${Period}`)
|
||||
}
|
||||
|
||||
logout(pin){
|
||||
return this.http.put(`${this.prefix}/v1/permission/counter_logout/${pin}`, null);
|
||||
}
|
||||
}
|
||||
15
src/app/core/service/province/provice.service.ts
Normal file
15
src/app/core/service/province/provice.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ProviceService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/provinces',http)
|
||||
}
|
||||
}
|
||||
35
src/app/core/service/question/question-category.service.ts
Normal file
35
src/app/core/service/question/question-category.service.ts
Normal file
@@ -0,0 +1,35 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { environment } from 'src/environments/environment';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class QuestionCategoryService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('v1/question/question_category',http)
|
||||
super.fullUrl = `${environment.storeApi}/api/question/question_category`
|
||||
}
|
||||
|
||||
getSubject(id){
|
||||
return this.http.get(`${this.fullUrl}_detail?subject_uid=${id}`)
|
||||
}
|
||||
|
||||
getAllSubject(id){
|
||||
return this.http.get(`${this.fullUrl}_detail2?subject_uid=${id}`)
|
||||
}
|
||||
|
||||
getSubjectWithInstructor(id){
|
||||
return this.http.get(`${this.fullUrl}_detail3?subject_uid=${id}`)
|
||||
}
|
||||
|
||||
getCategoryType(subject,category){
|
||||
return this.http.get(`${this.fullUrl}_detail2_one_cat?subject_uid=${subject}&question_category_master_uid=${category}`)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
14
src/app/core/service/region/region.service.ts
Normal file
14
src/app/core/service/region/region.service.ts
Normal file
@@ -0,0 +1,14 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RegionService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/regions',http)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CandidateRegisteredByCenterService extends BaseService {
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/candidates_registered_by_center', http)
|
||||
}
|
||||
|
||||
getPdfReport(academic_year_uid, academic_semester_uid, branch_uid, testing_field_uid, testing_center_uid , subject_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${branch_uid}/${testing_field_uid}/${testing_center_uid}/${subject_uid}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(academic_year_uid, academic_semester_uid, branch_uid, testing_field_uid, testing_center_uid , subject_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${branch_uid}/${testing_field_uid}/${testing_center_uid}/${subject_uid}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CandidateRegisteredBySubjectService extends BaseService{
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/candidates_registered_by_subject', http)
|
||||
}
|
||||
|
||||
getPdfReport(subject_uid,academic_year_uid,academic_semester_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${subject_uid}/${academic_year_uid}/${academic_semester_uid}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(subject_uid,academic_year_uid,academic_semester_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${subject_uid}/${academic_year_uid}/${academic_semester_uid}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CandidateSubjectService extends BaseService {
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/candidate_registered_by_subject', http)
|
||||
}
|
||||
|
||||
getPdfReport(academic_year_uid, academic_semester_uid, subject_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${subject_uid}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(academic_year_uid, academic_semester_uid, subject_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${subject_uid}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
33
src/app/core/service/report/candidate/candidate.service.ts
Normal file
33
src/app/core/service/report/candidate/candidate.service.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CandidateService extends BaseService {
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/application', http)
|
||||
}
|
||||
|
||||
getPdfReport(informationUid, academicyearUid, academicsemesterUid, fromdate, todate) {
|
||||
// console.log(this.fullUrl);
|
||||
this.requestUrl = `${this.fullUrl}/${informationUid}/${academicyearUid}/${academicsemesterUid}/${fromdate}/${todate}/pdf`;
|
||||
// console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(informationUid, academicyearUid, academicsemesterUid, fromdate, todate) {
|
||||
this.requestUrl = `${this.fullUrl}/${informationUid}/${academicyearUid}/${academicsemesterUid}/${fromdate}/${todate}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from 'src/app/core/base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DailyRegisterPaymentTotalService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/payment/print/total_daily_register_payment', http)
|
||||
}
|
||||
|
||||
etest102(data) {
|
||||
return (`${this.fullUrl}/${data.date}/${data.counter_no}/view/${data.period}`)
|
||||
}
|
||||
|
||||
etest102Online(data) {
|
||||
return (`${this.fullUrl}_online/${data.date}/view`)
|
||||
}
|
||||
|
||||
etest102Information(data) {
|
||||
return (`${this.fullUrl}_testing_information/${data.testing_information_uid}/${data.date}/${data.counter_no}/view/${data.period}`)
|
||||
}
|
||||
|
||||
etest102InformationOnline(data) {
|
||||
return (`${this.fullUrl}_online_testing_information/${data.testing_information_uid}/${data.date}/view`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from 'src/app/core/base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DailyRegisterPaymentService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/payment/print/daily_register_payment', http)
|
||||
}
|
||||
|
||||
etest101(data) {
|
||||
return (`${this.fullUrl}/${data.counter_no}/${data.date}/${data.period}/view`)
|
||||
}
|
||||
|
||||
etest101Online(data) {
|
||||
return (`${this.fullUrl}_online/${data.date}/view?is_cash=${data.is_cash}/is_credit_card=${data.is_credit_card}/is_qrcode=${data.is_payin}/is_qrcode=${data.is_payin}`)
|
||||
}
|
||||
|
||||
etest101Information(data) {
|
||||
return (`${this.fullUrl}_testing_information/${data.testing_information_uid}/${data.counter_no}/${data.date}/${data.period}/view`)
|
||||
}
|
||||
|
||||
etest101InformationOnline(data) {
|
||||
return (`${this.fullUrl}_testing_information_online/${data.testing_information_uid}/${data.date}/view?is_cash=${data.is_cash}/is_credit_card=${data.is_credit_card}/is_qrcode=${data.is_payin}/is_qrcode=${data.is_payin}`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class EligibleCandidateService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/eligible_candidate', http)
|
||||
}
|
||||
|
||||
getReportWithTestInforUid(tsetInUid){
|
||||
this.requestUrl = `${this.fullUrl}?testing_information_uid=${tsetInUid}`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { map } from 'rxjs/operators';
|
||||
import { BaseService } from 'src/app/core/base/base-service';
|
||||
import { SweetalertService } from '../../sweetalert/sweetalert';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingCardService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/testing_card',http)
|
||||
}
|
||||
|
||||
print(id){
|
||||
return (`${this.fullUrl}/${id}/view`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from 'src/app/core/base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ExamResultPrintService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/testing_grade',http)
|
||||
}
|
||||
|
||||
print(id){
|
||||
return (`${this.fullUrl}/${id}/view`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {environment} from '../../../../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ExamResultSubjectService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report//Test/exam_result_subject', http)
|
||||
super.fullUrl = `${environment.storeApi}/api/report/Test/exam_result_subject`
|
||||
}
|
||||
// ${this.fullUrl}
|
||||
getPdfReport(subject_uid,testing_information_uid,period_id,test_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${period_id}/${test_date}/${subject_uid}/${testing_information_uid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(subject_uid,testing_information_uid,period_id,test_date){
|
||||
this.requestUrl = `${this.fullUrl}/${period_id}/${test_date}/${subject_uid}/${testing_information_uid}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
34
src/app/core/service/report/exam_total/exam-total.service.ts
Normal file
34
src/app/core/service/report/exam_total/exam-total.service.ts
Normal file
@@ -0,0 +1,34 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {environment} from '../../../../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ExamTotalService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/Test/exam_result_subject', http)
|
||||
super.fullUrl = `${environment.storeApi}/api/report/Test/exam_total`
|
||||
}
|
||||
// ${this.fullUrl}
|
||||
getPdfReport(testing_information_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid){
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {environment} from '../../../../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ExcelAllTestService extends BaseService {
|
||||
requestUrl;
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/tests/export/excel_all_test', http)
|
||||
super.fullUrl = `${environment.storeApi}/api/tests/export/excel_all_test`
|
||||
}
|
||||
|
||||
|
||||
getExcelReport(testing_information_code){
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_code}`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from 'src/app/core/base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ReportInvigilatorCostService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/invigilator_cost', http)
|
||||
}
|
||||
|
||||
report(uid){
|
||||
return (`${this.fullUrl}_export/${uid}`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PaymentAndApplicationByCenterService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/payment_and_application_by_center', http)
|
||||
}
|
||||
|
||||
getPdfReport(academic_year_uid,academic_semester_uid,branch_uid,testing_field_uid,testing_center_uid,subject_uid,from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${branch_uid}/${testing_field_uid}/${testing_center_uid}/${subject_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(academic_year_uid,academic_semester_uid,branch_uid,testing_field_uid,testing_center_uid,subject_uid,from_date,to_date) {
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PaymentAndApplicationBySubjectService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/payment_and_application_by_subject', http)
|
||||
}
|
||||
|
||||
getPdfReport(academic_year_uid,academic_semester_uid,subject_uid,from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${subject_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(academic_year_uid,academic_semester_uid,subject_uid,from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${subject_uid}/${from_date}/${to_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from 'src/app/core/base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PeriodRegisterPaymentOnlineService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/payment/print/period_register_payment_online',http)
|
||||
}
|
||||
|
||||
etest103Online(data){
|
||||
return (`${this.fullUrl}/${data.start_date}/${data.end_date}/view`)
|
||||
}
|
||||
|
||||
etest103InformationOnline(data) {
|
||||
return (`${this.fullUrl}_testing_information/${data.testing_information_uid}/${data.start_date}/${data.end_date}/view`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from 'src/app/core/base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class PeriodRegisterPaymentService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/payment/print/period_register_payment', http)
|
||||
}
|
||||
|
||||
etest103(data) {
|
||||
return (`${this.fullUrl}/${data.start_date}/${data.end_date}/view`)
|
||||
}
|
||||
|
||||
etest103Information(data) {
|
||||
return (`${this.fullUrl}_testing_information/${data.testing_information_uid}/${data.start_date}/${data.end_date}/view`)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
import { environment } from 'src/environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ReceiptByPaymentCodeService extends BaseService {
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/print/receipt_by_payment_code', http)
|
||||
}
|
||||
|
||||
getPDF(paymentcode){
|
||||
return this.http.get(`https://ru.71dev.com/etest-admin/api/report/print/receipt_by_payment_code/256400052/pdf`);
|
||||
}
|
||||
|
||||
getPdfReport(paymentcode) {
|
||||
this.requestUrl = `${this.fullUrl}/${paymentcode}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getPdfReportRealUat(registeruid) {
|
||||
// this.requestUrl = `${this.fullUrl}/${registeruid}/pdf`;
|
||||
this.requestUrl = `${environment.adminApi}/api/report/print/receipt_form_for_all/${registeruid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getPdfReportReceiptForAll(registeruid) {
|
||||
// this.requestUrl = `${this.fullUrl}/${registeruid}/pdf`;
|
||||
this.requestUrl = `${environment.adminApi}/api/report/print/receipt_for_all/${registeruid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getPdfReportCopy(paymentcode) {
|
||||
this.requestUrl = `${environment.adminApi}/api/report/print/receipt_copy_by_payment_code/${paymentcode}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getPdfReportCopyRealUat(registeruid) {
|
||||
this.requestUrl = `${environment.adminApi}/api/report/print/receipt_copy_for_all/${registeruid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
// return this.http.get<T>(`${environment.adminApi}/api/v1/register/testing_receipts_paymant/${paymentcode}`);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class ReceiptAllService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/print/receipt_form_for_all', http)
|
||||
}
|
||||
|
||||
getPdfReport(registeruid) {
|
||||
this.requestUrl = `${this.fullUrl}/${registeruid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
25
src/app/core/service/report/reciept/reciept.service.ts
Normal file
25
src/app/core/service/report/reciept/reciept.service.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RecieptService extends BaseService {
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/print/receipt', http)
|
||||
}
|
||||
|
||||
getPdfReport(registeruid) {
|
||||
this.requestUrl = `${this.fullUrl}/${registeruid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RegisterByPaymentService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/register_by_payment', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid, from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid, from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${from_date}/${to_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
import {environment} from '../../../../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SeparatedByExamCenterService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report//Test/separated_by_exam_center', http)
|
||||
super.fullUrl = `${environment.storeApi}/api/report/Test/separated_by_exam_center`
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid, subject_uid, branch_uid,start_date,end_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${subject_uid}/${branch_uid}/${start_date}/${end_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid, subject_uid, branch_uid,start_date,end_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${subject_uid}/${branch_uid}/${start_date}/${end_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SettingTestingCenterService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/setting_testing_center', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid,academic_year_uid,academic_semester_uid,from_date,to_date) {
|
||||
this.requestUrl =
|
||||
`${this.fullUrl}/${testing_information_uid}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid,academic_year_uid,academic_semester_uid,from_date,to_date) {
|
||||
this.requestUrl =
|
||||
`${this.fullUrl}/${testing_information_uid}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import { environment } from 'src/environments/environment';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SettingTestingRoomService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/setting_testing_room', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid,academic_year_uid,academic_semester_uid,branch_uid,testing_field_uid,testing_center_uid,from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${academic_year_uid}/${academic_semester_uid}/${branch_uid}/${testing_field_uid}/${testing_center_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid,academic_year_uid,academic_semester_uid,branch_uid,testing_field_uid,testing_center_uid,from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${academic_year_uid}/${academic_semester_uid}/${branch_uid}/${testing_field_uid}/${testing_center_uid}/${from_date}/${to_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
|
||||
getPdfReport16(subject_uid,testing_information_uid) {
|
||||
this.requestUrl = `${environment.storeApi}/api/report/Test/exam_result_subject/${subject_uid}/${testing_information_uid}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport16(subject_uid,testing_information_uid) {
|
||||
this.requestUrl = `${environment.storeApi}/api/report/Test/exam_result_subject/${subject_uid}/${testing_information_uid}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
|
||||
getPdfReport17(testing_information_uid,academic_year_code,academic_semester_code,branch_uid,testing_center_uid,room_name_th) {
|
||||
this.requestUrl = `${environment.storeApi}/api/report/Test/summary_candidates_absentees_passers/${testing_center_uid}/${academic_year_code}/${branch_uid}/${testing_information_uid}/${academic_semester_code}/${room_name_th}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport17(testing_information_uid,academic_year_code,academic_semester_code,branch_uid,testing_center_uid,room_name_th) {
|
||||
this.requestUrl = `${environment.storeApi}/api/report/Test/summary_candidates_absentees_passers/${testing_center_uid}/${academic_year_code}/${branch_uid}/${testing_information_uid}/${academic_semester_code}/${room_name_th}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SignatureExaminationService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/signature_examination', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid,branch_uid,testing_field_uid,testing_center_uid,period_id,test_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${branch_uid}/${testing_field_uid}/${testing_center_uid}/${period_id}/${test_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid,branch_uid,testing_field_uid,testing_center_uid,period_id,test_date){
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${branch_uid}/${testing_field_uid}/${testing_center_uid}/${period_id}/${test_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SummaryCandidateService extends BaseService {
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/candidate/print/summary_application', http)
|
||||
}
|
||||
|
||||
getPdfReport(academic_year_uid, academic_semester_uid, from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(academic_year_uid, academic_semester_uid, from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {environment} from '../../../../../environments/environment';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class SummaryCandidatesAbsenteesPassersService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/Test/summary_candidates_absentees_passers', http)
|
||||
super.fullUrl = `${environment.storeApi}/api/report/Test/summary_candidates_absentees_passers`
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid,academic_year_code,academic_semester_code,branch_uid,testing_center_uid,room_name_th) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_center_uid}/${academic_year_code}/${branch_uid}/${testing_information_uid}/${academic_semester_code}/${room_name_th}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingCenterInformationService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/testing_center_information', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid, subject_uid, academic_year_uid,academic_semester_uid,from_date, to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${subject_uid}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid, subject_uid, academic_year_uid,academic_semester_uid,from_date, to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${subject_uid}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from "@angular/common/http";
|
||||
import {BaseService} from "../../../base/base-service";
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingRegistrationService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/testing_registration', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid,academic_year_uid, academic_semester_uid, from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid,academic_year_uid, academic_semester_uid, from_date,to_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${academic_year_uid}/${academic_semester_uid}/${from_date}/${to_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {environment} from '../../../../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingRoomService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/testing_room', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid){
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {map} from 'rxjs/operators';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TestingSeatAndRoomService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/registration/print/testing_seat_room', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid,branch_uid,period_id, test_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${branch_uid}/${period_id}/${test_date}/pdf`;
|
||||
console.log(this.requestUrl);
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid,branch_uid,period_id, test_date) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/${branch_uid}/${period_id}/${test_date}/xls`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
import { Injectable } from '@angular/core';
|
||||
import {map} from 'rxjs/operators';
|
||||
import {BaseService} from '../../../base/base-service';
|
||||
import {HttpClient} from '@angular/common/http';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class TesingSubjectService extends BaseService {
|
||||
|
||||
requestUrl;
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/report/testing_subject', http)
|
||||
}
|
||||
|
||||
getPdfReport(testing_information_uid) {
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}/pdf`;
|
||||
return this.http.get(this.requestUrl, { responseType: 'blob', observe: 'response'}).pipe(
|
||||
map((res: any) => {
|
||||
return new Blob([res.body], { type: 'application/pdf' });
|
||||
})
|
||||
);
|
||||
}
|
||||
|
||||
getExcelReport(testing_information_uid){
|
||||
this.requestUrl = `${this.fullUrl}/${testing_information_uid}`;
|
||||
window.open(this.requestUrl);
|
||||
return this.requestUrl;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RuStudentRegistersService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/student/ru_student_registers',http)
|
||||
}
|
||||
|
||||
}
|
||||
27
src/app/core/service/ru-student/ru-student.service.ts
Normal file
27
src/app/core/service/ru-student/ru-student.service.ts
Normal file
@@ -0,0 +1,27 @@
|
||||
import { HttpClient, HttpEventType } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { of } from 'rxjs';
|
||||
import { map } from 'rxjs/internal/operators/map';
|
||||
import { catchError } from 'rxjs/operators';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class RuStudentService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/student/ru',http)
|
||||
}
|
||||
|
||||
uploadStudent(target: FormData){
|
||||
return this.http.post(`${this.fullUrl}/student_upload`,target)
|
||||
}
|
||||
|
||||
registerUpload(code,target: FormData){
|
||||
return this.http.post(`${this.fullUrl}/register_upload/${code}`,target)
|
||||
}
|
||||
|
||||
}
|
||||
15
src/app/core/service/security/app-object.service.ts
Normal file
15
src/app/core/service/security/app-object.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppObjectService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/security/app_objects',http)
|
||||
}
|
||||
}
|
||||
15
src/app/core/service/security/app-permission.service.ts
Normal file
15
src/app/core/service/security/app-permission.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppPermissionService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/security/app_permissions',http)
|
||||
}
|
||||
}
|
||||
15
src/app/core/service/security/app-role.service.ts
Normal file
15
src/app/core/service/security/app-role.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppRoleService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/security/app_roles',http)
|
||||
}
|
||||
}
|
||||
72
src/app/core/service/security/app-token.service.ts
Normal file
72
src/app/core/service/security/app-token.service.ts
Normal file
@@ -0,0 +1,72 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { JwtHelperService } from '@auth0/angular-jwt';
|
||||
|
||||
import { tap } from 'rxjs/operators';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
export interface Right {
|
||||
obj: string;
|
||||
perm: string;
|
||||
filter: string;
|
||||
}
|
||||
|
||||
export interface UserToken {
|
||||
login: string;
|
||||
display: string;
|
||||
token: string;
|
||||
rights: Right[];
|
||||
user_uid: string;
|
||||
}
|
||||
|
||||
export interface ExtractUser {
|
||||
// งานหลักสูตร|ALL: string;
|
||||
user_uid: string;
|
||||
login_name: string;
|
||||
display_name: string;
|
||||
agency_uid: string;
|
||||
exp: number;
|
||||
iss: string;
|
||||
aud: string;
|
||||
}
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppTokenService extends BaseService {
|
||||
|
||||
user: UserToken
|
||||
|
||||
constructor(public http : HttpClient) {
|
||||
super('/security/app_tokens',http);
|
||||
}
|
||||
|
||||
exchangeToken(){
|
||||
return this.http.get<UserToken>(`${this.fullUrl}`,{}).pipe(
|
||||
// tap(x => console.log(x)),
|
||||
tap(res => this.user = {...res})
|
||||
)
|
||||
}
|
||||
|
||||
getDataTokens(){
|
||||
return this.http.get(`${this.fullUrl}`)
|
||||
}
|
||||
|
||||
getToken() {
|
||||
return this.user?.token
|
||||
}
|
||||
|
||||
getPerm(role){
|
||||
// console.log(role)
|
||||
// console.log(this.user)
|
||||
return this.user.rights.find(obj => obj.obj == role)?.perm
|
||||
}
|
||||
|
||||
decodeToken(): ExtractUser {
|
||||
const helper = new JwtHelperService();
|
||||
const decodedToken = helper.decodeToken(this.user?.token);
|
||||
// console.log(decodedToken)
|
||||
return decodedToken
|
||||
}
|
||||
|
||||
}
|
||||
15
src/app/core/service/security/app-user.service.ts
Normal file
15
src/app/core/service/security/app-user.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AppUserService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/security/app_users',http)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class InsturctorPaymentAccoutService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/instructor_payment_accounts', http)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class invigilatorCostService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/invigilator_costs', http)
|
||||
}
|
||||
}
|
||||
15
src/app/core/service/settings/academic-semester.service.ts
Normal file
15
src/app/core/service/settings/academic-semester.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AcademicSemesterService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/academic_semesters', http)
|
||||
}
|
||||
}
|
||||
15
src/app/core/service/settings/academic-year.service.ts
Normal file
15
src/app/core/service/settings/academic-year.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class AcademicYearService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/academic_years', http)
|
||||
}
|
||||
}
|
||||
20
src/app/core/service/settings/branch.service.ts
Normal file
20
src/app/core/service/settings/branch.service.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class BranchService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/branchs', http);
|
||||
}
|
||||
|
||||
getAllStatus1(){
|
||||
return this.http.get(`${this.fullUrl}?status_id=1`);
|
||||
}
|
||||
}
|
||||
|
||||
15
src/app/core/service/settings/calendar-type.service.ts
Normal file
15
src/app/core/service/settings/calendar-type.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class CalendarTypeService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/calendar_types', http)
|
||||
}
|
||||
}
|
||||
15
src/app/core/service/settings/department.service.ts
Normal file
15
src/app/core/service/settings/department.service.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { BaseService } from '../../base/base-service';
|
||||
|
||||
@Injectable({
|
||||
providedIn: 'root'
|
||||
})
|
||||
export class DepartmentService extends BaseService {
|
||||
|
||||
constructor(
|
||||
public http: HttpClient
|
||||
) {
|
||||
super('/v1/setting/departments', http);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user