modifications

main
sajan 3 years ago
commit 52f1fd5473

@ -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'.

@ -0,0 +1,16 @@
# Editor configuration, see https://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
insert_final_newline = true
trim_trailing_whitespace = true
[*.ts]
quote_type = single
[*.md]
max_line_length = off
trim_trailing_whitespace = false

120
.gitignore vendored

@ -0,0 +1,120 @@
# ---> Node
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
lerna-debug.log*
.pnpm-debug.log*
# Diagnostic reports (https://nodejs.org/api/report.html)
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
# Runtime data
pids
*.pid
*.seed
*.pid.lock
# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov
# Coverage directory used by tools like istanbul
coverage
*.lcov
# nyc test coverage
.nyc_output
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
.grunt
# Bower dependency directory (https://bower.io/)
bower_components
# node-waf configuration
.lock-wscript
# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release
# Dependency directories
node_modules/
jspm_packages/
# Snowpack dependency directory (https://snowpack.dev/)
web_modules/
# TypeScript cache
*.tsbuildinfo
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# dotenv environment variables file
.env
.env.test
.env.production
# parcel-bundler cache (https://parceljs.org/)
.cache
.parcel-cache
# Next.js build output
.next
out
# Nuxt.js build / generate output
.nuxt
dist
# Gatsby files
.cache/
# Comment in the public line in if your project uses Gatsby and not Next.js
# https://nextjs.org/blog/next-9-1#public-directory-support
# public
# vuepress build output
.vuepress/dist
# Serverless directories
.serverless/
# FuseBox cache
.fusebox/
# DynamoDB Local files
.dynamodb/
# TernJS port file
.tern-port
# Stores VSCode versions used for testing VSCode extensions
.vscode-test
# yarn v2
.yarn/cache
.yarn/unplugged
.yarn/build-state.yml
.yarn/install-state.gz
.pnp.*

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2021 Flatlogic
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

@ -0,0 +1,80 @@
# Angular Material Admin Lite - free and open source angular admin dashboard template
Including responsive layout and high quality UI built with Angular Material.
[Demo](https://flatlogic.com/templates/angular-material-admin/demo) | [Download](https://github.com/flatlogic/angular-material-admin/archive/master.zip) | [Available versions](https://demo.flatlogic.com/angular-material-admin/) | [More templates](https://flatlogic.com/admin-dashboards) | [Support forum](https://flatlogic.com/forum)
![1 (1)](https://user-images.githubusercontent.com/17360676/84912599-41a99c00-b0c2-11ea-8d9b-6c05a398b8ca.jpg)
This repository contains a limited free version.
## Features
Using this template you will be able to leverage lots of built-in components and thus focus on building features that set you apart from competitors rather than bulding everything from scratch. Lite version of Angular Material Admin includes following features and pages:
* Angular Material & SCSS
* Responsive layout
* Styled Angular Material components like buttons, cards, etc
* Dashboard sample
* Typography
* Tables
* Notifications
* Base charts
* Icons
* Maps
* Hover sidebar
* Login
* 404
![2 (1)](https://user-images.githubusercontent.com/17360676/84912752-6b62c300-b0c2-11ea-9ff0-f92bad33f2b0.jpg)
Building a project from scratch means that there is a lot of things to keep track of all at once: analytics, dynamic forms data, UI and UX elements, and much more. This simple admin template is well suited for web apps or any other website or project that requires admin dashboard. This template will serve as a solid foundation for your upcoming project and will save you a lot of time and, hence, money.
## Quick Start
#### 1. Get the latest version
You can start by cloning the latest version of Angular Material Admin on your local machine by running:
```shell
$ git clone -o angular-material-admin -b master --single-branch \
https://github.com/flatlogic/angular-material-admin.git MyApp
$ cd MyApp
```
#### 2. Run `npm install`
This will install both run-time project dependencies and developer tools listed
in [package.json](../package.json) file.
#### 3. Run `npm start`
This command will build the app from the source files. Then open `localhost:4200` in your browser.
Now you can open your web app in a browser, on mobile devices and start
hacking. The page must be served from a web server, e.g. apache, nginx, WebStorm built-in web server, etc., otherwise some features may not work properly.
## Integration
![3 (1)](https://user-images.githubusercontent.com/17360676/84912873-8b928200-b0c2-11ea-9e72-5aac8e8f339e.jpg)
Angular Material Admin is a part of admin dashboard solution provided by Flatlogic. We can integrate admin dashboards with such systems as your accounting software, customer relationship management (CRM) system, email management, marketing automation, website analytics program, etc. Customized Angular Material Admin can be a great way to learn about your products usability and extendability. With this dashboard, the owner of the website (platform) can easily track orders and their success rate, track social metrics such as the most popular referring social media sites and their appropriate URLs, monitor sales states and periods of growth to better understand what makes users tick. [Contact us](https://flatlogic.com/contact) to learn more.
## Support
For any additional information please go to our [**support forum**](https://flatlogic.com/forum) and raise your questions or feedback provide there. We highly appreciate your participation!
## How can I support developers?
- Star our GitHub repo :star:
- [Tweet about it](https://twitter.com/intent/tweet?text=Amazing%20dashboard%20built%20with%20NodeJS,%20React%20and%20Bootstrap!&url=https://github.com/flatlogic/sing-app&via=flatlogic).
- Create pull requests, submit bugs, suggest new features or documentation updates :wrench:
- Follow [@flatlogic on Twitter](https://twitter.com/flatlogic).
- Subscribe to Flatlogic newsletter at [flatlogic.com](https://flatlogic.com/)
- Like our page on [Facebook](https://www.facebook.com/flatlogic/) :thumbsup:
## More from Flatlogic
- [Awesome Bootstrap Checkboxes & Radios](https://github.com/flatlogic/awesome-bootstrap-checkbox) - ✔Pure css way to make inputs look prettier
- [React Native Starter](https://github.com/flatlogic/react-native-starter) - 🚀 A powerful react native starter template that bootstraps development of your mobile application
## Premium themes
Looking for premium themes and templates? Check out our other templates at [flatlogic.com](https://flatlogic.com/templates).
## License
The source code for the template is licensed under the MIT license, which you can find in
the LICENSE.txt file.

@ -0,0 +1,114 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"cli": {
"analytics": false
},
"version": 1,
"newProjectRoot": "projects",
"projects": {
"angular-material-admin": {
"projectType": "application",
"schematics": {},
"root": "",
"sourceRoot": "src",
"prefix": "app",
"architect": {
"build": {
"builder": "@angular-devkit/build-angular:browser",
"options": {
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.app.json",
"aot": true,
"assets": [
"src/favicon.ico",
"src/assets"
],
"styles": [
"./node_modules/font-awesome/scss/font-awesome.scss",
"node_modules/bootstrap-icons/font/bootstrap-icons.css",
"./node_modules/ngx-toastr/toastr.css",
"src/custom-theme.scss",
"./node_modules/sweetalert2/dist/sweetalert2.css"
],
"scripts": [ "./node_modules/sweetalert2/dist/sweetalert2.js"]
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
"namedChunks": false,
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true,
"budgets": [
{
"type": "initial",
"maximumWarning": "2mb",
"maximumError": "5mb"
},
{
"type": "anyComponentStyle",
"maximumWarning": "6kb",
"maximumError": "10kb"
}
]
},
"hmr": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.hmr.ts"
}
]
}
}
},
"serve": {
"builder": "@angular-devkit/build-angular:dev-server",
"options": {
"browserTarget": "angular-material-admin:build"
},
"configurations": {
"production": {
"browserTarget": "angular-material-admin:build:production"
},
"hmr": {
"hmr": true,
"browserTarget": "angular-material-admin:build:hmr"
}
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
"options": {
"browserTarget": "angular-material-admin:build"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.app.json",
"tsconfig.spec.json",
"e2e/tsconfig.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}
},
"defaultProject": "angular-material-admin"
}

@ -0,0 +1,71 @@
# Changelog
## [1.0.6] - 07/09/2021
### Updated
- Added MIT License
## [1.0.5] - 05/10/2021
### Fixed
- Fixed ngx-echarts error
## [1.0.4] - 05/10/2021
### Updated
- Updated the Angular builder;
- Updated the Angular CLI;
- Update Angular Material;
- Added new package "resize-observer-polyfill" which is dependency of "ngx-echarts"
###Updated packages
@angular/animations: 9.1.12 -> 11.2.13
@angular/cdk: 9.2.4 -> 11.2.11
@angular/common: 9.1.12 -> 11.2.13
@angular/compiler: 9.1.12 -> 11.2.13
@angular/core: 9.1.12 -> 11.2.13
@angular/forms: 9.1.12 -> 11.2.13
@angular/material: 9.2.4 -> 11.2.12
@angular/platform-browser: 9.1.12 -> 11.2.13
@angular/platform-browser-dynamic: 9.1.12 -> 11.2.13
@angular/router: 9.1.12 -> 11.2.13
@angular-devkit/build-angular: 0.901.12 -> 0.1102.12
@angular/cli: 9.1.12 -> 11.2.12
@angular/compiler-cli: 9.1.12 -> 11.2.13
@angular/language-service: 9.1.12 -> 11.2.13
@types/echarts: 4.6.7 -> 4.9.7
@types/jasmine: 3.5.14 -> 3.6.0
tslib: 1.10.0 -> 2.0.0
codelyzer: 5.1.2 -> 6.0.0
typescript: 3.8.3 -> 4.1.5
apexcharts: 3.19.3 -> 3.26.2
echarts: 4.7.0 -> 5.1.1
ng-apexcharts: 1.2.3 -> 1.5.9
ngx-echarts: 4.2.2 -> 6.0.1
ngx-toastr: 12.0.1 -> 13.2.1
ngx-trend: 5.0.1 -> 6.1.1
rxjs: 6.5.5 -> 7.0.0
###Added packages
resize-observer-polyfill: 1.5.1
## [1.0.3]
### Fixed
- Notifications: fix titles
- Tables add more padding
- Add unlock-button
- Clear code
## [1.0.2]
### Update
- Minor package updates
## [1.0.1]
### Added
- The added configuration for router module.
## [1.0.0]
### Added
- Added Angular Material Admin v1.0.0

29924
package-lock.json generated

File diff suppressed because it is too large Load Diff

@ -0,0 +1,69 @@
{
"name": "angular-material-admin",
"version": "1.0.6",
"scripts": {
"ng": "ng",
"start": "ng serve",
"build": "ng build --prod",
"lint": "ng lint",
"hmr": "ng serve --configuration hmr"
},
"private": true,
"dependencies": {
"@agm/core": "^1.1.0",
"@angular/animations": "^11.2.13",
"@angular/cdk": "^11.2.12",
"@angular/common": "~11.2.13",
"@angular/compiler": "~11.2.13",
"@angular/core": "~11.2.13",
"@angular/forms": "~11.2.13",
"@angular/material": "^11.2.12",
"@angular/material-moment-adapter": "^12.0.0",
"@angular/platform-browser": "~11.2.13",
"@angular/platform-browser-dynamic": "~11.2.13",
"@angular/router": "~11.2.13",
"@ng-idle/core": "^11.1.0",
"@ng-idle/keepalive": "^11.0.3",
"@ngx-translate/core": "^13.0.0",
"@ngx-translate/http-loader": "^6.0.0",
"angular-dual-listbox": "^6.0.0",
"apexcharts": "3.26.2",
"bootstrap": "^5.1.3",
"bootstrap-icons": "^1.10.5",
"crypto-js": "^4.1.1",
"echarts": "5.1.1",
"file-saver": "^2.0.5",
"font-awesome": "^4.7.0",
"moment": "^2.29.1",
"ng-apexcharts": "1.5.9",
"ng-otp-input": "^1.8.1",
"ngx-bootstrap": "^7.0.0",
"ngx-echarts": "6.0.1",
"ngx-mat-timepicker": "^15.1.3",
"ngx-toastr": "13.2.1",
"ngx-trend": "6.1.1",
"pdfmake": "^0.2.5",
"rxjs": "7.0.0",
"sweetalert2": "^11.7.16",
"to-words": "^3.2.0",
"tslib": "^2.0.0",
"xlsx": "^0.16.9",
"zone.js": "~0.10.3"
},
"devDependencies": {
"@angular-devkit/build-angular": "~0.1102.12",
"@angular/cli": "~11.2.12",
"@angular/compiler-cli": "~11.2.13",
"@angular/language-service": "~11.2.13",
"@angularclass/hmr": "^2.1.3",
"@types/echarts": "^4.9.7",
"@types/jasmine": "~3.6.0",
"@types/jasminewd2": "~2.0.8",
"@types/node": "^12.12.64",
"codelyzer": "^6.0.0",
"resize-observer-polyfill": "^1.5.1",
"ts-node": "~8.3.0",
"tslint": "~6.1.0",
"typescript": "4.1.5"
}
}

@ -0,0 +1,35 @@
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, CanActivateChild } from '@angular/router';
import { Observable } from 'rxjs';
import { routePath } from 'src/app/_providers/_resources/route-path.properties';
/*
Created By : Arun Joy
Created On : 04-01-2020
Created For : For handling the route path of the application.
For provding security i.e it blocks unautherized acess of rote paths.
*/
@Injectable({
providedIn: 'root'
})
export class AppGuard implements CanActivate {
constructor(
private router: Router
){}
canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean> | Promise<boolean> | boolean {
const currentUser = localStorage.getItem("authtoken");
console.log("===currentUser====",currentUser);
if (!currentUser) {
return true;
}
this.router.navigate([routePath.dashboard]);
return false;
}
}

@ -0,0 +1,65 @@
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, CanActivateChild } from '@angular/router';
import { Observable } from 'rxjs';
import { routePath } from 'src/app/_providers/_resources/route-path.properties';
import { CryptoService } from '../_security/crypto.service';
/*
Created By : Arun Joy
Created On : 04-01-2020
Created For : For handling the route path of the application.
For provding security i.e it blocks unautherized acess of rote paths.
*/
@Injectable({
providedIn: 'root'
})
export class AuthStudentGuard implements CanActivate, CanActivateChild {
constructor(
private router: Router,
// private lan: LangaugeTranslateService,
private crypto: CryptoService
) { }
async canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Promise<boolean>
// | Observable<boolean> | boolean
{
const currentUser = localStorage.getItem("authtoken");
const secuLevel = localStorage.getItem("seculevel");
console.log("==sec level===", secuLevel);
if (currentUser && secuLevel.toString() == "2") {
// await this.lan.init();
return true;
}
let authKey = localStorage.getItem("authKey");
//Ayth key null check Added
if (authKey)
authKey = this.crypto.decrypt(authKey);
let url = '';
if (authKey)
url = `${authKey}${routePath.login}`;
else
url = routePath.login;
console.log("=====url===", url);
await this.router.navigate([url], { queryParams: { returnUrl: state.url } });
return false;
}
canActivateChild(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot,
): Observable<boolean> | Promise<boolean> | boolean {
// if (state.url != "/404" && (this.service.menus && this.service.menus.length > 0 && !this.service.menus.some(menu => menu.routerLink === state.url.split(";")[0])))
// this.router.navigate([routePath.dashboard]);
return true;
}
}

@ -0,0 +1,61 @@
import { Injectable } from '@angular/core';
import { CanActivate, ActivatedRouteSnapshot, RouterStateSnapshot, Router, CanActivateChild } from '@angular/router';
import { Observable } from 'rxjs';
import { routePath } from 'src/app/_providers/_resources/route-path.properties';
import { CryptoService } from '../_security/crypto.service';
/*
Created By : Sajan
Created On : 11-07-2023
Created For : For handling the route path of the application.
For provding security i.e it blocks unautherized acess of rote paths.
*/
@Injectable({
providedIn: 'root'
})
export class AuthGuard implements CanActivate, CanActivateChild {
constructor(
private router: Router,
// private lan: LangaugeTranslateService,
private crypto: CryptoService
) { }
async canActivate(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Promise<boolean>
// | Observable<boolean> | boolean
{
const currentUser = localStorage.getItem("authtoken");
if (currentUser ) {
// await this.lan.init();
return true;
}
let authKey = localStorage.getItem("authKey");
//Ayth key null check Added
if (authKey)
authKey = this.crypto.decrypt(authKey);
let url = '';
if (authKey) {
url = `${authKey}${routePath.home}`;
}
url = routePath.home;
await this.router.navigate([url], { queryParams: { returnUrl: state.url } });
return false;
}
canActivateChild(
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot,
): Observable<boolean> | Promise<boolean> | boolean {
// if (state.url != "/404" && (this.service.menus && this.service.menus.length > 0 && !this.service.menus.some(menu => menu.routerLink === state.url.split(";")[0])))
// this.router.navigate([routePath.dashboard]);
return true;
}
}

@ -0,0 +1,23 @@
import { Injectable } from '@angular/core';
import { CanDeactivate, ActivatedRouteSnapshot, RouterStateSnapshot, UrlTree } from '@angular/router';
import { Observable } from 'rxjs';
import { DirtyComponent } from './model/dirty-component';
@Injectable({
providedIn: 'root'
})
export class DirtyCheckGuard implements CanDeactivate<DirtyComponent> {
canDeactivate(
component: DirtyComponent,
next: ActivatedRouteSnapshot,
state: RouterStateSnapshot): Observable<boolean | UrlTree> | Promise<boolean | UrlTree> | boolean | UrlTree {
if (component.canDeactivate()) {
return confirm('There are changes you have made to the page. If you quit, you will lose your changes.');
} else {
return true;
}
}
}

@ -0,0 +1,5 @@
import {Observable} from 'rxjs';
export declare interface DirtyComponent {
canDeactivate: () => boolean | Observable<boolean>;
}

@ -0,0 +1,102 @@
import { Injectable } from "@angular/core";
import { HttpInterceptor, HttpRequest, HttpHandler, HttpResponse } from "@angular/common/http";
import { catchError, tap } from "rxjs/operators";
import { throwError } from "rxjs";
import { Router } from '@angular/router';
import { CryptoService } from '../_security/crypto.service';
import { routePath } from "src/app/_providers/_resources/route-path.properties";
/*
Created By : Arun Joy
Created On : 03-01-2020
Created For : For handling the http api request before it calling.
*/
@Injectable()
export class AuthHeaderInterceptor implements HttpInterceptor {
constructor(
private crypto: CryptoService,
private router: Router
) { }
intercept(request: HttpRequest<any>, next: HttpHandler) {
if (request.url.includes('auth'))
return next.handle(this.addAuthKey(request))
if (request.url.startsWith('assets/') && request.url.endsWith('.json'))
return next.handle(request)
return next.handle(this.addAuthenticationToken(request))
.pipe(catchError(error => {
if (error.status === 401) {
return next.handle(this.addAuthenticationToken(request, true))
.pipe(
tap(event => {
if (event instanceof HttpResponse) {
localStorage.setItem("authtoken", event.headers.get('Authorization'));
}
}),
catchError(err => {
if (error.status === 401) {
this.presentAlert();
}
return throwError(error);
}));
}
return throwError(error);
}));
}
private addAuthKey(request: HttpRequest<any>): HttpRequest<any>{
// If we do not have a token yet then we should not set the header.
// Here we could first retrieve the token from where we store it.
let authKey = localStorage.getItem("authKey");
// authKey = this.crypto.decrypt(authKey);
if (!authKey) {
return request;
}
return request.clone({
setHeaders: {
'authkey': `${authKey}`,
},
});
}
private addAuthenticationToken(request: HttpRequest<any>, hasRefreshToken?: boolean): HttpRequest<any> {
// If we do not have a token yet then we should not set the header.
// Here we could first retrieve the token from where we store it.
const authtoken = localStorage.getItem('authtoken');
const emailId = localStorage.getItem('emailId') ? localStorage.getItem('emailId') : "";
const module = localStorage.getItem('module') ? localStorage.getItem('module') : "";
const refreshtoken = localStorage.getItem('refreshtoken');
const authKey = localStorage.getItem('authKey');
if (!authtoken) {
return request;
}
// If you are calling an outside domain then do not add the token.
// if (!request.url.match(/www.mydomain.com\//)) {
// return request;
// }
return request.clone({
setHeaders: {
Authorization: `Bearer ${this.crypto.get("accessToken@#123", (!authtoken ? "" : authtoken))}`,
'refreshtoken': !hasRefreshToken ? '' : `${this.crypto.get("accessToken@#123", (!refreshtoken ? "" : refreshtoken))}`,
'emailid': `${emailId}`,
'module': `${module}`,
'authkey': `${authKey}`,
},
});
}
async presentAlert() {
localStorage.setItem("authtoken", "");
localStorage.setItem("refreshtoken", "");
localStorage.removeItem("authtoken");
localStorage.removeItem("refreshtoken");
localStorage.removeItem("media");
this.router.navigate([routePath.login]);
}
}

@ -0,0 +1,12 @@
import { HTTP_INTERCEPTORS } from '@angular/common/http'
import { AuthHeaderInterceptor } from './auth-header.interceptor';
/*
Created By : Arun Joy
Created On : 03-01-2020
Created For : For handling the http api interceptor.
*/
export const HttpInterceptProviders = [
{provide: HTTP_INTERCEPTORS, useClass: AuthHeaderInterceptor, multi: true}
];

@ -0,0 +1,46 @@
import { Injectable } from '@angular/core';
import * as CryptoJS from 'crypto-js';
/*
Created By : Arun Joy
Created On : 13-01-2020
Created For : For decrypting the crypto encrpited data.
*/
@Injectable({
providedIn: 'root'
})
export class CryptoService {
constructor() { }
//The get method is use for decrypt the value.
get(keys, value) {
var key = CryptoJS.enc.Utf8.parse(keys);
var iv = CryptoJS.enc.Utf8.parse(keys);
var decrypted = CryptoJS.AES.decrypt(value, key, {
keySize: 128 / 8,
iv: iv,
mode: CryptoJS.mode.CBC,
padding: CryptoJS.pad.Pkcs7
});
// console.log("====value=====", decrypted.toString(CryptoJS.enc.Utf8));
return decrypted.toString(CryptoJS.enc.Utf8);
}
encrypt(value) {
let b64 = CryptoJS.AES.encrypt(value.toString(), "etarucca").toString();
let e64 = CryptoJS.enc.Base64.parse(b64);
let encryptedCode = e64.toString(CryptoJS.enc.Hex);
return encryptedCode;
}
decrypt(value) {
var reb64 = CryptoJS.enc.Hex.parse(value);
var bytes = reb64.toString(CryptoJS.enc.Base64);
var decrypt = CryptoJS.AES.decrypt(bytes, "etarucca");
var dycryptedCode = decrypt.toString(CryptoJS.enc.Utf8);
return dycryptedCode;
}
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { CoreComponent } from './core.component';
describe('CoreComponent', () => {
let component: CoreComponent;
let fixture: ComponentFixture<CoreComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ CoreComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(CoreComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'lib-core',
template: `
<p>
core works!
</p>
`,
styles: [
]
})
export class CoreComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

@ -0,0 +1,12 @@
import { NgModule } from '@angular/core';
import { CoreComponent } from './core.component';
@NgModule({
declarations: [CoreComponent],
imports: [
],
exports: [CoreComponent]
})
export class CoreModule { }

@ -0,0 +1,16 @@
import { TestBed } from '@angular/core/testing';
import { CoreService } from './core.service';
describe('CoreService', () => {
let service: CoreService;
beforeEach(() => {
TestBed.configureTestingModule({});
service = TestBed.inject(CoreService);
});
it('should be created', () => {
expect(service).toBeTruthy();
});
});

@ -0,0 +1,9 @@
import { Injectable } from '@angular/core';
@Injectable({
providedIn: 'root'
})
export class CoreService {
constructor() { }
}

@ -0,0 +1,9 @@
export class AuthCreadentialsDto {
username: string;
password: string;
module?: string;
}

@ -0,0 +1,13 @@
/*
Created By : Arun Joy
Created On : 07-01-2020
Created For : For creating dto for autehntication
*/
export class AuthenticationDto {
username: string = "";
password: string = "";
confpassword?: string = "";
email:string= "";
}

@ -0,0 +1,9 @@
export class FilterJsonDto {
search: string | null;
sessionId: number | null;
courseId: number | null;
sectionId: number | null;
activeStatusId: string | null;
studentId: number | null;
admitStatusId: number | null;
}

@ -0,0 +1,41 @@
export class IgenMenuDto {
menuId: string;
description: string;
routerLink: string;
parentMenuId: string;
menuType: string = "1";
icon: string;
isMegaMenu: boolean;
displaySeq: number;
interfaceYn: string = "N";
coCode: string;
tableName: string;
openMultipleTab: string = "N";
tableDesc: string;
menuEnabled: string = "N";
languageLabelCode: string;
rightsGiven: string;
submenu?: IgenMenuDto[];
role:string;
project: string;
}

@ -0,0 +1,9 @@
export class IgissueDetailDto {
code: number;
refCode: number;
description: string;
descriptionSl: string;
seen: string;
imagePath: string;
developerYn: string;
}

@ -0,0 +1,23 @@
import { IgissueDetailDto } from "./igissue-detail.dto";
export class IgissueSummaryDto {
code: number;
summary: string;
name: string;
issueType: string;
source: string;
identifiedBy: string;
identifiedDate: Date;
relatedProject: string;
assignedTo: number;
status: string;
priority: string;
targetResolutionDate: Date;
progress: string;
actualResolutionDate: Date;
resolutionSummary: string;
identifiedByEmail: string;
unreadCount: number;
igissueDetailDto?: IgissueDetailDto[];
hold?:string
}

@ -0,0 +1,17 @@
export declare class MenuFormatDto {
label: string;
icon: string;
langaugeLabelCode: string;
data: MenuDataDto;
items?: MenuFormatDto[];
routerLink?: string;
menuId?: string;
isExpanded?:boolean;
isSideMenu?:boolean;
}
export declare class MenuDataDto {
menuId: string;
description: string;
langaugeLabelCode: string;
rightsGiven: string;
}

@ -0,0 +1,14 @@
export class PcdUserDto{
userName : string | null;
pass : string | null;
email: string | null;
otp?:string | null;
mobileNumber: string | null;
confPass? : string | null;
}

@ -0,0 +1,9 @@
export class TenderCoversDto{
tenderId:number;
coverType:string;
Description:string;
fileFormat:string
crud: any;
}

@ -0,0 +1,75 @@
<<<<<<< HEAD
import { TenderCoversDto } from "./tender-covers.dto";
import { TenderDocumentDto } from "./tender-documents.dto";
=======
import { TenderDocumentDto } from "./tender-documents.dto";
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
export class TenderDetailDto{
id: number ;
orgChain: string ;
tenderRefNo: string ;
tenderId: string ;
allowTechEval: string ;
paymentMode: number ;
allowWithdraw: string ;
noOfCovers: number ;
itemwiseTechEval: string ;
allowTwoStageBid: string ;
tenderFee: number ;
feePayableTo: string ;
feePayableAt: string ;
tenderFeeExemption: number ;
emdAmt: number ;
emdPayableTo: string ;
allowEmdBgOrSt: string ;
emdPercentage: number ;
emdPayableAt: string ;
title: string ;
workDesc: string ;
ndaPreQualification: string ;
remarks: string ;
tenderValue: number ;
contractType: string ;
location: string ;
preBidMeetAdd: string ;
allowNdaTender: string ;
productCategory: number ;
bidValidity: number ;
pincode: number ;
preBidDate: Date ;
allowPreferencialBidder: string ;
subCategory: string ;
periodOfWork: number ;
preBidMeetPlace: string ;
bidOpeningPlace: string ;
publishDate: Date ;
saleStartDate: Date ;
clarificationStartDate: Date ;
bidSubStartDate: Date ;
bidOpenDate: Date ;
saleEndDate: Date ;
clarificationEndDate: Date ;
bidSubEndDate: Date ;
tenderInvName: string ;
tenderInvAddess: string ;
tenderType: number ;
tenderCategory: number ;
formOfContract: number ;
emdFeeType: string ;
activeYn: string ;
doc_name: string ;
description: string ;
doc_type: string ;
doc_size: number ;
File: any ;
tenderDoc: TenderDocumentDto[] =[];
crud: any;
<<<<<<< HEAD
covers : TenderCoversDto[] =[];
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}

@ -0,0 +1,20 @@
export class TenderDocumentDto{
tenderId:string;
docName:string;
description:string;
docType:string;
documentSize:number;
file: any;
<<<<<<< HEAD
crud: any;
documentCategory: any;
docCategory: string;
=======
crud: any;
documentCategory: any;
docCategory: string;
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}

@ -0,0 +1,16 @@
/*
Created By : Arun Joy
Created On : 08-01-2020
Created For : For creating dto for token format
*/
export class TokenDto {
accessToken: string;
refreshToken: string;
emailId: string;
module?: string;
}

@ -0,0 +1,200 @@
<div class="container-responsive">
<!-- <mat-progress-bar mode="indeterminate" color="warn"></mat-progress-bar> -->
<br><br>
<div class="container text-center">
<div class="row">
<div class="col-12">
<div class="card-responsive">
<div class="card-body-responsive">
<div class="table-responsive">
<ng-container >
<mat-card class="card">
<div class="top-bar">
<div class="top-left-float">
<span>
<mat-icon style="margin-right: 3px; transform: translateY(10px);">search</mat-icon>
<mat-form-field>
<input matInput placeholder="{{ 'search' | translate }}" style="width: fit-content;"
[(ngModel)]="searchTerm" (keyup.enter)="search()"/>
</mat-form-field>
</span>
<button mat-raised-button style="color: #46AC9E;" (click)="search()"> {{ 'go' | translate }}
</button>
</div>
<div class="top-right-float">
<button mat-raised-button style="color: #46AC9E;" (click)="reset()"> {{ 'reset' | translate }}
</button>
</div>
</div>
<br>
<br>
<mat-table [dataSource]="dataSource" style="min-width: 500px;display: table;" matSort matSortDisableClear="true" (matSortChange)="sortData($event)"
class="table">
<ng-container matColumnDef="slno">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'slno' | translate }}
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element;let i = index" style="padding: 5px;" class="table-content">
{{i+1}}
</td>
</ng-container>
<ng-container matColumnDef="title">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-headers">
{{ 'title' | translate }}
<mat-icon>sort</mat-icon>
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
{{element?.title}}
</td>
</ng-container>
<ng-container matColumnDef="publishedDate">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-headers">
{{ 'publishedDate' | translate }}
<mat-icon>sort</mat-icon>
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
{{element?.publishDate| date:"YYYY-MM-dd"}}
</td>
<!-- <td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button mat-raised-button>edit</button>
</td> -->
</ng-container>
<ng-container matColumnDef="bidOpenDate">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-headers">
{{ 'bidOpenDate' | translate }}
<mat-icon>sort</mat-icon>
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
{{element?.bidOpenDate| date:"YYYY-MM-dd"}}
</td>
<!-- <td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button mat-raised-button>edit</button>
</td> -->
</ng-container>
<ng-container matColumnDef="view">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'view' | translate }}
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button style="padding: 0;" mat-button color="primary"
(click)="goToView(element.id)" [disabled]="false">
<mat-icon style="transform: translate(-12px,-2px);" [ngStyle]="{'color':'#46AC9E'}">
insert_drive_file
</mat-icon>
</button>
</td>
</ng-container>
<ng-container matColumnDef="upload">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'upload' | translate }}
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button style="padding: 0;" mat-button color="primary"
(click)="goToUpload(element.id)" [disabled]="false">
<mat-icon style="transform: translate(-12px,-2px);" [ngStyle]="{'color':'#46AC9E'}">
cloud_upload
</mat-icon>
</button>
</td>
</ng-container>
<ng-container matColumnDef="loading">
<td mat-footer-cell *matFooterCellDef="" colspan="5">
{{ 'loadingData' | translate }}
</td>
</ng-container>
<ng-container matColumnDef="nodata">
<td mat-footer-cell *matFooterCellDef="" colspan="5">
{{ 'noDataToDisplay' | translate }}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
<tr mat-footer-row *matFooterRowDef="['loading']" [ngClass]="{'hide': !loading}"></tr>
<tr mat-footer-row *matFooterRowDef="['nodata']" [ngClass]="{'hide': (!noData || loading)}"></tr>
</mat-table>
<mat-paginator #paginator [length]="pageLength" [pageSize]="10" [pageSizeOptions]="[5, 10, 25, 100]"
aria-label="Select page">
</mat-paginator>
</mat-card>
</ng-container>
<!-- <table class="table table-bordered">
<thead class="table-dark">
<tr>
<th class="col-sm-1">#</th>
<th class="col-sm-6">TENDER NAME</th>
<th class="col-sm-1">REFERENCE ID</th>
<th class="col-sm-1">CLOSING DATE</th>
<th class="col-sm-1">BID OPEN DATE</th>
<th class="col-sm-1">VIEW</th>
<<<<<<< HEAD
=======
<!-- <th class="col-sm-1">UPLOAD</th> -->
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
</thead>
<tbody>
<tr *ngFor="let tender of tenderData; let i = index">
<td class="col-sm-1">{{ i + 1 }}</td>
<td class="col-sm-6 table-break-word">{{ tender.title }}</td>
<td class="col-sm-1 table-break-word">{{ tender.tenderRefNo }}</td>
<td class="col-sm-1 table-break-word">{{ tender.saleEndDate | date: 'dd-MM-yyyy' }}</td>
<td class="col-sm-1 table-break-word">{{ tender.bidOpenDate | date: 'dd-MM-yyyy' }}</td>
<td class="col-sm-1">
<button type="button" class="btn btn-outline-danger btn-sm" (click)="goToView(tender.id)"><i
class="bi bi-card-list"></i></button>
</td>
<<<<<<< HEAD
=======
<!-- <td class="col-sm-1" >
<button type="button" class="btn btn-outline-dark btn-sm" (click)="goToUpload()"><i class="bi bi-upload"></i></button>
</td> -->
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
</tbody>
</table> -->
</div>
</div>
</div>
</div>
</div>
</div><br><br>
<div class="footer" >
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px; bottom: 0;" class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023. </span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>
</div>
</div>

@ -0,0 +1,230 @@
// .header {
// margin-left: 4%;
// margin-top: 20px;
// }
// .header>h6{
// a {
// text-decoration: none;
// color: #262627;
// }
// a:hover {
// text-decoration: underline;
// cursor: pointer;
// }
// }
// mat-card{
// min-width: 180px ;
// // max-width: 20vw;
// height: 200px;
// display: inline-block;
// }
// mat-card:hover{
// cursor: pointer;
// }
// -----------------------------------------------------------------------------------
.nav-link:hover {
color: red;
}
th,
td {
padding: 10px;
// border: 1px solid #ccc;
word-wrap: break-word;
white-space: normal;
}
.h2 {
font-family: sans-serif;
font-size: 26px;
font-weight: 500;
}
.table td {
word-break: break-word;
}
.table-break-word {
word-break: break-word;
}
.top-bar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
border: 1px solid #e3e3e3;
width: 100%;
margin: auto;
padding: auto;
}
.header {
padding: 20px;
width: 100%;
min-width: 350px;
}
.header>h6>a {
text-decoration: none;
color: #262627;
}
.header>h6>a:hover {
text-decoration: underline;
cursor: pointer;
}
mat-card {
min-width: 350px;
}
.top-left-float {
display: flex;
min-width: 282px;
}
.top-right-float {
display: flex;
min-width: 161px;
}
.top-left-float>button,
.top-right-float>button {
margin: 5px;
height: 40px;
}
mat-table {
table-layout: fixed;
width: 100%;
display: table;
overflow-x: scroll;
.table-headers {
padding: 5px;
color: #ffffff;
font-weight: 900;
font-size: medium;
background-color: #46AC9E;
}
.table-headers:hover {
background-color: #ececec;
color:#46AC9E;
}
.table-content {
padding: 5px;
overflow-wrap: inherit;
}
.table-column {
width: 100%;
}
}
input {
border: none;
border-bottom: 1px solid silver;
}
:host ::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) {
.mat-slide-toggle-thumb {
background-color: #46AC9E;
}
.mat-slide-toggle-bar {
background-color: skyblue;
}
}
// .dialog-body {
// display: flex;
// justify-content: center;
// align-items: center;
// div {
// width: 90%;
// }
// }
.dialog-actions {
display: flex;
flex-wrap: wrap;
width: 97%;
justify-content: space-between;
.btn-group-left {
// min-width: 150px;
margin-top: 5px;
}
.btn-group-right {
// min-width: 95px;
margin-top: 5px;
}
}
.hide {
display: none;
}
:host ::ng-deep {
.mat-form-field-infix {
border-bottom: 0px solid white;
}
.mat-table {
tr {
th,
td {
vertical-align: middle;
}
}
}
}
.img-fluid {
margin-right: 5px;
max-height: 40px;
}
// .navbar {
// background-position: center;
// }
@media (max-width: 767px) {
.card {
min-width: 600px;
}
}
.mat-row:nth-child(even){
background-color: rgb(255, 255, 255);
}
.mat-row:nth-child(odd){
background-color: rgb(241, 241, 241);
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AdminHomeComponent } from './admin-home.component';
describe('AdminHomeComponent', () => {
let component: AdminHomeComponent;
let fixture: ComponentFixture<AdminHomeComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AdminHomeComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(AdminHomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,193 @@
import { Component, OnInit,ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { AuthService } from 'src/app/_providers/_services/auth.service';
import { MasterService } from 'src/app/_providers/_services/master.service';
<<<<<<< HEAD
import { MatPaginator } from '@angular/material/paginator';
import { MatSort, Sort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@Component({
selector: 'app-admin-home',
templateUrl: './admin-home.component.html',
styleUrls: ['./admin-home.component.scss']
})
export class AdminHomeComponent implements OnInit {
tenderData: any;
<<<<<<< HEAD
dataSource: MatTableDataSource<TenderDetailDto>;
displayedColumns = ['slno','title','publishedDate','bidOpenDate','view'];
dataCopy: any;
pageLength: any;
searchTerm:any;
@ViewChild('paginator') paginator: MatPaginator;
@ViewChild(MatSort, { static: false }) sort: MatSort;
loading: boolean = true;
noData: boolean;
constructor(
private authenticationService: AuthService,
private router: Router,
private _masterService: MasterService,
private errorService:ErrorTranslateService,
private _ui: UiService,
) { }
ngOnInit(): void {
this.getData()
}
getData(){
this._masterService.getMasterData(apiUrl.getTender).then((res) =>{
console.log("tenderData=1=",res);
this.tenderData = res;
this.dataCopy = res;
this.pageLength = this.tenderData.length;
this.dataSource = new MatTableDataSource(this.tenderData);
this.dataSource.sort = this.sort;
this.dataSource.paginator = this.paginator;
this.noData = (this.tenderData && this.tenderData.length == 0) ? true : false;
this.loading = false;
},err=>{
console.error(err)
})
=======
displayedColumns: string[] = ['no', 'name','download'];
tenderData: any;
constructor(private authenticationService: AuthService,
private router: Router,
private _masterService: MasterService) { }
ngOnInit(): void {
this._masterService.getMasterData(apiUrl.getTender).then((res) =>{
console.log("tenderData",res);
this.tenderData = res
})
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
public signOut(): void {
this.authenticationService.logOut();
}
signIn(){
this.router.navigate(['/login']);
}
goToHome(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
goToView(tenderId:number) {
this.router.navigate(['/auth/view',tenderId]);
<<<<<<< HEAD
}
goToUpload(tenderId){
this.router.navigate(['/tender-upload',tenderId]);
}
search(){
this.tenderData = this.dataCopy;
this.loading = true;
if (!this.searchTerm || this.searchTerm == null || this.searchTerm == undefined || this.searchTerm == "") {
this._ui.toastMessage(this.errorService.translate('enterSearchTerm'), 3000);
this.getData();
return;
}
this.tenderData = this.tenderData.filter(res => {
let includedInTitle = (res.title) ? res.title.toLowerCase().includes(this.searchTerm.toLowerCase()) : false;
let includedInPublishDate = (res.publishDate) ? res.publishDate.includes(this.searchTerm.toLowerCase()) : false;
let includedInbidOpenDate = (res.bidOpenDate) ? res.bidOpenDate.includes(this.searchTerm.toLowerCase()) : false;
if (includedInTitle)
return true;
if (includedInPublishDate)
return true;
if (includedInbidOpenDate)
return true;
else
return false;
});
this.noData = (this.tenderData && this.tenderData.length == 0) ? true : false;
this.pageLength = this.tenderData.length;
this.dataSource = new MatTableDataSource(this.tenderData);
this.loading = false;
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
reset(){
this.searchTerm = "";
this.getData();
}
sortData(sort: Sort) {
const data = this.tenderData.slice();
if (!sort.active || sort.direction === '') {
this.dataSource.data = data;
return;
}
this.dataSource.data = data.sort((a, b) => {
const isAsc = sort.direction === 'asc';
switch (sort.active) {
case 'title':
return compare(a.title, b.title, isAsc);
case 'publishedDate':
return compare(a.publishDate, b.publishDate, isAsc);
case 'bidOpenDate':
return compare(a.bidOpenDate, b.bidOpenDate, isAsc);
default:
return 0;
}
});
}
// public getUser(): Observable<User> {
// return of({
// email: localStorage.getItem('username'),
// name: localStorage.getItem('username'),
// });
// }
navigateTo(destination: any) {
this.router.navigate([destination])
}
}
function compare(a: any, b: any, isAsc: boolean): number {
return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
}

@ -0,0 +1,30 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { ForgotPasswordComponent } from './forgot-password/forgot-password.component';
import { LoginComponent } from './login/login.component';
import { AdminHomeComponent } from './admin-home/admin-home.component';
import { ViewComponent } from './view/view.component';
import { UploadComponent } from './upload/upload.component';
import { RegisterComponent } from './register/register.component';
const routes: Routes = [
{ path: '', redirectTo: 'admin-home', pathMatch: 'full' },
{ path: 'admin-home', component: AdminHomeComponent },
{ path: 'login', component: LoginComponent },
{ path: 'view/:id', component: ViewComponent },
{ path: 'upload', component: UploadComponent },
{ path: 'reset-password', component: ForgotPasswordComponent },
{ path: 'register', component: RegisterComponent }
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class AuthRoutingModule { }
export const authComponents = [
AdminHomeComponent,
LoginComponent,
ForgotPasswordComponent,
RegisterComponent
];

@ -0,0 +1,63 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { authComponents, AuthRoutingModule } from './auth-routing.module';
import { MatCardModule } from '@angular/material/card';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { MatInputModule } from '@angular/material/input';
import { MatIconModule } from '@angular/material/icon';
import { MatButtonModule } from '@angular/material/button';
import { MatToolbarModule } from '@angular/material/toolbar';
import { MatSelectModule } from '@angular/material/select';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { TranslateModule } from '@ngx-translate/core';
import { NgOtpInputModule } from 'ng-otp-input';
import { ViewComponent } from './view/view.component';
import { UploadComponent } from './upload/upload.component';
import { RegisterComponent } from './register/register.component';
import { MatFormFieldModule } from '@angular/material/form-field';
<<<<<<< HEAD
import { MatTableModule } from '@angular/material/table';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatSortModule } from '@angular/material/sort';
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
// import { AdminHomeComponent } from './admin-home/admin-home.component';
@NgModule({
declarations: [
authComponents,
ViewComponent,
UploadComponent,
RegisterComponent,
// AdminHomeComponent
],
imports: [
CommonModule,
AuthRoutingModule,
MatCardModule,
FormsModule,
ReactiveFormsModule,
MatInputModule,
MatIconModule,
MatButtonModule,
MatToolbarModule,
MatSelectModule,
MatDatepickerModule,
MatProgressBarModule,
TranslateModule,
NgOtpInputModule,
<<<<<<< HEAD
MatFormFieldModule,
MatTableModule,
MatPaginatorModule,
MatSortModule
=======
MatFormFieldModule
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
]
})
export class AuthModule { }

@ -0,0 +1,80 @@
<div class="c-wrapper">
<div class="container">
<div class="container" style="margin-top:50px;">
<div class="row">
<div class="col-12 col-sm-12 col-md-6 col-lg-5 col-xl-4">
<mat-card card="card-style">
<!-- <mat-card-title>
<div class="row">
<img mat-card-image src="assets/accurate/images/salesapp.png" alt="logo">
</div>
</mat-card-title> -->
<mat-card-subtitle style="text-align: center;">
<b> {{ 'resetPassword' | translate | uppercase }} </b>
</mat-card-subtitle>
<mat-card-content>
<form *ngIf="!isNewPasswordScreen" [formGroup]="loginForm" (ngSubmit)="onVerifyOtp()">
<p>
<mat-form-field>
<input type="text" matInput placeholder="{{ 'email' | translate }}"
[disabled]="isVisibleOtp"
formControlName="username" [(ngModel)]="user.username" style="width:100%">
</mat-form-field>
</p>
<p *ngIf="isVisibleOtp">
<mat-label> Passcode </mat-label>
<ng-otp-input (onInputChange)="onOtpChange($event)" [config]="config">
</ng-otp-input>
</p>
<div class="button">
<button *ngIf="!isVisibleOtp" mat-raised-button style="color: rgb(255, 255, 255);background-color: #212529;" type="button"
(click)="sendOTP()"> {{ 'sendOtp' | translate }}
</button>
<button *ngIf="isVisibleOtp" mat-raised-button style="color: rgb(255, 255, 255);background-color: #212529;" type="submit"> {{
'verifyOtp' | translate }}
</button>
<button *ngIf="isVisibleOtp" mat-raised-button style="color: rgb(255, 255, 255);background-color: #212529;" type="button"
style="margin-left: 5px;" (click)="resendOTP()"> {{ 'resendOtp' | translate }}
</button>
</div>
<div style="text-align: center;padding-top: 20px;">
<a [routerLink]="" style="color: #ae1c1c;text-decoration: auto;" (click)="goToLogin()">{{ 'login' | translate }}</a>
</div>
</form>
<form *ngIf="isNewPasswordScreen" [formGroup]="loginForm" (ngSubmit)="onSubmit()">
<p>
<mat-form-field>
<input type="password" matInput placeholder="{{ 'password' | translate }}"
formControlName="password" [(ngModel)]="user.password" style="width:100%">
</mat-form-field>
</p>
<p>
<mat-form-field>
<input type="password" matInput
placeholder="{{ 'confirmPassword' | translate }}" formControlName="confpassword"
[(ngModel)]="user.confpassword" style="width:100%">
</mat-form-field>
</p>
<div class="button">
<button mat-raised-button style="color: rgb(255, 255, 255);background-color: #212529;" type="submit"> {{ 'changePassword' |
translate }}
</button>
</div>
<div style="text-align: center;padding-top: 20px;">
<a [routerLink]="" style="color: #ae1c1c;text-decoration: auto;" (click)="goToLogin()">{{ 'login' | translate }}</a>
</div>
</form>
</mat-card-content>
</mat-card>
</div>
</div>
</div>
</div>

@ -0,0 +1,45 @@
.row{
display: flex;
justify-content: center;
align-items: center;
}
.card-style {
display: flex;
justify-content: center;
margin: 100px 0px;
}
.mat-form-field {
padding: 0;
width: 100%;
// min-width: 300px;
input {
// height: 5vh;
width: 100%;
// background-color: aliceblue;
border-bottom: 1px solid silver;
}
}
mat-card-title,
mat-card-content {
display: flex;
justify-content: center;
}
.error {
padding: 16px;
width: 300px;
color: white;
background-color: red;
}
.button {
display: flex;
justify-content: center;
align-items: center;
}

@ -0,0 +1,195 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, Router } from '@angular/router';
import { AuthenticationDto } from 'src/app/_dto/authentication.dto';
import { AuthService } from 'src/app/_providers/_services/auth.service';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
@Component({
selector: 'app-forgot-password',
templateUrl: './forgot-password.component.html',
styleUrls: ['./forgot-password.component.scss']
})
export class ForgotPasswordComponent implements OnInit {
img: string;
loginForm: FormGroup;
user: AuthenticationDto = new AuthenticationDto();
config = {
allowNumbersOnly: true,
length: 6,
inputStyles: {
width: "25px",
height: "25px",
},
}
otpValue: any;
isVisibleOtp: boolean = false;
loading: boolean = false;
timeOut: boolean = false;
timeLeft: number;
time: any;
isNewPasswordScreen: boolean = false;
institute: any;
constructor(
private _activeRouter: ActivatedRoute,
private formBuilder: FormBuilder,
private _ui: UiService,
private errorTranslateService: ErrorTranslateService,
private service: AuthService,
private router: Router
) { }
async ngOnInit() {
this.loginForm = this.formBuilder.group({
username: [''],
password: [''],
confpassword: [''],
});
await this._activeRouter.queryParams
.subscribe(
async (params) => {
let school = params.school;
this.institute = params.school;
this.img = "../../../../assets/accurate/images/" + school + ".png"
});
}
async sendOTP() {
this.timeOut = true;
if (!this.user.username || this.user.username.trim() == "") {
this._ui.toastMessage(this.errorTranslateService.translate("userNameCantbeBlank"));
this.loading = false;
this.timeOut = false;
return;
}
if (!this._ui.emailValidation(this.user.username)) {
this._ui.toastMessage(this.errorTranslateService.translate("enterAValidEmailID"));
return;
}
await this.service.sendOtp({ email: this.user.username }, 'F').then(res => {
this.loading = false;
this.isVisibleOtp = true;
this._ui.toastMessage(this.errorTranslateService.translate("otpSendSuccess"));
}, (err) => {
this.timeOut = false;
console.log("-------err-----", err);
this._ui.toastMessage(err.message ? err.error.message : this.errorTranslateService.translate('errInSave'), 3000);
});
this.setTimer()
}
setTimer() {
console.log("here");
this.timeLeft = 300;
this.time = setInterval(() => {
if (this.timeLeft > 0) {
this.timeLeft--;
} else {
this.timeOut = false;
clearInterval(this.time);
}
}, 1000)
}
async onVerifyOtp() {
if (!this.otpValue || this.otpValue.length != 6) {
this._ui.toastMessage(this.errorTranslateService.translate("enterValidOtp"));
return
}
if (this.otpValue && this.user.username) {
let body: { otp: string, email: string } = { otp: '', email: '' };
body.otp = this.otpValue;
body.email = this.user.username;
await this.service.verifyOtp(body, 'F').then(res => {
// this.visibleOtp = false;
// this.showNewPassword = true;
this._ui.toastMessage(this.errorTranslateService.translate("otpVerifiedSuccess"));
this.isNewPasswordScreen = true;
}, (err) => {
console.log("-------err-----", err);
this._ui.toastMessage(err.message ? err.error.message : this.errorTranslateService.translate('errInSave'), 3000);
})
}
}
async resendOTP() {
this.timeOut = true;
this.otpValue = null;
this.setTimer();
setTimeout(() => {
}, 0);
if (this.user.username && !(this.user.username.trim() == "")) {
await this.service.sendOtp({ email: this.user.username }, 'FR').then(async res => {
this._ui.toastMessage(this.errorTranslateService.translate("otpSendSuccess"));
}, (err) => {
this._ui.toastMessage(err.message ? err.error.message : this.errorTranslateService.translate('errInSave'), 3000);
})
}
else
this._ui.toastMessage(this.errorTranslateService.translate("userNameCantbeBlank"));
}
onOtpChange(otp) {
this.otpValue = otp;
console.log("==otp==", this.otpValue.length);
}
goToLogin() {
this.router.navigate(["auth/login"]);
}
async passwordPreSave(): Promise<boolean> {
if (!this.user.password || this.user.password == "" || this.user.password.trim() == "") {
this._ui.toastMessage(this.errorTranslateService.translate("passwordCantbeBlank"));
return false;
}
if (this.user.password.length < 6) {
this._ui.toastMessage(this.errorTranslateService.translate("minimumPasswordLenght"));
return false;
}
if (!this.user.confpassword || this.user.confpassword == "" || this.user.confpassword.trim() == "") {
this._ui.toastMessage(this.errorTranslateService.translate("confirmPasswordCantbeBlank"));
return false;
}
if (this.user.password != this.user.confpassword) {
this._ui.toastMessage(this.errorTranslateService.translate("passwordMismatch"));
return false;
}
return true;
}
async onSubmit() {
if (!(await this.passwordPreSave())) {
return;
}
this.service.forgotPassword({ pass: this.user.password, email: this.user.username, otp: this.otpValue }).then(async (res) => {
this._ui.toastMessage(this.errorTranslateService.translate("passwordChangeSuccess"));
await this.router.navigate(["auth/login"]);
}, (err) => {
console.log("--", err);
this._ui.toastMessage(err.message ? err.error.message : this.errorTranslateService.translate('errInSave'), 3000);
})
}
}

@ -0,0 +1,108 @@
<div class="c-wrapper" style="margin:0">
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<p class="nav-link home-link" (click)="goToHome()">Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" (click)="goToContactUs()">Contact Us</p>
</li>
</ul>
</div>
</div>
</nav> -->
<mat-progress-bar mode="indeterminate" *ngIf="loading" color="warn"></mat-progress-bar>
<!-- <nav class="navbar navbar-dark-responsive" style="background-image: url('assets/img/panel_background.jpg');padding: 56px;">
</nav> -->
<div class="container">
<div class="container" style="margin-top:20px;">
<div class="row">
<!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"></div> -->
<div class="col-12 col-sm-12 col-md-6 col-lg-5 col-xl-4">
<mat-card card="card-style">
<mat-card-title>
<div class="row">
<!-- <img mat-card-image src="assets/accurate/images/salesapp.png" alt="logo"> -->
</div>
</mat-card-title>
<mat-card-subtitle style="text-align: center;">
<b> {{ 'signIn' | translate | uppercase }} </b>
</mat-card-subtitle>
<mat-card-content>
<form [formGroup]="loginForm" (ngSubmit)="onSubmit()">
<p>
<mat-form-field>
<input type="text" matInput placeholder="{{ 'email' | translate }}"
formControlName="username" [(ngModel)]="user.username" style="width:100%">
</mat-form-field>
</p>
<p style="margin-bottom: 0;">
<mat-form-field>
<input type="password" matInput placeholder="{{ 'password' | translate }}"
formControlName="password" [(ngModel)]="user.password" style="width:100%">
</mat-form-field>
</p>
<div style="text-align: right;margin-bottom: 20px;margin-top: -10px;">
<a (click)="goToForgotPassword()" style="font-size: small;color: #ae1c1c;text-decoration: auto;">{{'forgotPass' | translate}}</a>
</div>
<div class="button">
<button mat-raised-button style="color: rgb(255, 255, 255);background-color: #212529;width: 100%;" type="submit"> {{ 'login' | translate }}
<!-- <i class="bi bi-person-plus-fill"></i> -->
</button>
</div>
<!-- <div style="text-align: center;padding-top: 5px; ">
<p color="dark" [routerLink]="" (click)="goToForgotPassword()">Reset password</p>
</div> -->
<br>
<div style="text-align: center;">
<p>No Account? <a (click)="goToRegister()" style="color: #ae1c1c;text-decoration: auto;">Create One</a></p>
</div>
</form>
</mat-card-content>
</mat-card>
</div>
<!-- <div class="col-sm-4"></div> -->
</div>
</div>
</div>
<!-- <div class="footer" class="fixed-bottom">
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px; bottom: 0;" class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023. </span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>
</div> -->

@ -0,0 +1,71 @@
// :host {
// display: flex;
// justify-content: center;
// margin: 100px 0px;
// }
.custom-toolbar {
margin:0
}
.row{
display: flex;
justify-content: center;
align-items: center;
}
.card-style {
display: flex;
justify-content: center;
margin: 100px 0px;
}
.mat-form-field {
padding: 0;
width: 100%;
// min-width: 300px;
input {
// height: 5vh;
width: 100%;
// background-color: aliceblue;
border-bottom: 1px solid silver;
}
}
mat-card-title,
mat-card-content {
display: flex;
justify-content: center;
}
.error {
padding: 16px;
width: 300px;
color: white;
background-color: red;
}
.nav-link:hover {
color: red;
}
.button {
display: flex;
justify-content: center;
align-items: center;
}
.img-fluid {
margin-right: 5px;
max-height: 40px;
}
.fixed-bottom {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
}

@ -0,0 +1,190 @@
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { ActivatedRoute, ParamMap, Router } from '@angular/router';
import { AuthenticationDto } from 'src/app/_dto/authentication.dto';
import { routePath } from 'src/app/_providers/_resources/route-path.properties';
import { AuthService } from 'src/app/_providers/_services/auth.service';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
@Component({
selector: 'app-login',
templateUrl: './login.component.html',
styleUrls: ['./login.component.scss']
})
export class LoginComponent implements OnInit {
user: AuthenticationDto = new AuthenticationDto();
loginForm: FormGroup;
loading = false;
submitted = false;
returnUrl: string;
error = '';
id: string;
img: string;
constructor(
private service: AuthService,
private formBuilder: FormBuilder,
private router: Router,
private route: ActivatedRoute,
private _ui: UiService,
private errorTranslateService: ErrorTranslateService,
private _activeRouter: ActivatedRoute
) { }
ngOnInit() {
this._activeRouter.paramMap.subscribe(async (param: ParamMap) => {
if (param.get('id')) {
this.id = param.get('id');
localStorage.setItem('institute', this.id)
this.img = "../../../../assets/accurate/images/" + this.id + ".png"
}
})
this.loginForm = this.formBuilder.group({
username: ['', Validators.required],
password: ['', Validators.required]
});
// get return url from route parameters or default to '/'
this.returnUrl = this.route.snapshot.queryParams['returnUrl'] || '/';
}
// openSnackBar(message: string, action: string) {
// this._snackBar.open(message, action);
// }
// convenience getter for easy access to form fields
get f() { return this.loginForm.controls; }
preSave() {
if (!this.user.username || this.user.username == null) {
this._ui.toastMessage(this.errorTranslateService.translate("userNameCantbeBlank"));
return false;
}
if (!this.user.password || this.user.password == null) {
this._ui.toastMessage(this.errorTranslateService.translate("passwordCantbeBlank"));
return false;
}
return true;
}
goToHome(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
onSubmit() {
if (!this.preSave())
return
this.loading = true;
console.log("loading", this.loading);
this.error = "";
this.submitted = true;
// this.user.username = this.user.username.toUpperCase();
// stop here if form is invalid
if (this.loginForm.invalid) {
this.loading = false;
console.log("loading", this.loading);
return;
}
this.service.signIn(this.user)
.then(async (res: any) => {
// localStorage.setItem('seculevel', res.seculevel);
localStorage.setItem('authtoken', res.accessToken);
localStorage.setItem('refreshtoken', res.refreshToken);
localStorage.setItem('emailId', res.emailId);
console.log("==seclevel==", res.seculevel);
await this._ui.getUserInfo({ username: this.user.username }).then((res) => {
console.log("fFFf",res);
localStorage.setItem('username', res.username);
localStorage.setItem('seculevel', res.secuLevel);
}, (err) => {
console.log("err=1=", err);
this._ui.toastMessage((err.error.message) ? err.error.message : this.errorTranslateService.translate('errorInApi'));
});
this.router.navigate([routePath.dashboard]);
// this.service.patchToken()
this.user.password = '';
this.error = '';
}, (err) => {
this.loading = false;
console.log("=== here=err==", err);
localStorage.setItem('authtoken', '');
localStorage.setItem('refreshtoken', '');
localStorage.setItem('emailId', '');
localStorage.removeItem('authtoken');
localStorage.removeItem('refreshtoken');
localStorage.removeItem('media');
localStorage.removeItem('emailId');
localStorage.removeItem('passwordVersion');
if (err.status == 0) {
this.error = "* Failed to load Database";
this.loading = false;
setTimeout(() => {
this.error = ''
}, 3000);
} else if (err.status == 422) {
this.error = "* Not Registered";
this.loading = false;
setTimeout(() => {
this.error = ''
}, 3000);
}
else if (err.status == 500) {
this.error = "* Invalid Credentials";
this.loading = false;
setTimeout(() => {
this.error = ''
}, 3000);
}
else if (err.status == 400) {
this.error = err.error.message;
this.loading = false;
setTimeout(() => {
this.error = ''
}, 3000);
}
else if (err.status == 401) {
this.error = err.error.message;
this.loading = false;
setTimeout(() => {
this.error = ''
}, 3000);
}
else {
// if (isArray(err.error.message)) {
// const error = err.error.message[0].constraints;
// if (error?.minLength)
// this.error = '* ' + error.minLength;
// this.loading = false;
// } else {
// this.error = '* ' + err.error.message;
// this.loading = false;
// }
}
this._ui.toastMessage(this.error, 2000);
});
}
async goToRegister() {
await this.router.navigate(["auth/register"]);
}
async goToForgotPassword() {
await this.router.navigate(["auth/reset-password"], { queryParams: {school:this.id} });
}
}

@ -0,0 +1,170 @@
<div class="c-wrapper" style="margin:0">
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<p class="nav-link home-link" >Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" >Contact Us</p>
</li>
</ul>
</div>
</div>
</nav>
<nav class="navbar navbar-dark-responsive" style="background-image: url('assets/img/panel_background.jpg');padding: 56px;">
</nav> -->
<mat-progress-bar mode="indeterminate" *ngIf="loading" color="warn"></mat-progress-bar>
<div *ngIf="!verifiedOtp" class="container">
<div class="container" style="margin-top:20px;">
<div class="row">
<!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"></div> -->
<div class="col-12 col-sm-12 col-md-6 col-lg-7 col-xl-7">
<mat-card card="card-style">
<mat-card-title>
<div class="row">
<!-- <img mat-card-image src="assets/accurate/images/salesapp.png" alt="logo"> -->
</div>
</mat-card-title>
<mat-card-subtitle style="text-align: center;">
<b> {{ 'register' | translate | uppercase }} </b>
</mat-card-subtitle>
<mat-card-content>
<div class="row">
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10">
<mat-form-field style="width: 100%">
<input matInput [(ngModel)]="this.userDetails.email" type="text" placeholder="{{ 'email' | translate }}">
</mat-form-field>
</div>
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10" style="text-align: center;">
<button mat-raised-button (click)="sendOTP(otpValidation)"
style="color: darkred;">{{ 'generateOtp' | translate }}</button>
</div>
</div>
</mat-card-content>
</mat-card>
</div>
<!-- <div class="col-sm-4"></div> -->
</div>
</div>
</div>
<ng-template #otpValidation>
<div class="row">
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10">
<mat-form-field style="width: 100%">
<input matInput [(ngModel)]="this.userDetails.otp" type="text" placeholder="{{ 'enterOtp' | translate }}">
</mat-form-field>
</div>
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10" style="text-align: center;">
<button mat-raised-button (click)="validation()" style="color: darkred;">{{ 'submit' |
translate }}</button>
</div>
</div>
</ng-template>
<div *ngIf="verifiedOtp">
<div class="container">
<div class="container" style="margin-top:20px;">
<div class="row">
<!-- <div class="col-sm-4 col-md-4 col-lg-4 col-xl-4"></div> -->
<div class="col-12 col-sm-12 col-md-6 col-lg-7 col-xl-7">
<mat-card card="card-style">
<mat-card-title>
<div class="row">
<!-- <img mat-card-image src="assets/accurate/images/salesapp.png" alt="logo"> -->
</div>
</mat-card-title>
<mat-card-subtitle style="text-align: center;">
<b> {{ 'register' | translate | uppercase }} </b>
</mat-card-subtitle>
<mat-card-content>
<div class="row">
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10">
<mat-form-field style="width: 100%">
<input matInput [(ngModel)]="this.userDetails.userName" type="text" placeholder="{{ 'name' | translate }}">
</mat-form-field>
</div>
<!-- <div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10">
<mat-form-field style="width: 100%">
<input matInput type="text" placeholder="{{ 'email' | translate }}">
</mat-form-field>
</div> -->
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10">
<mat-form-field style="width: 100%">
<input matInput [(ngModel)]="this.userDetails.mobileNumber" type="text" placeholder="{{ 'mobileNumber' | translate }}">
</mat-form-field>
</div>
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10">
<mat-form-field style="width: 100%">
<input matInput [(ngModel)]="this.userDetails.pass" type="password" placeholder="{{ 'password' | translate }}">
</mat-form-field>
</div>
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10">
<mat-form-field style="width: 100%">
<input matInput [(ngModel)]="this.userDetails.confPass" type="password" placeholder="{{ 'confPass' | translate }}">
</mat-form-field>
</div>
<div class="col-10 col-sm-10 col-md-12 col-lg-10 col-xl-10"
style="text-align: center;">
<button mat-raised-button (click)="saveData()" style="color: darkred;">{{ 'register' | translate}}</button>
</div>
</div>
</mat-card-content>
</mat-card>
</div>
<!-- <div class="col-sm-4"></div> -->
</div>
</div>
</div>
</div>
<!-- <div class="footer" class="fixed-bottom">
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px; bottom: 0;" class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023. </span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>
</div> -->

@ -0,0 +1,71 @@
// :host {
// display: flex;
// justify-content: center;
// margin: 100px 0px;
// }
.custom-toolbar {
margin:0
}
.row{
display: flex;
justify-content: center;
align-items: center;
}
.card-style {
display: flex;
justify-content: center;
margin: 100px 0px;
}
.mat-form-field {
padding: 0;
width: 100%;
// min-width: 300px;
input {
// height: 5vh;
width: 100%;
// background-color: aliceblue;
border-bottom: 1px solid silver;
}
}
mat-card-title,
mat-card-content {
display: flex;
justify-content: center;
}
.error {
padding: 16px;
width: 300px;
color: white;
background-color: red;
}
.nav-link:hover {
color: red;
}
.button {
display: flex;
justify-content: center;
align-items: center;
}
.img-fluid {
margin-right: 5px;
max-height: 40px;
}
.fixed-bottom {
position: fixed;
left: 0;
bottom: 0;
width: 100%;
}

@ -0,0 +1,156 @@
import { Component, OnInit } from '@angular/core';
import { MatDialog } from '@angular/material/dialog';
import { Router } from '@angular/router';
import { PcdUserDto } from 'src/app/_dto/pcduser.dto';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { MasterService } from 'src/app/_providers/_services/master.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
import Swal from 'sweetalert2'
@Component({
selector: 'app-register',
templateUrl: './register.component.html',
styleUrls: ['./register.component.scss']
})
export class RegisterComponent implements OnInit {
loading = true
verifiedOtp: boolean = false;
dialogRef: any;
userDetails = new PcdUserDto()
constructor(
private dialog: MatDialog,
private _masterService: MasterService,
private _uiService: UiService,
private errorTranslateService: ErrorTranslateService,
private router: Router
) { }
ngOnInit(): void {
this.loading = false
}
sendOTP(template) {
if (this.userDetails.email && this._uiService.emailValidation(this.userDetails.email)) {
let body = { email: this.userDetails.email };
this._masterService.saveAllMasterData(apiUrl.registerOtp, body).then(res => {
this._uiService.toastMessage(this.errorTranslateService.translate("otpSendSuccessfully"));
this.openDialogbox(template)
},err=>{
this._uiService.toastMessage((err.error.message) ? err.error.message : this.errorTranslateService.translate('errorInApi'));
})
}
else {
this._uiService.toastMessage(this.errorTranslateService.translate("enterAValidEmailID"));
}
}
openDialogbox(templateRef) {
console.log('this');
this.dialogRef = this.dialog.open(templateRef, {
width: '400px',
disableClose: false
});
// this.verifiedOtp = true
}
validation() {
if (this.userDetails.otp) {
let body = {
email: this.userDetails.email,
otp: this.userDetails.otp
}
this._masterService.saveAllMasterData(apiUrl.validateRegisterOtp, body).then(res => {
if (res['data'] == 'success') {
Swal.fire(
'Verified',
'OTP Verified Successfully',
'success'
)
this.dialogRef.close()
this._uiService.toastMessage(this.errorTranslateService.translate("otpVerifiedSuccess"));
this.verifiedOtp = true
}
else {
this.dialogRef.close();
this._uiService.toastMessage(this.errorTranslateService.translate("otpMismatching"));
}
},err=>{
this._uiService.toastMessage((err.error.message) ? err.error.message : this.errorTranslateService.translate('errorInApi'));
})
}
else {
this._uiService.toastMessage(this.errorTranslateService.translate("enterOTP"));
}
}
navigateTo(destination) {
this.router.navigate([destination]);
}
preSave() {
if (!this.userDetails.userName || this.userDetails.userName == null || this.userDetails.userName == "" ||this.userDetails.userName == undefined) {
this._uiService.toastMessage(this.errorTranslateService.translate('userNameCantbeBlank'), 3000);
return false;
}
if (!this.userDetails.mobileNumber || this.userDetails.mobileNumber == null || this.userDetails.mobileNumber == "" ||this.userDetails.mobileNumber == undefined) {
this._uiService.toastMessage(this.errorTranslateService.translate('phonecantBeBlank'), 3000);
return false;
}
if (!this._uiService.phoneNoValidation(this.userDetails.mobileNumber) ) {
this._uiService.toastMessage(this.errorTranslateService.translate('enterAValidPhoneNumber'), 3000);
return false;
}
if (!this.userDetails.pass || this.userDetails.pass == null || this.userDetails.pass == "" ||this.userDetails.pass == undefined) {
this._uiService.toastMessage(this.errorTranslateService.translate('passwordCantbeBlank'), 3000);
return false;
}
if (this.userDetails.pass.length < 6) {
this._uiService.toastMessage(this.errorTranslateService.translate('minimumPasswordLenght'), 3000);
return false;
}
if (!this.userDetails.confPass || this.userDetails.confPass == null || this.userDetails.confPass == "" ||this.userDetails.confPass == undefined) {
this._uiService.toastMessage(this.errorTranslateService.translate('confirmPasswordCantbeBlank'), 3000);
return false;
}
if (this.userDetails.pass != this.userDetails.confPass) {
this._uiService.toastMessage(this.errorTranslateService.translate('passwordMismatch'), 3000);
return false;
}
return true;
}
saveData(){
if (!this.preSave())
return;
delete this.userDetails.confPass
this.loading = true;
this._masterService.saveMasterData(apiUrl.signup,this.userDetails).then(res=>{
this.loading = false
this._uiService.toastMessage(this.errorTranslateService.translate('saveSuccess'), 3000);
this.verifiedOtp = false
this.userDetails = new PcdUserDto();
this.navigateTo('/auth/login')
},err=>{
this.loading = false;
this._uiService.toastMessage((err.error.message) ? err.error.message : this.errorTranslateService.translate('errorInApi'));
this.verifiedOtp = false
})
}
}

@ -0,0 +1,156 @@
<div class="container-responsive">
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link tender-link" (click)="navigateTo('auth/admin-home')">Tender</a>
</li>
<li class="nav-item">
<p class="nav-link home-link" (click)="goToHome()">Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" (click)="goToContactUs()">Contact Us</p>
</li>
</ul>
</div>
</div>
</nav>
<nav class="navbar navbar-dark-responsive"
style="background-image: url('assets/img/panel_background.jpg');padding: 50px;"> -->
<!-- <div class="container-fluid">
<a class="navbar-brand" (click)="navigateTo('tender-view')">
<h6>Home / Tender</h6>
</a>
</div> -->
<!-- </nav> -->
<mat-progress-bar *ngIf="loading" mode="indeterminate" color="warn"></mat-progress-bar>
<br>
<div class="text-center mt-4">
<h2 class="font-weight-bold " style="color: #5faca1;">Upload Files <i class="bi bi-cloud-upload"></i></h2>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-6 offset-sm-3">
<div class="card">
<div class="card-body">
<div class="form-group">
<form (ngSubmit)="submitForm()" #myForm="ngForm">
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name" placeholder="Enter your name" [(ngModel)]="formData.name" name="name" required>
<div *ngIf="myForm.submitted && myForm.controls.name.errors">
<div *ngIf="myForm.controls.name.errors.required" class="text-danger">
Name is required.
</div>
</div>
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="text" class="form-control" id="phone" placeholder="Enter your phone number" [(ngModel)]="formData.phone" name="phone" required pattern="[0-9]{10}" [ngModelOptions]="{ updateOn: 'blur' }" (input)="validatePhoneNumber()">
<!-- Error messages for required and pattern -->
<div *ngIf="myForm.submitted && myForm.controls.phone.errors">
<div *ngIf="myForm.controls.phone.errors.required" class="text-danger">
Phone number is required.
</div>
<div *ngIf="myForm.controls.phone.errors.pattern" class="text-danger">
Phone number must be a 10-digit number.
</div>
<div *ngIf="phoneInvalid" class="text-danger">
Invalid phone number format.
</div>
</div>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" placeholder="Enter your email" [(ngModel)]="formData.email" name="email" required email>
<div *ngIf="myForm.submitted && myForm.controls.email.errors">
<div *ngIf="myForm.controls.email.errors.required" class="text-danger">
Email is required.
</div>
<div *ngIf="myForm.controls.email.errors.email" class="text-danger">
Invalid email format.
</div>
</div>
</div>
<div class="form-group">
<label for="file1">File 1:</label>
<div class="input-group">
<input type="file" id="file1" class="form-control" aria-describedby="button-addon1" [(ngModel)]="formData.file1" name="file1">
<button class="btn btn-outline-secondary delete-btn" (click)="deleteInput('file1')" type="button">
<i class="bi bi-trash"></i>
</button>
</div>
</div>
<div class="form-group">
<label for="file2">File 2:</label>
<div class="input-group">
<input type="file" id="file2" class="form-control" aria-describedby="button-addon1" [(ngModel)]="formData.file2" name="file2">
<button class="btn btn-outline-secondary delete-btn" (click)="deleteInput('file2')" type="button">
<i class="bi bi-trash"></i>
</button>
</div>
</div>
<!-- <div class="form-group">
<label for="file3">File 3:</label>
<div class="input-group">
<input type="file" id="file3" class="form-control" aria-describedby="button-addon1" [(ngModel)]="formData.file3" name="file3">
<button class="btn btn-outline-secondary delete-btn" (click)="deleteInput('file3')" type="button">
<i class="bi bi-trash"></i>
</button>
</div>
</div> -->
<div *ngIf="myForm.submitted && myForm.invalid" class="text-danger">
Please fill in all required fields.
</div>
<button type="submit" class="btn btn-outline-dark float-right" >Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<br><br>
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px;"
class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023.
</span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>
</div>

@ -0,0 +1,16 @@
// .container-responsive {
// min-height: 100vh;
// position: relative;
// }
// #footer {
// background-color: #3a8379;
// padding: 20px;
// color: #ffffff;
// position: absolute;
// bottom: 0;
// width: 100%;
// }
.nav-link:hover {
color: rgb(255, 0, 0);
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { UploadComponent } from './upload.component';
describe('UploadComponent', () => {
let component: UploadComponent;
let fixture: ComponentFixture<UploadComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ UploadComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(UploadComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,68 @@
import { Component, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { Router } from '@angular/router';
@Component({
selector: 'app-upload',
templateUrl: './upload.component.html',
styleUrls: ['./upload.component.scss']
})
export class UploadComponent implements OnInit {
phoneInvalid: boolean = false;
formData: any = {};
myForm: FormGroup;
loading: boolean = true
constructor(private router: Router) { }
navigateTo(destination: any) {
this.router.navigate([destination])
}
validatePhoneNumber() {
const phonePattern = /^[0-9]{10}$/;
const phoneInput = this.myForm.controls.phone;
this.phoneInvalid = !phonePattern.test(phoneInput.value);
}
// goToHome(){
// window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
// }
// goToContactUs(){
// window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
// }
preSave(){
if(this.formData.name == '' || this.formData.name == undefined){
console.log("1");
return false
}
if(this.formData.phone == '' || this.formData.phone == undefined || this.formData.phone.length > 10 || this.formData.phone.length < 10){
console.log("ph");
return false
}
if(this.formData.email == '' || this.formData.email == undefined){
console.log("e");
return false
}
return true
}
submitForm() {
if(this.preSave())
console.log(this.formData);
}
deleteInput(inputFieldId: string) {
const inputField = document.getElementById(inputFieldId) as HTMLInputElement;
if (inputField) {
inputField.value = '';
}
}
ngOnInit(): void {
this.loading = false
}
}

@ -0,0 +1,548 @@
<div class="container-responsive">
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link tender-link" (click)="navigateTo('auth/admin-home')">Tender</a>
</li>
<li class="nav-item">
<p class="nav-link home-link" (click)="goToHome()">Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" (click)="goToContactUs()">Contact Us</p>
</li>
</ul>
</div>
</div>
</nav>
<nav class="navbar navbar-dark-responsive"
style="background-image: url('assets/img/panel_background.jpg');padding: 50px;"> -->
<!-- <div class="container-fluid"> -->
<!-- <a class="navbar-brand" (click)="navigateTo('tender-view')">
<h6>Home / Tender</h6>
</a> -->
<!-- </div> -->
<!-- </nav> -->
<!-- <mat-progress-bar mode="indeterminate" color="warn"></mat-progress-bar> -->
<br>
<div class="text-center mt-4">
<h2 class="font-weight-bold " style="color: #5faca1;">Tender Details </h2>
</div><br>
<div class="row d-flex justify-content-center ">
<div class="col-sm-11">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Basic Details</th>
</tr>
</thead>
<tbody>
<tr>
<th >Organisation Name</th>
<td class="col-md-6" >{{tenderData.orgChain}}</td>
</tr>
<tr>
<th>Tender Reference Number</th>
<td>{{tenderData.tenderRefNo}}</td>
<<<<<<< HEAD
</tr>
<tr>
<th>Tender ID</th>
<td>{{tenderData.tenderId}}</td>
</tr>
<tr>
<th>Tender Type</th>
<td>{{tenderData?.tenderTypeD?.tenderType}}</td>
</tr>
<tr>
<th>Tender Category</th>
<td>{{tenderData?.tenderCategoryD?.tenderCategory}}</td>
</tr>
<tr>
<th>Payment Mode</th>
<td>{{tenderData?.paymentModeD?.paymentMode}}</td>
=======
</tr>
<tr>
<th>Tender ID</th>
<td>{{tenderData.productCategoryD.tenderId}}</td>
</tr>
<tr>
<th>Tender Type</th>
<td>{{tenderData.tenderCategoryD.tenderType}}</td>
</tr>
<tr>
<th>Tender Category</th>
<td>{{tenderData.tenderCategoryD.tenderCategory}}</td>
</tr>
<tr>
<th>Payment Mode</th>
<td>{{tenderData.paymentModeD.paymentMode}}</td>
</tr>
<tr>
<th>Form of Contract</th>
<td>{{tenderData.formOfContractD.formOfContract}}</td>
</tr>
<tr>
<th>No. of Covers</th>
<td>{{tenderData.NoCovers}}</td>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<tr>
<th>Form of Contract</th>
<td>{{tenderData?.formOfContractD?.formOfContract}}</td>
</tr>
<!-- <tr>
<th>No. of Covers</th>
<td>{{tenderData.NoCovers}}</td>
</tr> -->
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Tender Fee Details</th>
</tr>
</thead>
<tbody>
<tr>
<th>Tender Fee in ₹</th>
<td class="col-md-7" >{{tenderData.tenderFee}}</td>
</tr>
<tr>
<th>Fee Payable To</th>
<td>{{tenderData.feePayableTo}}</td>
</tr>
<tr>
<th>Tender Fee Exemption Allowed</th>
<td>{{tenderData.tenderFeeExemption}}</td>
<<<<<<< HEAD
=======
</tr>
<tr>
<th>Fee Payable At</th>
<td>{{tenderData.feePayableAt}}</td>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<!-- <tr>
<th>Fee Payable At</th>
<td>{{tenderData.feePayableAt}}</td>
</tr> -->
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">EMD Fee Details</th>
</tr>
</thead>
<tbody>
<tr>
<th >EMD Amount in ₹</th>
<td class="col-md-6" >{{tenderData.emdAmt}}</td>
</tr>
<tr>
<th>EMD Fee Type</th>
<<<<<<< HEAD
<td>{{tenderData?.emdFeeTypeD?.emdFeeType}}</td>
=======
<td>{{tenderData.emdFeeType}}</td>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<tr>
<th>EMD Payable To</th>
<td>{{tenderData.emdPayableTo}}</td>
</tr>
<tr>
<th>EMD through BG/ST or EMD Exemption Allowed</th>
<td>{{tenderData.allowEmdBgOrSt}}</td>
</tr>
<tr>
<th>EMD Percentage</th>
<td>{{tenderData.emdPercentage}}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Critical Dates</th>
</tr>
</thead>
<tbody>
<tr>
<th >Published Date</th>
<td class="col-md-6" >{{tenderData.publishDate}}</td>
</tr>
<tr>
<th>Document Download / Sale Start Date</th>
<td>{{tenderData.saleStartDate}}</td>
</tr>
<tr>
<th>Clarification Start Date</th>
<td>{{tenderData.clarificationStartDate}}</td>
</tr>
<tr>
<th>Bid Submission Start Date</th>
<td>{{tenderData.bidSubStartDate}}</td>
</tr>
<tr>
<th>Bid Opening Date</th>
<td>{{tenderData.bidOpenDate}}</td>
</tr>
<tr>
<th>Document Download / Sale End Date</th>
<td>{{tenderData.saleEndDate}}</td>
</tr>
<tr>
<th>Pincode</th>
<td>{{tenderData.pincode}}</td>
</tr>
<tr>
<th>Clarification End Date</th>
<td>{{tenderData.clarificationEndDate}}</td>
</tr>
<tr>
<th>Bid Submission End Date</th>
<td>{{tenderData.bidSubEndDate}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Work Item Details</th>
</tr>
</thead>
<tbody>
<tr>
<th>Title</th>
<td class="col-md-6">{{tenderData.title}}</td>
</tr>
<tr>
<th>Work Description</th>
<td>{{tenderData.workDesc}}</td>
</tr>
<tr>
<th>Pre Qualification</th>
<td>{{tenderData.ndaPreQualification}}</td>
</tr>
<tr>
<th>Independent External Monitor/Remarks</th>
<td>{{tenderData.remarks}}</td>
</tr>
<tr>
<th>Tender Value in ₹</th>
<td>{{tenderData.tenderValue}}</td>
</tr>
<tr>
<th>Contract Type</th>
<td>{{tenderData.contractType}}</td>
</tr>
<tr>
<th>Location</th>
<td>{{tenderData.location}}</td>
</tr>
<<<<<<< HEAD
<tr>
<th>Pre Bid Meeting Address</th>
<td>{{tenderData.preBidMeetAdd}}</td>
</tr>
<tr>
<th>Product Category</th>
<td>{{tenderData?.productCategoryD?.productCategory}}</td>
</tr>
<tr>
<th>Bid Validity(Days)</th>
<td>{{tenderData.bidValidity}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Date</th>
<td>{{tenderData.preBidDate}}</td>
</tr>
<tr>
<th>Sub category</th>
<td>{{tenderData.subCategory}}</td>
</tr>
<tr>
<th>Period Of Work(Days)</th>
<td>{{tenderData.periodOfWork}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Place</th>
<td>{{tenderData.preBidMeetPlace}}</td>
</tr>
<tr>
<th>Bid Opening Place</th>
<td>{{tenderData.bidOpeningPlace}}</td>
</tr>
</tbody>
</table>
</div>
</div>
=======
<tr>
<th>Pre Bid Meeting Address</th>
<td>{{tenderData.preBidMeetAdd}}</td>
</tr>
<tr>
<th>Product Category</th>
<td>{{tenderData.productCategory}}</td>
</tr>
<tr>
<th>Bid Validity(Days)</th>
<td>{{tenderData.bidValidity}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Date</th>
<td>{{tenderData.preBidMeetAdd}}</td>
</tr>
<tr>
<th>Sub category</th>
<td>{{tenderData.subCategory}}</td>
</tr>
<tr>
<th>Period Of Work(Days)</th>
<td>{{tenderData.periodOfWork}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Place</th>
<td>{{tenderData.preBidMeetPlace}}</td>
</tr>
<tr>
<th>Bid Opening Place</th>
<td>{{tenderData.bidOpeningPlace}}</td>
</tr>
</tbody>
</table>
</div>
</div>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="12">Tenders Documents</th>
</tr>
</thead>
<tbody>
<tr>
<<<<<<< HEAD
<th colspan="12" class="text-center" style="background-color: #b8b8b8;" >Drawings Document</th>
=======
<th colspan="12" class="text-center" style="background-color: #b8b8b8;" >NIT Document</th>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<tr>
<<<<<<< HEAD
<th colspan="12">Drawings <button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="DownloadDrawings()"> <i class="bi bi-file-earmark-zip"></i> Download</button></th>
</tr>
<tr>
<td colspan="12"></td>
</tr>
=======
<th colspan="5">Document Name</th>
<th colspan="7">Description</th>
</tr>
<tr>
<td colspan="5"></td>
<td colspan="7"></td>
</tr>
<tr>
<th colspan="12"><span id="zipFile"> <i class="bi bi-file-earmark-zip"></i> Download</span> </th>
</tr>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tbody>
<br>
<tbody>
<tr>
<th colspan="12" class="text-center" style="background-color:#b8b8b8;" >Work Item Documents</th>
</tr>
<tr>
<th colspan="4">Document Type</th>
<th colspan="4">Document Name</th>
<th colspan="4">Description</th>
</tr>
<tr>
<td colspan="4"></td>
<td colspan="4"></td>
<td colspan="4"></td>
</tr>
<tr>
<<<<<<< HEAD
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th>
</tr>
</tbody>
<br>
<tbody>
<tr>
<th colspan="12" class="text-center" style="background-color:#b8b8b8;" >NIT Documents</th>
</tr>
<tr>
<th colspan="4">Document Type</th>
<th colspan="4">Document Name</th>
<th colspan="4">Description</th>
</tr>
<tr>
<td colspan="4"></td>
<td colspan="4"></td>
<td colspan="4"></td>
</tr>
<tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th>
=======
<th colspan="12"><span id="zipFile"> <i class="bi bi-file-earmark-zip"></i> Download as Zip File</span> </th>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
</tbody>
</table>
</div>
</div>
<<<<<<< HEAD
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="12">Required Documents Details</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="4">Document Type</th>
<th colspan="4">Description</th>
<th colspan="4">Document Format</th>
</tr>
<tr>
<td colspan="4"></td>
<td colspan="4"></td>
<td colspan="4"></td>
</tr>
<tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th>
</tr>
</tbody>
</table>
</div>
</div>
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Tender Inviting</th>
</tr>
</thead>
<tbody>
<tr>
<th>Name</th>
<td class="col-md-6" >{{tenderData.tenderInvName}}</td>
</tr>
<tr>
<th>Address</th>
<td>{{tenderData.tenderInvAddess}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div><br>
</div>
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px; bottom: 0;"
class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023.
</span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>

@ -0,0 +1,51 @@
.container-fluid{
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
top: 10px;
position: relative;
}
.container-fluid2{
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
top: -1px;
position: relative;
}
.table td {
word-break: break-word;
}
.nav-link:hover {
color: rgb(255, 0, 0);
}
#zipFile:hover {
color: rgb(255, 0, 0);
cursor: pointer;
}
// .container-responsive {
// min-height: 100vh;
// position: relative;
// }
// #footer {
// background-color: #3a8379;
// padding: 20px;
// color: #ffffff;
// position: absolute;
// bottom: 0;
// width: 100%;
// }
thead{
<<<<<<< HEAD
background-color:#48746e; color: aliceblue;
=======
background-color: rgb(161, 42, 42); color: aliceblue;
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { ViewComponent } from './view.component';
describe('ViewComponent', () => {
let component: ViewComponent;
let fixture: ComponentFixture<ViewComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ ViewComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(ViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,114 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
<<<<<<< HEAD
import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { MasterService } from 'src/app/_providers/_services/master.service';
import { environment } from 'src/environments/environment';
=======
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { MasterService } from 'src/app/_providers/_services/master.service';
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@Component({
selector: 'app-view',
templateUrl: './view.component.html',
styleUrls: ['./view.component.scss']
})
export class ViewComponent implements OnInit {
tenderId: number;
tenderData: any;
constructor(private router: Router,
private route: ActivatedRoute,
private _masterService: MasterService) {
this.tenderId = +this.route.snapshot.paramMap.get('id');
}
ngOnInit(): void {
<<<<<<< HEAD
this.tenderData = new TenderDetailDto()
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
console.log("this.tenderId",this.tenderId);
this.getData()
}
getData(){
this._masterService.getMasterDatabyId(apiUrl.AllTenderData,this.tenderId).then((res) =>{
console.log("tenderData",res);
<<<<<<< HEAD
=======
console.log("res",res.orgChain);
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
this.tenderData = res})
}
navigateTo(destination: any) {
this.router.navigate([destination])
}
goToHome(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
<<<<<<< HEAD
DownloadDrawings(){
const id = this.tenderId;
this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{
})
}
downloadZip() {
console.log('clicked');
const id = this.tenderId;
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 10);
this._masterService.getMasterDatabyId(apiUrl.bankDocs, id).then(res => {
}, err => {
console.log('res===>', err);
if (err.status == 200) {
console.log('start >>>');
// window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
setTimeout(() => {
newWindow.close();
}, 100);
}
if (err.status == 404) {
alert('No Bank Document Found for the selected Tender.');
}
if (err.status == 500) {
alert(`${err.message}`);
}
else {
alert(`An error Occured`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 100);
}
})
// window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id);
}
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}

@ -0,0 +1,49 @@
// .container-responsive {
// min-height: 100vh;
// position: relative;
// }
// #footer {
// background-color: #3a8379;
// padding: 20px;
// color: #ffffff;
// position: absolute;
// bottom: 0;
// width: 100%;
// }
.nav-link:hover {
color: rgb(255, 0, 0);
}
::ng-deep .custom-tab-group .mat-tab-label {
color: rgb(0, 0, 0);
text-transform: none;
min-width: 120px; /* adjust the value as per your requirements */
}
<<<<<<< HEAD
.green-snackbar {
background-color: green;
color: white;
}
::ng-deep .mat-slide-toggle.mat-checked .mat-slide-toggle-bar {
background-color: #16e2e2; /* Primary color */
//cursor: pointer;
}
::ng-deep .mat-slide-toggle.mat-checked .mat-slide-toggle-thumb {
background-color: #04fcfc; /* Accent color */
cursor: pointer;
}
.element-with-tooltip {
cursor: pointer; /* Set the cursor style to pointer for the element */
}
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AddTendersComponent } from './add-tenders.component';
describe('AddTendersComponent', () => {
let component: AddTendersComponent;
let fixture: ComponentFixture<AddTendersComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ AddTendersComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(AddTendersComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,793 @@
import { Component, OnInit,ViewChild } from '@angular/core';
<<<<<<< HEAD
import { MatSnackBar,MatSnackBarConfig } from '@angular/material/snack-bar';
import { MatTabGroup } from '@angular/material/tabs';
import { ActivatedRoute, Router } from '@angular/router';
import { TenderCoversDto } from 'src/app/_dto/tender-covers.dto';
=======
import { MatTabGroup } from '@angular/material/tabs';
import { ActivatedRoute, Router } from '@angular/router';
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto';
import { TenderDocumentDto } from 'src/app/_dto/tender-documents.dto';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { MasterService } from 'src/app/_providers/_services/master.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
<<<<<<< HEAD
import Swal from 'sweetalert2'
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@Component({
selector: 'app-add-tenders',
templateUrl: './add-tenders.component.html',
styleUrls: ['./add-tenders.component.scss']
})
export class AddTendersComponent implements OnInit {
@ViewChild(MatTabGroup) tabGroup: MatTabGroup;
tenderData: TenderDetailDto
tenderTypeLov: any;
TenderCategoryLov: any;
PaymentModeLov: any;
formcontractLov: any;
productcategoryLov: any;
AllTenderData: TenderDetailDto;
emdFeeTypeLov: any;
seculevel: any;
documentTypeLov: any;
isNITDocUploaded: boolean = false;
isWIDocUploaded: boolean = false;
<<<<<<< HEAD
toggleValue : boolean = true;
nitDocuments: TenderDocumentDto[] ;
workItemDocuments: TenderDocumentDto[];
drawingsDocuments: TenderDocumentDto[];
coverDocs : TenderCoversDto[];
selectedFiles: any;
tenderID: number;
filteredDocumentTypeLov: any;
filteredDocumentDrawingTypeLov: any;
filteredDocumentNITTypeLov: any;
coverslov: any;
fileformatlov: any;
addnoticeROW: boolean = true
addDrwROW: boolean= true
showMessage: boolean = false;
=======
nitDocuments: TenderDocumentDto[] ;
workItemDocuments: TenderDocumentDto[];
selectedFiles: any;
tenderID: number;
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
constructor(private router: Router,
private _masterService : MasterService,
private _ui:UiService,
private route: ActivatedRoute,
<<<<<<< HEAD
private errorTranslateService: ErrorTranslateService,
private snackBar: MatSnackBar)
=======
private errorTranslateService: ErrorTranslateService,)
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
{
this.seculevel = localStorage.getItem('seculevel')
this.tenderData = new TenderDetailDto();
this.tenderID = +this.route.snapshot.paramMap.get('id');
this.getData()
}
ngOnInit(): void {
<<<<<<< HEAD
// this.addnoticeROW= true;
// this.addDrwROW = true;
this.nitDocuments = [];
this.workItemDocuments = [];
this.drawingsDocuments = [];
this.coverDocs = [];
if(this.tenderID){
this._masterService.getMasterDatabyId(apiUrl.AllTenderData,this.tenderID).then((res) =>{
this.tenderData = res
this.drawingsDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'D');
for(let i=0;i<this.drawingsDocuments.length;i++){
this.drawingsDocuments[i].file = this.drawingsDocuments[i].docName;
console.log("this.drawingsDocuments===",this.drawingsDocuments);
}
this.nitDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'NIT');
for(let i=0;i<this.nitDocuments.length;i++){
this.nitDocuments[i].file = this.nitDocuments[i].docName;
console.log("this.nitDocuments===",this.nitDocuments);
}
this.workItemDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'WID');
for(let i=0;i<this.workItemDocuments.length;i++){
this.workItemDocuments[i].file = this.workItemDocuments[i].docName;
console.log("this.workItemDocuments===",this.workItemDocuments);
}
})
}
}
addNoticeToggle(event){
this.addnoticeROW = !event.checked;
}
addDrawingToggle(event){
this.addDrwROW = !event.checked;
}
=======
this.nitDocuments = [];
this.workItemDocuments = [];
if(this.tenderID)
this._masterService.getMasterDatabyId(apiUrl.AllTenderData,this.tenderID).then((res) =>{
console.log("gfgfgf",res);
this.tenderData = res
this.nitDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'NIT');
this.workItemDocuments = this.tenderData.tenderDoc.filter(element=> element.documentCategory == 'WID');
})
}
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
getData(){
// this._masterService.getMasterData(apiUrl).then((res) =>{
// this.AllTenderData = res
// console.log("res",res);
// })
this._masterService.getMasterData(apiUrl.TenderType).then((res) =>{
this.tenderTypeLov = res
})
this._masterService.getMasterData(apiUrl.emdFeeType).then((res) =>{
this.emdFeeTypeLov = res
console.log("emdFeeTypeLov",this.emdFeeTypeLov);
})
this._masterService.getMasterData(apiUrl.documentType).then((res) =>{
this.documentTypeLov = res
console.log("res========================",res);
<<<<<<< HEAD
this.filteredDocumentDrawingTypeLov = this.documentTypeLov.filter(docType => docType.docCategory === 'D');
this.filteredDocumentNITTypeLov = this.documentTypeLov.filter(docType => docType.docCategory === 'N');
this.filteredDocumentTypeLov = this.documentTypeLov.filter(docType => docType.docCategory == 'WID');
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
})
this._masterService.getMasterData(apiUrl.TenderCategory).then((res) =>{
this.TenderCategoryLov = res
// console.log("TenderCategoryLov",res);
})
this._masterService.getMasterData(apiUrl.PaymentMode).then((res) =>{
this.PaymentModeLov = res
// console.log("PaymentModeLov",res);
})
this._masterService.getMasterData(apiUrl.formcontract).then((res) =>{
this.formcontractLov = res
// console.log("formcontractLov",res);
})
this._masterService.getMasterData(apiUrl.productcategory).then((res) =>{
this.productcategoryLov = res
// console.log("productcategoryLov",res);
})
<<<<<<< HEAD
this._masterService.getMasterData(apiUrl.coverslov).then((res) =>{
this.coverslov = res
})
this._masterService.getMasterData(apiUrl.fileformatlov).then((res) =>{
this.fileformatlov = res
})
}
addNewNitDocRow() {
if(this.addnoticeROW){
this._ui.toastMessage(this.errorTranslateService.translate("pleaseEnableNoticeDocuments"),2000,false);
}else {
=======
}
addNewNITDocRow() {
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
const lastRow = new TenderDocumentDto();
let newRow = Object.assign({}, lastRow);
newRow.documentCategory = 'NIT'
newRow.crud = 'I'
this.nitDocuments.push(newRow);
console.log('===this.nitDocuments===',this.nitDocuments);
<<<<<<< HEAD
}
}
addNewDrawingRow() {
if(this.addDrwROW){
this._ui.toastMessage(this.errorTranslateService.translate("pleaseEnableDrawingDocuments"),2000,false);
}else {
const lastRow = new TenderDocumentDto();
let newRow = Object.assign({}, lastRow);
newRow.documentCategory = 'D'
newRow.crud = 'I'
this.drawingsDocuments.push(newRow);
console.log('===this.drawingsDocuments===',this.drawingsDocuments);
}
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
addNewWorkItemDocRow() {
// const lastRow = this.tenderData.tenderDocs[this.tenderData.tenderDocs.length - 1];
const lastRow = new TenderDocumentDto();
const newRow = Object.assign({}, lastRow);
newRow.documentCategory = 'WID'
newRow.crud = 'I'
this.workItemDocuments.push(newRow);
}
<<<<<<< HEAD
addNewcoverDocRow() {
const lastRow = new TenderCoversDto();
const newRow = Object.assign({}, lastRow);
// newRow.documentCategory = 'C'
newRow.crud = 'I'
this.coverDocs.push(newRow);
}
deleteDrawingsRow(id, index: number) {
let removeRow = Object.assign({}, (this.drawingsDocuments).splice(index, 1)[0]);
// this.nitDocuments.push(removeRow);
}
deleteNITRow(id, index: number) {
let removeRow = Object.assign({}, (this.nitDocuments).splice(index, 1)[0]);
// this.workItemDocuments.push(removeRow);
}
deleteWIDRow(id, index: number) {
=======
deleteNITRow(id, index: number) {
// console.log('id for delete===', id);
console.log('index for delete===', index);
let removeRow = Object.assign({}, (this.nitDocuments).splice(index, 1)[0]);
// this.nitDocuments.push(removeRow);
}
deleteWIDRow(id, index: number) {
console.log('id for delete===', id);
console.log('index for delete===', index);
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
let removeRow = Object.assign({}, (this.workItemDocuments).splice(index, 1)[0]);
// this.workItemDocuments.push(removeRow);
}
<<<<<<< HEAD
deleteCoverRow(id, index: number){
let removeRow = Object.assign({}, (this.coverDocs).splice(index, 1)[0]);
}
UploadFiles(event,i,type){
=======
UploadFiles(event,i,type){
console.log(" this.tenderData.tenderId", this.tenderData.tenderId);
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
this.selectedFiles = event.target.files;
let file = event.target.files[0]
const fd = new FormData();
fd.append('file', file);
if(file && this.tenderData.tenderId)
this._masterService.postMasterData(apiUrl.docUpload,fd,this.tenderData.tenderId).then((res)=>{
console.log("res1===",res.fileName);
console.log("res2===",res.fileSizeKB);
console.log('======= this.tenderData.tenderDocs==========', this.tenderData.tenderDoc);
<<<<<<< HEAD
if(type == 'WID'){
// this.nitDocuments[i].docName = res.fileName
// this.nitDocuments[i].file = res.fileName
// this.nitDocuments[i].documentSize =res.fileSizeKB;
// }
// else{
this.workItemDocuments[i].docName = res.fileName
this.workItemDocuments[i].file = res.fileName
this.workItemDocuments[i].documentSize =res.fileSizeKB;
}
})
}
UploadNoticeFiles(event,i,type){
this.selectedFiles = event.target.files;
let file = event.target.files[0]
const fd = new FormData();
fd.append('file', file);
if(file && this.tenderData.tenderId)
this._masterService.postMasterData(apiUrl.nitUploadDoc,fd,this.tenderData.tenderId).then((res)=>{
console.log("res1===",res.fileName);
console.log("res2===",res.fileSizeKB);
console.log('======= this.tenderData.tenderDocs==========', this.tenderData.tenderDoc);
if(type == 'NIT'){
this.nitDocuments[i].docName = res.fileName
this.nitDocuments[i].file = res.fileName
this.nitDocuments[i].documentSize =res.fileSizeKB;
}
// else{
// this.workItemDocuments[i].docName = res.fileName
// this.workItemDocuments[i].file = res.fileName
// this.workItemDocuments[i].documentSize =res.fileSizeKB;
// }
})
}
UploadDrawingFiles(event,i){
this.selectedFiles = event.target.files;
let file = event.target.files[0]
const fd = new FormData();
fd.append('file', file);
if(file && this.tenderData.tenderId)
console.log(" this.drawingsDocuments", this.drawingsDocuments);
this._masterService.postMasterData(apiUrl.drawingUploadDoc,fd,this.tenderData.tenderId).then((res) =>{
console.log("drawings===",res);
this.drawingsDocuments[i].docName = res.fileName
this.drawingsDocuments[i].file = res.fileName;
this.drawingsDocuments[i].documentSize =res.fileSizeKB;
})
}
// UploadCoverFiles(event,i){
// this.selectedFiles = event.target.files;
// let file = event.target.files[0]
// const fd = new FormData();
// fd.append('file', file);
// if(file && this.tenderData.tenderId){
// coverDocs
// }
// }
=======
if(type == 'NIT'){
this.nitDocuments[i].docName = res.fileName
this.nitDocuments[i].documentSize =res.fileSizeKB;
}
else{
this.workItemDocuments[i].docName = res.fileName
this.workItemDocuments[i].documentSize =res.fileSizeKB;
}
// this.tenderData.tenderDocs[i].docName = res.fileName;
// this.tenderData.tenderDocs[i].doc_size =res.fileSizeKB;
})
}
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
readUrl(event: any) {
// console.log('size is high');
// if (event.target.files && event.target.files[0]) {
// if (event.target.files[0].type === 'image/jpeg' ||
// event.target.files[0].type === 'image/png' ||
// event.target.files[0].type === 'image/jpg') {
// if (event.target.files[0].size < 200 * 200) {/* Checking height * width*/ }
// if (event.target.files[0].size < 1000000) {
// }
// }
// }
}
navigateTo(destination: any) {
this.router.navigate([destination])
}
goToHome(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
BasicDetails(){
if(this.tenderData.orgChain =='' || this.tenderData.orgChain == null || this.tenderData.orgChain == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("organisationNameCantBeBlank"),2000,true);
console.log("errrrr");
}
else if(this.tenderData.tenderRefNo =='' || this.tenderData.tenderRefNo == null || this.tenderData.tenderRefNo == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderReferenceNumberCantBeBlank"),2000,true);
}
else if(this.tenderData.tenderId =='' || this.tenderData.tenderId == null || this.tenderData.tenderId == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderIDCantBeBlank"),2000,true);
}
else if( this.tenderData.tenderType == null || this.tenderData.tenderType == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderTypeCantBeBlank"),2000,true);
}
else if( this.tenderData.tenderCategory == null || this.tenderData.tenderCategory == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderCategoryCantBeBlank"),2000,true);
}
else if( this.tenderData.paymentMode == null || this.tenderData.paymentMode == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("paymentModeCantBeBlank"),2000,true);
}
else if( this.tenderData.formOfContract == null || this.tenderData.formOfContract == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("formOfContractCantBeBlank"),2000,true);
}
// else if( this.tenderData.noOfCovers == null || this.tenderData.noOfCovers == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("noOfCoversCantBeBlank"),2000,true);
// }
else this.nextTab()
}
TenderFeeDetails(){
if( this.tenderData.tenderFee == null || this.tenderData.tenderFee == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderFeeInCantBeBlank"),2000,true);
}
// else if(this.tenderData.feePayableTo =='' || this.tenderData.feePayableTo == null || this.tenderData.feePayableTo == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("feePayableToCantBeBlank"),2000,true);
// }
else if( this.tenderData.tenderFeeExemption == null || this.tenderData.tenderFeeExemption == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderFeeExemptionAllowedCantBeBlank"),2000,true);
}
// else if(this.tenderData.feePayableAt =='' || this.tenderData.feePayableAt == null || this.tenderData.feePayableAt == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("feePayableAtCantBeBlank"),2000,true);
// }
else this.nextTab()
}
EMDFeeDetails(){
if( this.tenderData.emdAmt == null || this.tenderData.emdAmt == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("emdAmountCantBeBlank"),2000,true);
}
else if(this.tenderData.emdFeeType =='' || this.tenderData.emdFeeType == null || this.tenderData.emdFeeType == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("emdFeeTypeCantBeBlank"),2000,true);
}
// else if(this.tenderData.emdPayableTo =='' || this.tenderData.emdPayableTo == null || this.tenderData.emdPayableTo == undefined){
// console.log("this.tenderData.emdPayableTo",this.tenderData.emdPayableTo);
// this._ui.toastMessage(this.errorTranslateService.translate("emdPayableToCantBeBlank"),2000,true);
// }
else if( this.tenderData.allowEmdBgOrSt == '' || this.tenderData.allowEmdBgOrSt == null || this.tenderData.allowEmdBgOrSt == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("selectEmdThrough"),2000,true);
}
// else if( this.tenderData.emdPercentage == null || this.tenderData.emdPercentage == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("emdPercentageCantBeBlank"),2000,true);
// }
else this.nextTab()
}
WorkItemDetails(){
if( this.tenderData.title == '' || this.tenderData.title == null || this.tenderData.title == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("titleCantBeBlank"),2000,true);
}
else if(this.tenderData.workDesc =='' || this.tenderData.workDesc == null || this.tenderData.workDesc == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("workDescriptionCantBeBlank"),2000,true);
}
else if(this.tenderData.ndaPreQualification =='' || this.tenderData.ndaPreQualification == null || this.tenderData.ndaPreQualification == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("preQualificationCantBeBlank"),2000,true);
}
<<<<<<< HEAD
else if( this.tenderData.tenderValue == null || this.tenderData.tenderValue == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderValueCantBeBlank"),2000,true);
}
else if( this.tenderData.productCategory == null || this.tenderData.productCategory == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("productCategoryCantBeBlank"),2000,true);
}
else if(this.tenderData.subCategory =='' || this.tenderData.subCategory == null || this.tenderData.subCategory == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("subCategoryCantBeBlank"),2000,true);
}
else if( this.tenderData.bidValidity == null || this.tenderData.bidValidity == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidValidityCantBeBlank"),2000,true);
}
else if( this.tenderData.periodOfWork == null || this.tenderData.periodOfWork == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("periodOfWorkCantBeBlank"),2000,true);
}
else if(this.tenderData.location =='' || this.tenderData.location == null || this.tenderData.location == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("locationCantBeBlank"),2000,true);
}
else if( this.tenderData.pincode == null || this.tenderData.pincode == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("pincodeCantBeBlank"),2000,true);
}
else if(this.tenderData.bidOpeningPlace =='' || this.tenderData.bidOpeningPlace == null || this.tenderData.bidOpeningPlace == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidOpeningPlaceCantBeBlank"),2000,true);
}
// else if(this.tenderData.contractType =='' || this.tenderData.contractType == null || this.tenderData.contractType == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("contractTypeCantBeBlank"),2000,true);
// }
// else if( this.tenderData.preBidMeetAdd == '' || this.tenderData.preBidMeetAdd == null || this.tenderData.preBidMeetAdd == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingAddressCantBeBlank"),2000,true);
// }
// else if( this.tenderData.preBidDate == null || this.tenderData.preBidDate == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingDateCantBeBlank"),2000,true);
// }
// else if(this.tenderData.preBidMeetPlace == '' || this.tenderData.preBidMeetPlace == null || this.tenderData.preBidMeetPlace == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingPlaceCantBeBlank"),2000,true);
// }
=======
else if( this.tenderData.pincode == null || this.tenderData.pincode == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("pincodeCantBeBlank"),2000,true);
}
else if( this.tenderData.tenderValue == null || this.tenderData.tenderValue == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("tenderValueCantBeBlank"),2000,true);
}
else if(this.tenderData.contractType =='' || this.tenderData.contractType == null || this.tenderData.contractType == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("contractTypeCantBeBlank"),2000,true);
}
else if(this.tenderData.location =='' || this.tenderData.location == null || this.tenderData.location == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("locationCantBeBlank"),2000,true);
}
// else if( this.tenderData.preBidMeetAdd == '' || this.tenderData.preBidMeetAdd == null || this.tenderData.preBidMeetAdd == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingAddressCantBeBlank"),2000,true);
// }
else if( this.tenderData.productCategory == null || this.tenderData.productCategory == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("productCategoryCantBeBlank"),2000,true);
}
else if( this.tenderData.bidValidity == null || this.tenderData.bidValidity == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidValidityCantBeBlank"),2000,true);
}
// else if( this.tenderData.preBidDate == null || this.tenderData.preBidDate == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingDateCantBeBlank"),2000,true);
// }
else if(this.tenderData.subCategory =='' || this.tenderData.subCategory == null || this.tenderData.subCategory == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("subCategoryCantBeBlank"),2000,true);
}
else if( this.tenderData.periodOfWork == null || this.tenderData.periodOfWork == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("periodOfWorkCantBeBlank"),2000,true);
}
// else if(this.tenderData.preBidMeetPlace == '' || this.tenderData.preBidMeetPlace == null || this.tenderData.preBidMeetPlace == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("preBidMeetingPlaceCantBeBlank"),2000,true);
// }
else if(this.tenderData.bidOpeningPlace =='' || this.tenderData.bidOpeningPlace == null || this.tenderData.bidOpeningPlace == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidOpeningPlaceCantBeBlank"),2000,true);
}
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
else this.nextTab()
}
CriticalDates(){
if( this.tenderData.publishDate == null || this.tenderData.publishDate == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("publishedDateCantBeBlank"),2000,true);
}
else if( this.tenderData.saleStartDate == null || this.tenderData.saleStartDate == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("documentDownloadSaleStartCantBeBlank"),2000,true);
}
// else if( this.tenderData.clarificationStartDate == null || this.tenderData.clarificationStartDate == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("clarificationStartDateCantBeBlank"),2000,true);
// }
else if( this.tenderData.saleEndDate == null || this.tenderData.saleEndDate == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("documentDownloadSaleEndCantBeBlank"),2000,true);
}
// else if( this.tenderData.clarificationEndDate == null || this.tenderData.clarificationEndDate == undefined){
// this._ui.toastMessage(this.errorTranslateService.translate("clarificationEndDateCantBeBlank"),2000,true);
// }
else if( this.tenderData.bidSubStartDate == null || this.tenderData.bidSubStartDate == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidSubmissionStartDateCantBeBlank"),2000,true);
}
else if( this.tenderData.bidSubEndDate == null || this.tenderData.bidSubEndDate == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidSubmissionEndDateCantBeBlank"),2000,true);
}
else if( this.tenderData.bidOpenDate == null || this.tenderData.bidOpenDate == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("bidOpeningDateCantBeBlank"),2000,true);
}
else this.nextTab()
}
TendersDocuments(){
<<<<<<< HEAD
// if( this.nitDocuments.file == null || this.nitDocuments.file == undefined){
=======
// if( this.tenderData.emdAmt == null || this.tenderData.emdAmt == undefined){
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
// this._ui.toastMessage(this.errorTranslateService.translate("feePayableAtCantBeBlank"),2000,true);
// }
// else if(this.tenderData.emdFeeType =='' || this.tenderData.emdFeeType == null || this.tenderData.emdFeeType == undefined){
// console.log("errrrr2");
// }
// else if(this.tenderData.emdPayableTo =='' || this.tenderData.emdPayableTo == null || this.tenderData.emdPayableTo == undefined){
// console.log("errrrr3");
// }
// else if( this.tenderData.allowEmdBgOrSt == '' || this.tenderData.allowEmdBgOrSt == null || this.tenderData.allowEmdBgOrSt == undefined){
// console.log("errrrr4");
// }
// else if( this.tenderData.emdPercentage == null || this.tenderData.emdPercentage == undefined){
// console.log("errrrr5");
// }
// else
<<<<<<< HEAD
this.tenderData.tenderDoc = this.nitDocuments.concat(this.workItemDocuments, this.drawingsDocuments)
this.nextTab()
}
RequiredDocuments(){
this.tenderData.covers = this.coverDocs
this.nextTab()
}
=======
this.tenderData.tenderDoc = this.nitDocuments.concat(this.workItemDocuments)
this.nextTab()
}
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
submit(){
this.tenderData.crud = 'I'
console.log('onsub---',this.tenderData);
if( this.tenderData.tenderInvName == '' || this.tenderData.tenderInvName == null || this.tenderData.tenderInvName == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("nameCantBeBlank"),2000,true);
return
}
if(this.tenderData.tenderInvAddess == '' || this.tenderData.tenderInvAddess == null || this.tenderData.tenderInvAddess == undefined){
this._ui.toastMessage(this.errorTranslateService.translate("addressCantBeBlank"),2000,true);
return
}
<<<<<<< HEAD
this._masterService.saveAllMasterData(apiUrl.AllTenderData,this.tenderData).then((res)=>{
console.log('successssssssss========',res);
if(res){
Swal.fire(
'Created',
'Tender created successfully',
'success'
)
}
}, (err) =>{
if(err.status != 201){
console.log("-error-");
Swal.fire({
icon: 'error',
title: 'Oops...',
text: 'Something went wrong!',
})
}
});
=======
console.log('onsub-2--',this.tenderData);
//
this._masterService.saveAllMasterData(apiUrl.AllTenderData,this.tenderData).then((res)=>{
console.log(res);
})
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
nextTab() {
console.log("dtaa=",this.tenderData);
const selectedIndex = this.tabGroup.selectedIndex;
const tabCount = this.tabGroup._tabs.length;
if (selectedIndex < tabCount - 1) {
this.tabGroup.selectedIndex = selectedIndex + 1;
}
}
prevTab() {
// console.log("dtaa=",this.tenderData);
const selectedIndex = this.tabGroup.selectedIndex;
if (selectedIndex > 0) {
this.tabGroup.selectedIndex = selectedIndex - 1;
}
}
display(){
console.log('ddddaaatttaa===',this.tenderData);
}
}

@ -0,0 +1,35 @@
import { NgModule } from '@angular/core';
import { RouterModule, Routes } from '@angular/router';
import { DashboardComponent } from './dashboard.component';
import { LayoutComponentComponent } from './layout-component/layout-component.component';
import { HomeViewComponent } from './home-view/home-view.component';
import { HomeUploadComponent } from './home-upload/home-upload.component';
import { AddTendersComponent } from './add-tenders/add-tenders.component';
const routes: Routes = [
{
path: '', component: LayoutComponentComponent, children: [
{ path: '', redirectTo: '/dashboard', pathMatch: 'full' },
{ path: 'dashboard', component: DashboardComponent },
{path:'tender-view/:id', component:HomeViewComponent},
<<<<<<< HEAD
{path:'tender-upload/:id',component:HomeUploadComponent},
=======
{path:'tender-upload',component:HomeUploadComponent},
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
{ path: 'add-tenders', component: AddTendersComponent},
{ path: 'add-tenders/:id', component: AddTendersComponent}
// { path: 'master', loadChildren: () => import('../master/master.module').then(m => m.MasterModule) },
// { path: 'report', loadChildren: () => import('../report/report.module').then(m => m.ReportModule) },
// { path: 'support', loadChildren: () => import('../support/support.module').then(m => m.SupportModule) },
// { path: 'transaction', loadChildren: () => import('../transaction/transaction.module').then(m => m.TransactionModule) }
]
},
];
@NgModule({
imports: [RouterModule.forChild(routes)],
exports: [RouterModule]
})
export class DashboardRoutingModule { }

@ -0,0 +1,272 @@
<div class="container-responsive">
<<<<<<< HEAD
<mat-progress-bar mode="indeterminate" *ngIf="loading"></mat-progress-bar>
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<p class="nav-link home-link" (click)="goToAddTenders()">Add Tenders</p>
</li>
<li class="nav-item">
<p class="nav-link home-link" (click)="goToHome()">Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" (click)="goToContactUs()">Contact Us</p>
</li> -->
<!-- <li class="nav-item">
<p class="nav-link sign-out-link" (click)="signOut()">Sign In <i class="bi bi-person-plus-fill"></i></p>
</li> -->
<!-- <li class="nav-item">
<p class="nav-link sign-out-link" (click)="signOut()">Sign Out <i class="bi bi-person-x-fill"></i></p>
</li>
</ul>
</div>
</div>
</nav>
<nav class="navbar navbar-dark-responsive" style="background-image: url('assets/img/panel_background.jpg');padding: 50px;">
</nav> -->
<!-- <mat-progress-bar mode="indeterminate" color="warn"></mat-progress-bar> -->
<!-- <div style="text-align: right;margin: 10px 10px 0px 0px;">
</div> -->
<br>
<<<<<<< HEAD
<div class="container ">
=======
<div class="container text-center">
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
<div class="row">
<div class="col-12">
<div style="text-align: right;margin-bottom: 5px;" *ngIf="seculevel == 'B'">
<<<<<<< HEAD
<button mat-raised-button (click)="addNewTender()" style="color: #46AC9E;">{{ 'addTender' | translate }}</button>
=======
<button mat-raised-button (click)="addNewTender()" style="color: darkred;">{{ 'addTender' | translate }}</button>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</div>
<div class="card-responsive">
<div class="card-body-responsive">
<div class="table-responsive">
<!-- <table class="table table-bordered">
<thead class="table-dark">
<tr>
<th class="col-sm-1">#</th>
<th class="col-sm-8">TENDER NAME</th>
<th class="col-sm-1" *ngIf="seculevel == 'B'">EDIT</th>
<th class="col-sm-1">VIEW</th>
<<<<<<< HEAD
<th class="col-sm-1" *ngIf="seculevel != 'B'">UPLOAD</th>
=======
<th class="col-sm-1">UPLOAD</th>
<!-- <th class="col-sm-1">CANCEL</th> -->
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
</thead>
<tbody>
<tr *ngFor="let tender of tenderData; let i = index">
<td class="col-sm-1">{{ i + 1 }}</td>
<td class="col-sm-6 table-break-word">{{ tender.title }}</td>
<td class="col-sm-1" *ngIf="seculevel == 'B'">
<button type="button" class="btn btn-outline-secondary btn-sm" (click)="goToEdit(tender.id)"><i class="bi bi-pencil-square"></i></button>
</td>
<td class="col-sm-1" >
<button type="button" class="btn btn-outline-dark btn-sm" (click)="goToView(tender.id)"><i class="bi bi-card-list"></i></button>
</td>
<<<<<<< HEAD
<td class="col-sm-1" *ngIf="seculevel != 'B'">
<button type="button" class="btn btn-outline-dark btn-sm" (click)="goToUpload(tender.id)"><i class="bi bi-upload"></i></button>
=======
<td class="col-sm-1" >
<button type="button" class="btn btn-outline-dark btn-sm" (click)="goToUpload()"><i class="bi bi-upload"></i></button>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</td>
</tr>
</tbody>
</table> -->
<ng-container >
<mat-card class="card">
<div class="top-bar">
<div class="top-left-float">
<span>
<mat-icon style="margin-right: 3px; transform: translateY(10px);">search</mat-icon>
<mat-form-field>
<input matInput placeholder="{{ 'search' | translate }}" style="width: fit-content;"
[(ngModel)]="searchTerm" (keyup.enter)="search()"/>
</mat-form-field>
</span>
<button mat-raised-button style="color: #46AC9E;" (click)="search()"> {{ 'go' | translate }}
</button>
</div>
<div class="top-right-float">
<button mat-raised-button style="color: #46AC9E;" (click)="reset()"> {{ 'reset' | translate }}
</button>
</div>
</div>
<br>
<br>
<mat-table [dataSource]="dataSource" style="min-width: 500px;display: table;" matSort matSortDisableClear="true" (matSortChange)="sortData($event)"
class="table">
<ng-container matColumnDef="actions" class="table-column" >
<th mat-header-cell *matHeaderCellDef style="padding: 5px;" style="width:60px" class="table-headers">
<!-- {{ 'actions' | translate }} -->
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element;let i=index" style="padding: 5px;" class="table-content first-column">
<button style="padding: 0;" mat-button color="primary"
(click)="goToEdit(element.id)" [disabled]="false">
<mat-icon style="transform: translateY(-10px);">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path
d="M490.3 40.4C512.2 62.27 512.2 97.73 490.3 119.6L460.3 149.7L362.3 51.72L392.4 21.66C414.3-.2135 449.7-.2135 471.6 21.66L490.3 40.4zM172.4 241.7L339.7 74.34L437.7 172.3L270.3 339.6C264.2 345.8 256.7 350.4 248.4 353.2L159.6 382.8C150.1 385.6 141.5 383.4 135 376.1C128.6 370.5 126.4 361 129.2 352.4L158.8 263.6C161.6 255.3 166.2 247.8 172.4 241.7V241.7zM192 63.1C209.7 63.1 224 78.33 224 95.1C224 113.7 209.7 127.1 192 127.1H96C78.33 127.1 64 142.3 64 159.1V416C64 433.7 78.33 448 96 448H352C369.7 448 384 433.7 384 416V319.1C384 302.3 398.3 287.1 416 287.1C433.7 287.1 448 302.3 448 319.1V416C448 469 405 512 352 512H96C42.98 512 0 469 0 416V159.1C0 106.1 42.98 63.1 96 63.1H192z"
fill="#46AC9E"/>
</svg>
</mat-icon>
</button>
</td>
</ng-container>
<ng-container matColumnDef="slno">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'slno' | translate }}
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element;let i = index" style="padding: 5px;" class="table-content">
{{i+1}}
</td>
</ng-container>
<ng-container matColumnDef="title">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-headers">
{{ 'title' | translate }}
<mat-icon>sort</mat-icon>
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
{{element?.title}}
</td>
</ng-container>
<ng-container matColumnDef="publishedDate">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-headers">
{{ 'publishedDate' | translate }}
<mat-icon>sort</mat-icon>
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
{{element?.publishDate| date:"YYYY-MM-dd"}}
</td>
<!-- <td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button mat-raised-button>edit</button>
</td> -->
</ng-container>
<ng-container matColumnDef="bidOpenDate">
<th mat-header-cell mat-sort-header *matHeaderCellDef class="table-headers">
{{ 'bidOpenDate' | translate }}
<mat-icon>sort</mat-icon>
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
{{element?.bidOpenDate| date:"YYYY-MM-dd"}}
</td>
<!-- <td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button mat-raised-button>edit</button>
</td> -->
</ng-container>
<ng-container matColumnDef="view">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'view' | translate }}
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button style="padding: 0;" mat-button color="primary"
(click)="goToView(element.id)" [disabled]="false">
<mat-icon style="transform: translate(-12px,-2px);" [ngStyle]="{'color':'#46AC9E'}">
insert_drive_file
</mat-icon>
</button>
</td>
</ng-container>
<ng-container matColumnDef="upload">
<th mat-header-cell *matHeaderCellDef class="table-headers" style="width:80px">
{{ 'upload' | translate }}
<!-- <mat-icon>sort</mat-icon> -->
</th>
<td mat-cell *matCellDef="let element" style="padding: 5px;" class="table-content">
<button style="padding: 0;" mat-button color="primary"
(click)="goToUpload(element.id)" [disabled]="false">
<mat-icon style="transform: translate(-12px,-2px);" [ngStyle]="{'color':'#46AC9E'}">
cloud_upload
</mat-icon>
</button>
</td>
</ng-container>
<ng-container matColumnDef="loading">
<td mat-footer-cell *matFooterCellDef="" colspan="5">
{{ 'loadingData' | translate }}
</td>
</ng-container>
<ng-container matColumnDef="nodata">
<td mat-footer-cell *matFooterCellDef="" colspan="5">
{{ 'noDataToDisplay' | translate }}
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr mat-row *matRowDef="let row; columns: displayedColumns;"></tr>
<tr mat-footer-row *matFooterRowDef="['loading']" [ngClass]="{'hide': !loading}"></tr>
<tr mat-footer-row *matFooterRowDef="['nodata']" [ngClass]="{'hide': (!noData || loading)}"></tr>
</mat-table>
<mat-paginator #paginator [length]="pageLength" [pageSize]="10" [pageSizeOptions]="[5, 10, 25, 100]"
aria-label="Select page">
</mat-paginator>
</mat-card>
</ng-container>
</div>
</div>
</div>
</div>
</div>
</div><br><br>
<div class="footer" >
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px; bottom: 0;" class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023. </span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>
</div>
</div>

@ -0,0 +1,230 @@
// .header {
// margin-left: 4%;
// margin-top: 20px;
// }
// .header>h6{
// a {
// text-decoration: none;
// color: #262627;
// }
// a:hover {
// text-decoration: underline;
// cursor: pointer;
// }
// }
// mat-card{
// min-width: 180px ;
// // max-width: 20vw;
// height: 200px;
// display: inline-block;
// }
// mat-card:hover{
// cursor: pointer;
// }
// -----------------------------------------------------------------------------------
.nav-link:hover {
color: red;
}
th,
td {
padding: 10px;
// border: 1px solid #ccc;
word-wrap: break-word;
white-space: normal;
}
.h2 {
font-family: sans-serif;
font-size: 26px;
font-weight: 500;
}
.table td {
word-break: break-word;
}
.table-break-word {
word-break: break-word;
}
.top-bar {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
border: 1px solid #e3e3e3;
width: 100%;
margin: auto;
padding: auto;
}
.header {
padding: 20px;
width: 100%;
min-width: 350px;
}
.header>h6>a {
text-decoration: none;
color: #262627;
}
.header>h6>a:hover {
text-decoration: underline;
cursor: pointer;
}
mat-card {
min-width: 350px;
}
.top-left-float {
display: flex;
min-width: 282px;
}
.top-right-float {
display: flex;
min-width: 161px;
}
.top-left-float>button,
.top-right-float>button {
margin: 5px;
height: 40px;
}
mat-table {
table-layout: fixed;
width: 100%;
display: table;
overflow-x: scroll;
.table-headers {
padding: 5px;
color: #ffffff;
font-weight: 900;
font-size: medium;
background-color: #46AC9E;
}
.table-headers:hover {
background-color: #ececec;
color:#46AC9E;
}
.table-content {
padding: 5px;
overflow-wrap: inherit;
}
.table-column {
width: 100%;
}
}
input {
border: none;
border-bottom: 1px solid silver;
}
:host ::ng-deep .mat-slide-toggle.mat-checked:not(.mat-disabled) {
.mat-slide-toggle-thumb {
background-color: #46AC9E;
}
.mat-slide-toggle-bar {
background-color: skyblue;
}
}
// .dialog-body {
// display: flex;
// justify-content: center;
// align-items: center;
// div {
// width: 90%;
// }
// }
.dialog-actions {
display: flex;
flex-wrap: wrap;
width: 97%;
justify-content: space-between;
.btn-group-left {
// min-width: 150px;
margin-top: 5px;
}
.btn-group-right {
// min-width: 95px;
margin-top: 5px;
}
}
.hide {
display: none;
}
:host ::ng-deep {
.mat-form-field-infix {
border-bottom: 0px solid white;
}
.mat-table {
tr {
th,
td {
vertical-align: middle;
}
}
}
}
.img-fluid {
margin-right: 5px;
max-height: 40px;
}
// .navbar {
// background-position: center;
// }
@media (max-width: 767px) {
.card {
min-width: 600px;
}
}
.mat-row:nth-child(even){
background-color: rgb(255, 255, 255);
}
.mat-row:nth-child(odd){
background-color: rgb(241, 241, 241);
}

@ -0,0 +1,344 @@
import { Component, OnInit, EventEmitter, Input, Output,ViewChild } from '@angular/core';
import { Router } from '@angular/router';
import { IgenMenuDto } from 'src/app/_dto/igenMenu.dto';
import { MenuFormatDto } from 'src/app/_dto/menu-format.dto';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { AuthService } from 'src/app/_providers/_services/auth.service';
import { MenuService } from 'src/app/_providers/_services/menu.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
import { EmailService } from 'src/app/pages/auth/services';
import { Observable, of } from 'rxjs';
import { Email, User } from 'src/app/pages/auth/models';
import { MatPaginator } from '@angular/material/paginator';
import { MatSort, Sort } from '@angular/material/sort';
import { MatTableDataSource } from '@angular/material/table';
import { routes } from 'src/app/consts';
import { MasterService } from 'src/app/_providers/_services/master.service';
<<<<<<< HEAD
import { TenderDetailDto } from 'src/app/_dto/tender-detail.dto';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
@Component({
selector: 'app-dashboard',
templateUrl: './dashboard.component.html',
styleUrls: ['./dashboard.component.scss']
})
export class DashboardComponent implements OnInit {
@Input() isMenuOpened: boolean;
@Output() isShowSidebar = new EventEmitter<boolean>();
public user$: Observable<User>
public emails$: Observable<Email[]>
public routers: typeof routes = routes;
schoolLogoPath: string;
<<<<<<< HEAD
tenderData: any;
seculevel: string = ''
dataSource: MatTableDataSource<TenderDetailDto>;
displayedColumns :any;
dataCopy: any;
pageLength: any;
searchTerm:any;
@ViewChild('paginator') paginator: MatPaginator;
@ViewChild(MatSort, { static: false }) sort: MatSort;
noData: boolean;
=======
tenderData: any;
seculevel: string = ''
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
constructor(
private _menuService: MenuService,
private router: Router,
private _ui: UiService,
private emailService: EmailService,
private authenticationService: AuthService,
<<<<<<< HEAD
private _masterService: MasterService,
private errorService:ErrorTranslateService
=======
private _masterService: MasterService
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
) {
// this.user$ = this.getUser();
this.seculevel = localStorage.getItem('seculevel')
console.log('=====level====',this.seculevel);
// this.emails$ = this.emailService.loadEmails();
// this.getSchoolLogo();
<<<<<<< HEAD
if(this.seculevel == 'B'){
this.displayedColumns = ['actions','title','publishedDate','bidOpenDate','view'];
}
else{
this.displayedColumns = ['slno','title','publishedDate','bidOpenDate','view','upload'];
}
}
// displayedColumns: string[] = ['no', 'name','download'];
=======
}
displayedColumns: string[] = ['no', 'name','download'];
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
loading: boolean = true;
menuData: any;
model: any;
async ngOnInit() {
<<<<<<< HEAD
this.getData();
=======
this._masterService.getMasterData(apiUrl.getTender).then((res) =>{
console.log("tenderData",res);
this.tenderData = res
})
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
// await this._ui.userValidation()
// this.loading = true;
// this.getMenuData();
}
<<<<<<< HEAD
getData(){
if(this.seculevel != 'B')
this._masterService.getMasterData(apiUrl.getTender).then((res) =>{
console.log("tenderData=1=",res);
this.tenderData = res;
this.dataCopy = res;
this.pageLength = this.tenderData.length;
this.dataSource = new MatTableDataSource(this.tenderData);
this.dataSource.sort = this.sort;
this.dataSource.paginator = this.paginator;
this.noData = (this.tenderData && this.tenderData.length == 0) ? true : false;
this.loading = false;
},err=>{
console.error(err)
})
else
this._masterService.getMasterData(apiUrl.adminTenderView).then((res) =>{
console.log("tenderData=2=",res);
this.tenderData = res;
this.dataCopy = res;
this.pageLength = this.tenderData.length;
this.dataSource = new MatTableDataSource(this.tenderData);
this.dataSource.sort = this.sort;
this.dataSource.paginator = this.paginator;
this.noData = (this.tenderData && this.tenderData.length == 0) ? true : false;
this.loading = false;
},err=>{
console.error(err)
})
}
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
addNewTender(){
this.navigateTo('/add-tenders')
}
<<<<<<< HEAD
sortData(sort: Sort) {
const data = this.tenderData.slice();
if (!sort.active || sort.direction === '') {
this.dataSource.data = data;
return;
}
this.dataSource.data = data.sort((a, b) => {
const isAsc = sort.direction === 'asc';
switch (sort.active) {
case 'title':
return compare(a.title, b.title, isAsc);
case 'publishedDate':
return compare(a.publishDate, b.publishDate, isAsc);
case 'bidOpenDate':
return compare(a.bidOpenDate, b.bidOpenDate, isAsc);
default:
return 0;
}
});
}
search(){
this.tenderData = this.dataCopy;
this.loading = true;
if (!this.searchTerm || this.searchTerm == null || this.searchTerm == undefined || this.searchTerm == "") {
this._ui.toastMessage(this.errorService.translate('enterSearchTerm'), 3000);
this.getData();
return;
}
this.tenderData = this.tenderData.filter(res => {
let includedInTitle = (res.title) ? res.title.toLowerCase().includes(this.searchTerm.toLowerCase()) : false;
let includedInPublishDate = (res.publishDate) ? res.publishDate.includes(this.searchTerm.toLowerCase()) : false;
let includedInbidOpenDate = (res.bidOpenDate) ? res.bidOpenDate.includes(this.searchTerm.toLowerCase()) : false;
if (includedInTitle)
return true;
if (includedInPublishDate)
return true;
if (includedInbidOpenDate)
return true;
else
return false;
});
this.noData = (this.tenderData && this.tenderData.length == 0) ? true : false;
this.pageLength = this.tenderData.length;
this.dataSource = new MatTableDataSource(this.tenderData);
this.loading = false;
}
reset(){
this.searchTerm = "";
this.getData();
}
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
// navigateTo(destination) {
// this.router.navigate([destination]);
// }
// async getMenuData() {
// this.menuData = []
// await this._menuService.getJsonData("sales-menu").then((res) => {
// res.forEach(element => {
// if (element.menuEnabled == "Y")
// this.menuData.push(element)
// });
// // this.menuData = res;
// this.loading = false;
// this.model = this.getMenuCompact(this.menuData, "root");
// },
// (err) => {
// console.log("===err====", err);
// });
// }
// getMenuCompact(menuList: IgenMenuDto[], parentMenuId: string, menuCompactData?: MenuFormatDto[]) {
// if (!parentMenuId)
// return [];
// if (!menuCompactData)
// menuCompactData = [];
// for (let menu of menuList) {
// if (menu.parentMenuId == parentMenuId && menu.menuEnabled == "Y") {
// let format: MenuFormatDto = { menuId: menu.menuId, icon: menu.icon, label: menu.description, langaugeLabelCode: menu.languageLabelCode, data: { description: menu.description, langaugeLabelCode: menu.languageLabelCode, menuId: menu.menuId, rightsGiven: menu.rightsGiven } };
// if (menu["isMegaMenu"]) format["isExpanded"] = true; else format["isExpanded"] = false;
// if (menu["isSideMenu"]) format["isSideMenu"] = true; else format["isSideMenu"] = false;
// if (menu["routerLink"]) format["routerLink"] = menu["routerLink"];
// // if (menu.menuType == "1") format["isExpanded"] = true;
// // if (menu.menuType != "1") format["isExpanded"] = false;
// // if (menu["routerLink"] === this.router.url) this.service.selectedMenu = format;
// if (menu["menuType"]) format["menuType"] = menu["menuType"];
// if (menu.menuType == "1") format["items"] = this.getMenuCompact(menuList, menu.menuId)
// if (menu["role"]) format["role"] = menu["role"];
// if (menu["project"]) format["project"] = menu["project"];
// if (this.seculevel == 'admin')
// menuCompactData.push(format);
// else {
// if (menu.role != 'admin') {
// menuCompactData.push(format);
// }
// }
// }
// }
// return menuCompactData;
// }
public openMenu(): void {
this.isMenuOpened = !this.isMenuOpened;
this.isShowSidebar.emit(this.isMenuOpened);
}
public signOut(): void {
this.authenticationService.logOut();
}
signIn(){
this.router.navigate(['/login']);
}
goToHome(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
goToView(tenderId) {
this.router.navigate(['/tender-view',tenderId]);
}
goToAddTenders(){
this.router.navigate(['/add-tenders']);
}
<<<<<<< HEAD
goToUpload(tenderId){
this.router.navigate(['/tender-upload',tenderId]);
=======
goToUpload(){
this.router.navigate(['/tender-upload']);
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
goToEdit(tenderId){
this.router.navigate(['/add-tenders',tenderId]);
}
Cancel(){
}
// public getUser(): Observable<User> {
// return of({
// email: localStorage.getItem('username'),
// name: localStorage.getItem('username'),
// });
// }
navigateTo(destination: any) {
this.router.navigate([destination])
}
}
function compare(a: any, b: any, isAsc: boolean): number {
return (a < b ? -1 : 1) * (isAsc ? 1 : -1);
}

@ -0,0 +1,88 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { DashboardRoutingModule } from './dashboard-routing.module';
import { LayoutComponentComponent } from './layout-component/layout-component.component';
import { DashboardComponent } from './dashboard.component';
import { SharedModule } from 'src/app/shared/shared.module';
import { MatProgressBarModule } from '@angular/material/progress-bar';
import { MatCardModule } from '@angular/material/card';
import { MatIconModule } from '@angular/material/icon';
import { MatTableModule } from '@angular/material/table';
import { MatInputModule } from '@angular/material/input';
import { MatPaginatorModule } from '@angular/material/paginator';
import { MatButtonModule } from '@angular/material/button';
import { MatSlideToggleModule } from '@angular/material/slide-toggle';
import { FormsModule } from '@angular/forms';
import { MatSortModule } from '@angular/material/sort';
import { TranslateModule } from '@ngx-translate/core';
import { HomeViewComponent } from './home-view/home-view.component';
import { HomeUploadComponent } from './home-upload/home-upload.component';
import { ReactiveFormsModule } from '@angular/forms';
import { TenderHomeComponent } from './tender-home/tender-home.component';
import { AddTendersComponent } from './add-tenders/add-tenders.component';
import { MatTabsModule } from '@angular/material/tabs';
import { MatDatepickerModule } from '@angular/material/datepicker';
import { MatNativeDateModule } from '@angular/material/core';
<<<<<<< HEAD
import { MatSelectModule } from '@angular/material/select';
import { MatMomentDateModule } from '@angular/material-moment-adapter';
import {MatTooltipModule} from '@angular/material/tooltip';
// import { NgxMatTimepickerModule } from 'ngx-mat-timepicker';
import { LOCALE_ID } from '@angular/core';
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
// import { MatTimepickerModule } from 'mat-timepicker';
// import { MatTimepickerModule } from '@angular/material/timepicker';
// import { MatSelectModule } from '@angular/material';
const lang = 'en-US';
@NgModule({
declarations: [
LayoutComponentComponent,
DashboardComponent,
HomeViewComponent,
HomeUploadComponent,
TenderHomeComponent,
AddTendersComponent,
],
imports: [
CommonModule,
DashboardRoutingModule,
SharedModule,
MatProgressBarModule,
MatCardModule,
MatIconModule,
MatTableModule,
MatInputModule,
MatButtonModule,
MatPaginatorModule,
MatSlideToggleModule,
FormsModule,
MatSortModule,
TranslateModule,
ReactiveFormsModule,
MatTabsModule,
<<<<<<< HEAD
MatSelectModule,
MatNativeDateModule,
MatDatepickerModule,
MatMomentDateModule,
MatTooltipModule
// NgxMatTimepickerModule.setLocale(lang),
// NgxMaterialTimepickerModule
// MatTimepickerModule
],
providers: [{ provide: LOCALE_ID, useValue: lang }]
=======
MatNativeDateModule,
MatDatepickerModule
]
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
})
export class DashboardModule { }

@ -0,0 +1,167 @@
<<<<<<< HEAD
<div class="container-responsive" *ngIf="secuLevel !='B'">
=======
<div class="container-responsive">
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link tender-link" (click)="navigateTo('dashboard')">Tender</a>
</li>
<li class="nav-item">
<p class="nav-link home-link" (click)="goToHome()">Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" (click)="goToContactUs()">Contact Us</p>
</li>
</ul>
</div>
</div>
</nav>
<nav class="navbar navbar-dark-responsive"
style="background-image: url('assets/img/panel_background.jpg');padding: 50px;"> -->
<!-- <div class="container-fluid">
<a class="navbar-brand" (click)="navigateTo('tender-view')">
<h6>Home / Tender</h6>
</a>
</div> -->
<!-- </nav> -->
<mat-progress-bar *ngIf="loading" mode="indeterminate" color="warn"></mat-progress-bar>
<br>
<div class="text-center mt-4">
<h2 class="font-weight-bold " style="color: #5faca1;">Upload Files <i class="bi bi-cloud-upload"></i></h2>
</div><br>
<div class="container">
<div class="row">
<div class="col-sm-6 offset-sm-3">
<div class="card">
<div class="card-body">
<div class="form-group">
<form (ngSubmit)="submitForm()" #myForm="ngForm">
<div class="form-group">
<label for="name">Name</label>
<input type="text" class="form-control" id="name" placeholder="Enter your name" [(ngModel)]="formData.name" name="name" required>
<div *ngIf="myForm.submitted && myForm.controls.name.errors">
<div *ngIf="myForm.controls.name.errors.required" class="text-danger">
Name is required.
</div>
</div>
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="text" class="form-control" id="phone" placeholder="Enter your phone number" [(ngModel)]="formData.phone" name="phone" required pattern="[0-9]{10}" [ngModelOptions]="{ updateOn: 'blur' }" >
<!-- Error messages for required and pattern -->
<div *ngIf="myForm.submitted && myForm.controls.phone.errors">
<div *ngIf="myForm.controls.phone.errors.required" class="text-danger">
Phone number is required.
</div>
<div *ngIf="myForm.controls.phone.errors.pattern" class="text-danger">
Phone number must be a 10-digit number.
</div>
<div *ngIf="phoneInvalid" class="text-danger">
Invalid phone number format.
</div>
</div>
</div>
<div class="form-group">
<label for="email">Email</label>
<input type="email" class="form-control" id="email" placeholder="Enter your email" [(ngModel)]="formData.email" name="email" required email>
<div *ngIf="myForm.submitted && myForm.controls.email.errors">
<div *ngIf="myForm.controls.email.errors.required" class="text-danger">
Email is required.
</div>
<div *ngIf="myForm.controls.email.errors.email" class="text-danger">
Invalid email format.
</div>
</div>
</div>
<table id="customers">
<tr>
<th style="width:30%;text-align: center;">Description</th>
<th style="text-align: center;">Document</th>
<!-- <th>Country</th> -->
</tr>
<tr *ngFor="let i of a">
<td></td>
<td>
<div class="form-group">
<!-- <label for="file1">File 1:</label> -->
<div class="input-group">
<input type="file" id="file1" class="form-control">
<button class="btn btn-outline-secondary delete-btn" (click)="deleteInput('file1')" type="button">
<i class="bi bi-trash"></i>
</button>
</div>
</div>
</td>
</tr>
</table>
<!-- <div class="form-group">
<label for="file3">File 3:</label>
<div class="input-group">
<input type="file" id="file3" class="form-control" aria-describedby="button-addon1" [(ngModel)]="formData.file3" name="file3">
<button class="btn btn-outline-secondary delete-btn" (click)="deleteInput('file3')" type="button">
<i class="bi bi-trash"></i>
</button>
</div>
</div> -->
<div *ngIf="myForm.submitted && myForm.invalid" class="text-danger">
Please fill in all required fields.
</div>
<button type="submit" style="margin-top: 10px;" class="btn btn-outline-dark float-right" >Submit</button>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<br><br>
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px;"
class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023.
</span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>
</div>

@ -0,0 +1,25 @@
#customers {
font-family: Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 1px solid #ddd;
padding: 8px;
}
#customers tr:nth-child(even){background-color: #f2f2f2;}
#customers tr:hover {background-color: #ddd;}
#customers th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #5FACA1;
color: white;
}
.nav-link:hover {
color: rgb(255, 0, 0);
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeUploadComponent } from './home-upload.component';
describe('HomeUploadComponent', () => {
let component: HomeUploadComponent;
let fixture: ComponentFixture<HomeUploadComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ HomeUploadComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(HomeUploadComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,84 @@
import { Component, OnInit } from '@angular/core';
import { FormGroup } from '@angular/forms';
import { Router } from '@angular/router';
import { log } from 'console';
import { ErrorTranslateService } from 'src/app/_providers/_services/error-translate.service';
import { UiService } from 'src/app/_providers/_services/ui.service';
@Component({
selector: 'app-home-upload',
templateUrl: './home-upload.component.html',
styleUrls: ['./home-upload.component.scss']
})
export class HomeUploadComponent implements OnInit {
phoneInvalid: boolean = false;
secuLevel:any;
formData: any = {};
myForm: FormGroup;
loading: boolean = true
<<<<<<< HEAD
a=[{},{},{},{}]
=======
a=[{},{},{},{}]
constructor(private router: Router) { }
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
constructor(private router: Router,private _ui:UiService,private _errorTranslate: ErrorTranslateService) {
this.secuLevel = localStorage.getItem('seculevel');
}
navigateTo(destination: any) {
this.router.navigate([destination])
}
goToHome(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
preSave(){
if(this.formData.name == '' || this.formData.name == undefined){
console.log("1");
return false
}
if(this.formData.phone == '' || this.formData.phone == undefined || this.formData.phone.length > 10 || this.formData.phone.length < 10){
console.log("ph");
return false
}
if(!this._ui.phoneNoValidation(this.formData.phone)){
this._ui.toastMessage(this._errorTranslate.translate('enterAValidPhoneNumber'));
return false;
}
if(this.formData.email == '' || this.formData.email == undefined){
console.log("e");
return false
}
return true
}
submitForm() {
if(this.preSave())
console.log(this.formData);
}
deleteInput(inputFieldId: string) {
const inputField = document.getElementById(inputFieldId) as HTMLInputElement;
if (inputField) {
inputField.value = '';
}
}
ngOnInit(): void {
this.loading = false
}
}

@ -0,0 +1,555 @@
<div class="container-responsive">
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link tender-link" (click)="navigateTo('auth/admin-home')">Tender</a>
</li>
<li class="nav-item">
<p class="nav-link home-link" (click)="goToHome()">Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" (click)="goToContactUs()">Contact Us</p>
</li>
</ul>
</div>
</div>
</nav>
<nav class="navbar navbar-dark-responsive"
style="background-image: url('assets/img/panel_background.jpg');padding: 50px;"> -->
<!-- <div class="container-fluid"> -->
<!-- <a class="navbar-brand" (click)="navigateTo('tender-view')">
<h6>Home / Tender</h6>
</a> -->
<!-- </div> -->
<!-- </nav> -->
<!-- <mat-progress-bar mode="indeterminate" color="warn"></mat-progress-bar> -->
<br>
<div class="text-center mt-4">
<h2 class="font-weight-bold " style="color: #5faca1;">Tender Details </h2>
</div><br>
<div class="row d-flex justify-content-center ">
<div class="col-sm-11 ">
<div class="card">
<div class="card-body">
<div class="row">
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Basic Details</th>
</tr>
</thead>
<tbody>
<tr>
<th >Organisation Name</th>
<<<<<<< HEAD
<td class="col-md-6" >{{tenderData?.orgChain}}</td>
=======
<td class="col-md-6" >{{tenderData.orgChain}}</td>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<tr>
<th>Tender Reference Number</th>
<td>{{tenderData.tenderRefNo}}</td>
<<<<<<< HEAD
</tr>
<tr>
<th>Tender ID</th>
<td>{{tenderData.tenderId}}</td>
</tr>
<tr>
<th>Tender Type</th>
<td>{{tenderData.tenderTypeD.tenderType}}</td>
</tr>
<tr>
<th>Tender Category</th>
<td>{{tenderData.tenderCategoryD.tenderCategory}}</td>
=======
</tr>
<tr>
<th>Tender ID</th>
<td>{{tenderData.tenderId}}</td>
</tr>
<tr>
<th>Tender Type</th>
<td>{{tenderData.tenderType}}</td>
</tr>
<tr>
<th>Tender Category</th>
<td>{{tenderData.tenderCategoryD.tenderCategory}}</td>
</tr>
<tr>
<th>Payment Mode</th>
<td>{{tenderData.paymentModeD.paymentMode}}</td>
</tr>
<tr>
<th>Form of Contract</th>
<td>{{tenderData.formOfContractD.formOfContract}}</td>
</tr>
<tr>
<th>No. of Covers</th>
<td>{{tenderData.noOfCovers}}</td>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<tr>
<th>Payment Mode</th>
<td>{{tenderData.paymentModeD.paymentMode}}</td>
</tr>
<tr>
<th>Form of Contract</th>
<td>{{tenderData.formOfContractD.formOfContract}}</td>
</tr>
<!-- <tr>
<th>No. of Covers</th>
<td>{{tenderData.noOfCovers}}</td>
</tr> -->
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Tender Fee Details</th>
</tr>
</thead>
<tbody>
<tr>
<th>Tender Fee in ₹</th>
<td class="col-md-7" >{{tenderData.tenderFee}}</td>
</tr>
<tr>
<th>Fee Payable To</th>
<td>{{tenderData.feePayableTo}}</td>
</tr>
<tr>
<th>Tender Fee Exemption Allowed</th>
<td>{{tenderData.tenderFeeExemption}}</td>
<<<<<<< HEAD
=======
</tr>
<tr>
<th>Fee Payable At</th>
<td>{{tenderData.feePayableAt}}</td>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<!-- <tr>
<th>Fee Payable At</th>
<td>{{tenderData.feePayableAt}}</td>
</tr> -->
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">EMD Fee Details</th>
</tr>
</thead>
<tbody>
<tr>
<th >EMD Amount in ₹</th>
<td class="col-md-6" >{{tenderData.emdAmt}}</td>
</tr>
<tr>
<th>EMD Fee Type</th>
<<<<<<< HEAD
<td>{{tenderData.emdFeeTypeD.emdFeeType}}</td>
=======
<td>{{tenderData.emdFeeType}}</td>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<tr>
<th>EMD Payable To</th>
<td>{{tenderData.emdPayableTo}}</td>
</tr>
<tr>
<th>EMD through BG/ST or EMD Exemption Allowed</th>
<td>{{tenderData.allowEmdBgOrSt}}</td>
</tr>
<tr>
<th>EMD Percentage</th>
<td>{{tenderData.emdPercentage}}</td>
</tr>
</tbody>
</table>
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Critical Dates</th>
</tr>
</thead>
<tbody>
<tr>
<th >Published Date</th>
<td class="col-md-6" >{{tenderData.publishDate}}</td>
</tr>
<tr>
<th>Document Download / Sale Start Date</th>
<td>{{tenderData.saleStartDate}}</td>
</tr>
<tr>
<th>Clarification Start Date</th>
<td>{{tenderData.clarificationStartDate}}</td>
</tr>
<tr>
<th>Bid Submission Start Date</th>
<td>{{tenderData.bidSubStartDate}}</td>
</tr>
<tr>
<th>Bid Opening Date</th>
<td>{{tenderData.bidOpenDate}}</td>
</tr>
<tr>
<th>Document Download / Sale End Date</th>
<td>{{tenderData.saleEndDate}}</td>
</tr>
<tr>
<th>Pincode</th>
<td>{{tenderData.pincode}}</td>
</tr>
<tr>
<th>Clarification End Date</th>
<td>{{tenderData.clarificationEndDate}}</td>
</tr>
<tr>
<th>Bid Submission End Date</th>
<td>{{tenderData.bidSubEndDate}}</td>
</tr>
</tbody>
</table>
</div>
</div>
<div class="col-md-6">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Work Item Details</th>
</tr>
</thead>
<tbody>
<tr>
<th>Title</th>
<td class="col-md-6">{{tenderData.title}}</td>
</tr>
<tr>
<th>Work Description</th>
<td>{{tenderData.workDesc}}</td>
</tr>
<tr>
<th>Pre Qualification</th>
<td>{{tenderData.ndaPreQualification}}</td>
</tr>
<tr>
<th>Independent External Monitor/Remarks</th>
<td>{{tenderData.remarks}}</td>
</tr>
<tr>
<th>Tender Value in ₹</th>
<td>{{tenderData.tenderValue}}</td>
</tr>
<tr>
<th>Contract Type</th>
<td>{{tenderData.contractType}}</td>
</tr>
<tr>
<th>Location</th>
<td>{{tenderData.location}}</td>
</tr>
<<<<<<< HEAD
<tr>
<th>Pre Bid Meeting Address</th>
<td>{{tenderData.preBidMeetAdd}}</td>
</tr>
<tr>
<th>Product Category</th>
<td>{{tenderData.productCategoryD.productCategory}}</td>
</tr>
<tr>
<th>Bid Validity(Days)</th>
<td>{{tenderData.bidValidity}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Date</th>
<td>{{tenderData.preBidDate}}</td>
</tr>
<tr>
<th>Sub category</th>
<td>{{tenderData.subCategory}}</td>
</tr>
<tr>
<th>Period Of Work(Days)</th>
<td>{{tenderData.periodOfWork}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Place</th>
<td>{{tenderData.preBidMeetPlace}}</td>
</tr>
<tr>
<th>Bid Opening Place</th>
<td>{{tenderData.bidOpeningPlace}}</td>
</tr>
</tbody>
</table>
</div>
</div>
=======
<tr>
<th>Pre Bid Meeting Address</th>
<td>{{tenderData.preBidMeetAdd}}</td>
</tr>
<tr>
<th>Product Category</th>
<td>{{tenderData.productCategory}}</td>
</tr>
<tr>
<th>Bid Validity(Days)</th>
<td>{{tenderData.bidValidity}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Date</th>
<td>{{tenderData.preBidMeetAdd}}</td>
</tr>
<tr>
<th>Sub category</th>
<td>{{tenderData.subCategory}}</td>
</tr>
<tr>
<th>Period Of Work(Days)</th>
<td>{{tenderData.periodOfWork}}</td>
</tr>
<tr>
<th>Pre Bid Meeting Place</th>
<td>{{tenderData.preBidMeetPlace}}</td>
</tr>
<tr>
<th>Bid Opening Place</th>
<td>{{tenderData.bidOpeningPlace}}</td>
</tr>
</tbody>
</table>
</div>
</div>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="12">Tenders Documents</th>
</tr>
</thead>
<tbody>
<tr>
<<<<<<< HEAD
<th colspan="12" class="text-center" style="background-color: #b8b8b8;" >Drawings Document</th>
=======
<th colspan="12" class="text-center" style="background-color: #b8b8b8;" >NIT Document</th>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
<tr>
<<<<<<< HEAD
<th colspan="12">Drawings <button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="DownloadDrawings()"> <i class="bi bi-file-earmark-zip"></i> Download</button></th>
</tr>
<tr>
<td colspan="12"></td>
</tr>
=======
<th colspan="5">Document Name</th>
<th colspan="7">Description</th>
</tr>
<tr>
<td colspan="5"></td>
<td colspan="7"></td>
</tr>
<tr>
<th colspan="12"><span id="zipFile"> <i class="bi bi-file-earmark-zip"></i> Download</span> </th>
</tr>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tbody>
<br>
<tbody>
<tr>
<th colspan="12" class="text-center" style="background-color:#b8b8b8;" >Work Item Documents</th>
</tr>
<tr>
<th colspan="4">Document Type</th>
<th colspan="4">Document Name</th>
<th colspan="4">Description</th>
</tr>
<tr>
<td colspan="4"></td>
<td colspan="4"></td>
<td colspan="4"></td>
</tr>
<tr>
<<<<<<< HEAD
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th>
</tr>
</tbody>
<tbody>
<tr>
<th colspan="12" class="text-center" style="background-color:#b8b8b8;" >NIT Item Documents</th>
</tr>
<tr>
<th colspan="4">Document Type</th>
<th colspan="4">Document Name</th>
<th colspan="4">Description</th>
</tr>
<tr>
<td colspan="4"></td>
<td colspan="4"></td>
<td colspan="4"></td>
</tr>
<tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th>
=======
<th colspan="12"><button mat-raised-button (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th>
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
</tr>
</tbody>
</table>
</div>
</div>
<<<<<<< HEAD
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="12">Required Documents Details</th>
</tr>
</thead>
<tbody>
<tr>
<th colspan="4">Document Type</th>
<th colspan="4">Description</th>
<th colspan="4">Document Format</th>
</tr>
<tr>
<td colspan="4"></td>
<td colspan="4"></td>
<td colspan="4"></td>
</tr>
<tr>
<th colspan="12"><button mat-raised-button id="zipFile" class=" float-right btn-sm" (click)="downloadZip()"> <i class="bi bi-file-earmark-zip" ></i> Download as Zip File</button> </th>
</tr>
</tbody>
</table>
</div>
</div>
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
<div class="col-md-12">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th colspan="2">Tender Inviting</th>
</tr>
</thead>
<tbody>
<tr>
<th>Name</th>
<td class="col-md-6" >{{tenderData.tenderInvName}}</td>
</tr>
<tr>
<th>Address</th>
<td>{{tenderData.tenderInvAddess}}</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
<br>
</div>
</div><br>
</div>
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px; bottom: 0;"
class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023.
</span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>

@ -0,0 +1,51 @@
.container-fluid{
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
top: 10px;
position: relative;
}
.container-fluid2{
width: 100%;
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
top: -1px;
position: relative;
}
.table td {
word-break: break-word;
}
.nav-link:hover {
color: rgb(255, 0, 0);
}
#zipFile:hover {
color: rgb(255, 0, 0);
cursor: pointer;
}
// .container-responsive {
// min-height: 100vh;
// position: relative;
// }
// #footer {
// background-color: #3a8379;
// padding: 20px;
// color: #ffffff;
// position: absolute;
// bottom: 0;
// width: 100%;
// }
thead{
<<<<<<< HEAD
background-color: #5faca1; color: aliceblue;
=======
background-color: rgb(161, 42, 42); color: aliceblue;
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { HomeViewComponent } from './home-view.component';
describe('HomeViewComponent', () => {
let component: HomeViewComponent;
let fixture: ComponentFixture<HomeViewComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ HomeViewComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(HomeViewComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,156 @@
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute, Router } from '@angular/router';
import { apiUrl } from 'src/app/_providers/_resources/api-url.properties';
import { MasterService } from 'src/app/_providers/_services/master.service';
import { environment } from 'src/environments/environment';
@Component({
selector: 'app-home-view',
templateUrl: './home-view.component.html',
styleUrls: ['./home-view.component.scss']
})
export class HomeViewComponent implements OnInit {
tenderId: number;
tenderData: any;
<<<<<<< HEAD
constructor(private router: Router,
private route: ActivatedRoute,
private _masterService: MasterService) {
this.tenderId = +this.route.snapshot.paramMap.get('id');
this.getData()
=======
constructor(private router: Router,
private route: ActivatedRoute,
private _masterService: MasterService) {
this.tenderId = +this.route.snapshot.paramMap.get('id');
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
ngOnInit(): void {
<<<<<<< HEAD
console.log("this.tenderId", this.tenderId);
this.getData()
}
getData() {
this._masterService.getMasterDatabyId(apiUrl.AllTenderData, this.tenderId).then((res) => {
console.log("tenderData", res);
this.tenderData = res
})
=======
console.log("this.tenderId",this.tenderId);
this.getData()
}
getData(){
this._masterService.getMasterDatabyId(apiUrl.AllTenderData,this.tenderId).then((res) =>{
console.log("tenderData",res);
this.tenderData = res})
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
navigateTo(destination: any) {
this.router.navigate([destination])
}
goToHome() {
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs() {
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
<<<<<<< HEAD
DownloadDrawings(){
const id = this.tenderId;
this._masterService.getMasterDatabyId(apiUrl.drawingsDownloadDocs,id).then((res)=>{
})
}
downloadZip() {
console.log('clicked');
const id = this.tenderId;
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 10);
this._masterService.getMasterDatabyId(apiUrl.bankDocs, id).then(res => {
}, err => {
console.log('res===>', err);
if (err.status == 200) {
console.log('start >>>');
// window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
setTimeout(() => {
newWindow.close();
}, 100);
}
if (err.status == 404) {
alert('No Bank Document Found for the selected Tender.');
}
if (err.status == 500) {
alert(`${err.message}`);
}
else {
alert(`An error Occured`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 100);
}
})
// window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id);
=======
downloadZip(){
console.log('clicked');
const id = this.tenderId;
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 10);
this._masterService.getMasterDatabyId(apiUrl.bankDocs,id).then(res=>{
},err=>{
console.log('res===>',err);
if(err.status == 200){
console.log('start >>>');
// window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
setTimeout(() => {
newWindow.close();
}, 100);
}
if(err.status == 404){
alert('No Bank Document Found for the selected Tender.');
}
if(err.status == 500){
alert(`${err.message}`);
}
else{
alert(`An error Occured`);
// let newWindow = window.open(`${environment.apiUrl}/${apiUrl.bankDocs}/${id}`);
// setTimeout(() => {
// newWindow.close();
// }, 100);
}
})
// window.open('http://192.168.1.112:3500/api/v1/file-upload/Bank-Documents-Arc/'+id);
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
}
}

@ -0,0 +1,6 @@
<!-- <app-layout> -->
<!-- <div class="row" style="width:100%"> -->
<router-outlet></router-outlet>
<app-footer></app-footer>
<!-- </div> -->
<!-- </app-layout> -->

@ -0,0 +1,19 @@
import { Component, OnInit } from '@angular/core';
import { UiService } from 'src/app/_providers/_services/ui.service';
@Component({
selector: 'app-layout-component',
templateUrl: './layout-component.component.html',
styleUrls: ['./layout-component.component.css']
})
export class LayoutComponentComponent implements OnInit {
constructor(
private _ui: UiService,
) { }
async ngOnInit() {
await this._ui.userValidation()
}
}

@ -0,0 +1,93 @@
<div class="container-responsive">
<!-- <nav class="navbar navbar-expand-lg" style="padding: 16.5px;">
<div class="container">
<p class="navbar-brand d-flex align-items-center" href="#">
<img src="assets/img/emblem2.jpg" alt="" class="img-fluid" style="height: 40px;">
Thrickodithanam SCB
</p>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse justify-content-end" id="navbarNav">
<ul class="navbar-nav"> -->
<!-- <li class="nav-item">
<p class="nav-link home-link">Add Tenders</p>
</li> -->
<!-- <li class="nav-item">
<p class="nav-link home-link" (click)="goToHome()">Home</p>
</li>
<li class="nav-item">
<p class="nav-link contact-link" (click)="goToContactUs()">Contact Us</p>
</li>
<li class="nav-item">
<p class="nav-link sign-out-link" (click)="signOut()">Sign In <i class="bi bi-person-plus-fill"></i></p>
</li> -->
<!-- <li class="nav-item">
<p class="nav-link sign-out-link" (click)="signOut()">Sign Out <i class="bi bi-person-x-fill"></i></p>
</li> -->
<!-- </ul>
</div>
</div>
</nav>
<nav class="navbar navbar-dark-responsive" style="background-image: url('assets/img/panel_background.jpg');padding: 50px;">
</nav> -->
<!-- <mat-progress-bar mode="indeterminate" color="warn"></mat-progress-bar> -->
<br><br>
<div class="container text-center">
<div class="row">
<div class="col-12">
<div class="card-responsive">
<div class="card-body-responsive">
<div class="table-responsive">
<table class="table table-bordered">
<thead class="table-dark">
<tr>
<th class="col-sm-1">#</th>
<th class="col-sm-9">TENDER NAME</th>
<th class="col-sm-1">VIEW</th>
<th class="col-sm-1">UPLOAD</th>
</tr>
</thead>
<tbody>
<tr *ngFor="let tender of data; let i = index">
<td class="col-sm-1">{{ i + 1 }}</td>
<td class="col-sm-9 table-break-word">{{ tender.name }}</td>
<td class="col-sm-1">
<button type="button" class="btn btn-outline-danger btn-sm" (click)="goToView()">View <i
class="bi bi-card-list"></i></button>
</td>
<td class="col-sm-1" >
<button type="button" class="btn btn-outline-dark btn-sm" (click)="goToUpload()">Upload <i class="bi bi-upload"></i></button>
</td>
</tr>
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</div><br><br>
<div class="footer" class="fixed-bottom">
<footer id="footer" style="background-color: #48746e; padding: 70px 0; color: #ffffff; font-size: 16px; bottom: 0;" class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<p class="mb-0">&copy; <span style="font-weight: bolder;font-family: sans-serif;">Thrickodithanamscb 2023. </span>All Rights Reserved</p>
<p class="mb-0">Designed by <a href="https://www.simssoftware.in/" style="color: #ffffff;">SiMS</a></p>
</div>
</div>
</div>
</footer>
</div>
</div>

@ -0,0 +1,72 @@
// .header {
// margin-left: 4%;
// margin-top: 20px;
// }
// .header>h6{
// a {
// text-decoration: none;
// color: #262627;
// }
// a:hover {
// text-decoration: underline;
// cursor: pointer;
// }
// }
// mat-card{
// min-width: 180px ;
// // max-width: 20vw;
// height: 200px;
// display: inline-block;
// }
// mat-card:hover{
// cursor: pointer;
// }
// -----------------------------------------------------------------------------------
.nav-link:hover {
color: red;
}
th,
td {
padding: 10px;
border: 1px solid #ccc;
white-space: nowrap;
}
.h2 {
font-family: sans-serif;
font-size: 26px;
font-weight: 500;
}
.table td {
word-break: break-word;
}
.table-break-word {
word-break: break-word;
}
.img-fluid {
margin-right: 5px;
max-height: 40px;
}
// .navbar {
// background-position: center;
// }

@ -0,0 +1,25 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { TenderHomeComponent } from './tender-home.component';
describe('TenderHomeComponent', () => {
let component: TenderHomeComponent;
let fixture: ComponentFixture<TenderHomeComponent>;
beforeEach(async () => {
await TestBed.configureTestingModule({
declarations: [ TenderHomeComponent ]
})
.compileComponents();
});
beforeEach(() => {
fixture = TestBed.createComponent(TenderHomeComponent);
component = fixture.componentInstance;
fixture.detectChanges();
});
it('should create', () => {
expect(component).toBeTruthy();
});
});

@ -0,0 +1,67 @@
import { Component, OnInit } from '@angular/core';
import { Router } from '@angular/router';
import { AuthService } from 'src/app/_providers/_services/auth.service';
@Component({
selector: 'app-tender-home',
templateUrl: './tender-home.component.html',
styleUrls: ['./tender-home.component.scss']
})
export class TenderHomeComponent implements OnInit {
displayedColumns: string[] = ['no', 'name','download'];
data:any[] = [
{ no:1,name:'Tender 1', city: 'New York' },
{ no:2 , name:'Tender 2', city: 'London' },
{ no:3 , name:'Tender 3', city: 'Paris' },
];
constructor( private authenticationService: AuthService,
private router: Router,) { }
ngOnInit(): void {
}
public signOut(): void {
this.authenticationService.logOut();
}
signIn(){
this.router.navigate(['/login']);
}
goToHome(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#hero';
}
goToContactUs(){
window.location.href = 'https://www.thrickodithanamscb.in/index.html#contact';
}
goToView() {
this.router.navigate(['/tender-view']);
}
goToUpload(){
this.router.navigate(['/tender-upload']);
}
// public getUser(): Observable<User> {
// return of({
// email: localStorage.getItem('username'),
// name: localStorage.getItem('username'),
// });
// }
navigateTo(destination: any) {
this.router.navigate([destination])
}
}

@ -0,0 +1,46 @@
import { Directive, Input, Output, EventEmitter, SimpleChanges, ChangeDetectorRef } from '@angular/core';
import { DecimalPipe } from '@angular/common';
/*
Created By : Arun Joy
Created On : 20-03-2020
Created For : For Amount feilds decimal formatting.
*/
@Directive({
selector: '[ictAmount]',
host: {
'[value]': 'ictAmount',
'(change)': 'change($event.target.value)',
}
})
export class AmountDirective {
@Input() ictAmount: number;
@Output() ictAmountChange: EventEmitter<string> = new EventEmitter<string>();
amtDecPts = 2;
constructor(
private _cdr: ChangeDetectorRef,
private _decimalPipe: DecimalPipe,
) { }
ngOnChanges(changes: SimpleChanges): void {
this.format(this.ictAmount);
}
change(value) {
this.format(value, "C");
}
format(value, flag?: string) {
value = (value && value.toString()) ? (value.toString().replace(/,/gi, "")) : 0;
let pattern = "1." + this.amtDecPts + "-" + this.amtDecPts;
value = this._decimalPipe.transform(value, pattern);
value = value.replace(/,/gi, "");
// this.ictAmountChange.next(value);
if (!flag || flag != "C")
this._cdr.detectChanges();
}
}

@ -0,0 +1,48 @@
import { Directive, Input, Output, EventEmitter, ChangeDetectorRef, SimpleChanges } from '@angular/core';
import { DecimalPipe } from '@angular/common';
/*
Created By : Arun Joy
Created On : 20-03-2020
Created For : For Rate feilds decimal formatting.
*/
@Directive({
selector: '[ictCurrency]',
host: {
'[value]': 'ictCurrency',
'(change)': 'change($event.target.value)',
}
})
export class CurrencyDirective {
@Input() ictCurrency: number;
@Output() ictCurrencyChange: EventEmitter<string> = new EventEmitter<string>();
coinDec = 2;
constructor(
private _cdr: ChangeDetectorRef,
private _decimalPipe: DecimalPipe
) { }
ngOnChanges(changes: SimpleChanges): void {
this.format(this.ictCurrency);
}
change(value) {
this.format(value, "C");
}
format(value, flag?: string) {
value = (value && value.toString()) ? (value.toString().replace(/,/gi, "")) : 0;
let coinDec = this.coinDec;
let pattern = "1." + coinDec + "-" + coinDec;
value = this._decimalPipe.transform(value, pattern);
value = value.replace(/,/gi, "");
// this.ictCurrencyChange.next(value);
if (!flag || flag != "C")
this._cdr.detectChanges();
}
}

@ -0,0 +1,47 @@
import { Directive, Input, Output, EventEmitter, SimpleChanges, ChangeDetectorRef } from '@angular/core';
import { DecimalPipe } from '@angular/common';
/*
Created By : Arun Joy
Created On : 20-03-2020
Created For : For Amount feilds decimal formatting.
*/
@Directive({
selector: '[ictFormat]',
host: {
'[value]': 'ictFormat',
'(change)': 'change($event.target.value)',
}
})
export class FormatDirective {
@Input() ictFormat: number;
@Output() ictFormatChange: EventEmitter<string> = new EventEmitter<string>();
@Input() arg: string;
constructor(
private _cdr: ChangeDetectorRef,
private _decimalPipe: DecimalPipe,
) { }
ngOnChanges(changes: SimpleChanges): void {
console.log("===arg===", this.arg);
this.format(this.ictFormat);
}
change(value) {
this.format(value, "C");
}
format(value, flag?: string) {
value = (value && value.toString()) ? (value.toString().replace(/,/gi, "")) : 0;
// let pattern = "1." + this._icoService.currentCompanyDetails.amtDecPts + "-" + this._icoService.currentCompanyDetails.amtDecPts;
let pattern = "1.2-2";
value = this._decimalPipe.transform(value, pattern);
value = value.replace(/,/gi, "");
// this.ictFormatChange.next(value);
if (!flag || flag != "C")
this._cdr.detectChanges();
}
}

@ -0,0 +1,48 @@
import { Directive, ElementRef, HostListener } from '@angular/core';
/*
created by Ajith A Pradeep
created on 03/03/2023
*/
@Directive({
selector: '[numberOnly]'
})
export class NumberOnlyDirective {
private regex: RegExp = new RegExp(/^\d*\.?\d{0,2}$/g);
constructor(private el: ElementRef) { }
// Listen for all keydown events on the input field
@HostListener('keydown', ['$event'])
onKeyDown(event: KeyboardEvent) {
// Allow backspace, delete, and navigation keys (arrows)
if ([46, 8, 9, 27, 13, 110, 190].indexOf(event.keyCode) !== -1 ||
// Allow Ctrl/Cmd+A, Ctrl/Cmd+C, Ctrl/Cmd+X
(event.keyCode === 65 || event.keyCode === 67 || event.keyCode === 88) && (event.ctrlKey || event.metaKey)) {
return;
}
// Do not allow anything else that is not a number or decimal point
if ((event.shiftKey || event.keyCode < 48 || event.keyCode > 57) && (event.keyCode < 96 || event.keyCode > 105) && event.keyCode !== 190 && event.keyCode !== 110) {
event.preventDefault();
}
}
// Listen for all input events on the input field (copy-paste, drag-and-drop, etc.)
@HostListener('input', ['$event']) onInputChange(event: any) {
const initialValue = this.el.nativeElement.value;
const newValue = initialValue.replace(/[^0-9\.]/g, ''); // Remove any character that isn't a number or decimal point
const parts = newValue.split('.');
if (parts.length > 1) {
// Limit to two decimal places
this.el.nativeElement.value = `${parts[0]}.${parts[1].substring(0, 2)}`;
} else {
this.el.nativeElement.value = parts[0];
}
if (initialValue !== this.el.nativeElement.value) {
// Emit change event to update host component property
event.stopPropagation();
this.el.nativeElement.dispatchEvent(new Event('input'));
}
}
}

@ -0,0 +1,47 @@
import { Directive, Input, Output, EventEmitter, ChangeDetectorRef, SimpleChanges } from '@angular/core';
import { DecimalPipe } from '@angular/common';
/*
Created By : Arun Joy
Created On : 20-03-2020
Created For : For Rate feilds decimal formatting.
*/
@Directive({
selector: '[ictRate]',
host: {
'[value]': 'ictRate',
'(change)': 'change($event.target.value)',
}
})
export class RateDirective {
@Input() ictRate: number;
@Output() ictRateChange: EventEmitter<string> = new EventEmitter<string>();
rateDecPts: number = 2;
constructor(
private _cdr: ChangeDetectorRef,
private _decimalPipe: DecimalPipe
) { }
ngOnChanges(changes: SimpleChanges): void {
this.format(this.ictRate);
}
change(value) {
this.format(value, "C");
}
format(value, flag?: string) {
value = (value && value.toString()) ? (value.toString().replace(/,/gi, "")) : 0;
let pattern = "1." + this.rateDecPts + "-" + this.rateDecPts;
value = this._decimalPipe.transform(value, pattern);
value = value.replace(/,/gi, "");
// this.ictRateChange.next(value);
if (!flag || flag != "C")
this._cdr.detectChanges();
}
}

@ -0,0 +1,6 @@
export interface AppConfig {
inputStyle?: string;
dark?: boolean;
theme?: string;
ripple?: boolean;
}

@ -0,0 +1,4 @@
// environmenter.token.ts
import { InjectionToken, Inject } from '@angular/core';
// That last string is just a description for debugging purpose
export const ENVIRONMENTER = new InjectionToken('Environmenter');

@ -0,0 +1,52 @@
export const apiUrl = {
login: "auth/signin",
googleSignIn: "auth/google",
facebookSignIn: "auth/facebook",
userInfo: "auth/user-info",
<<<<<<< HEAD
getTender: "tender",
=======
getTender: "tender-details",
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
AllTenderData: "tender",
TenderType: "tender-type",
TenderCategory: "tender-category",
PaymentMode: "payment-mode",
formcontract: "form-of-contract",
productcategory: "product-category",
emdFeeType: "emd-fee-type",
documentType: "document-type",
drawingUploadDoc:"file-upload/drawings",
<<<<<<< HEAD
nitUploadDoc:"file-upload/notice",
coverslov: "covers-lov",
fileformatlov:"file-format-lov",
=======
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
docUpload: "file-upload/Bank-documents",
userImageUpload: "file-upload/user",
changePassword: 'iuser/change-password',
cryptoEncrypt: "crypto/encrypt",
cryptoDecrypt: "crypto/decrypt",
registerOtp: 'auth/otp/R',
validateRegisterOtp: 'auth/verifyOtp/R',
signup: 'auth/signup',
<<<<<<< HEAD
bankDocs: 'file-upload/Bank-Documents-Arc',
drawingsDownloadDocs: "file-upload/Drawings-Arc",
adminTenderView:'tender/admin'
=======
bankDocs: 'file-upload/Bank-Documents-Arc'
>>>>>>> 7a8b1ea4654d5c265e964fc9b34b53f325c9cfb3
};
export const apiFilterProperties = {
};

@ -0,0 +1,7 @@
export const routePath = {
home:"/auth/admin-home",
login: "/auth/login",
dashboard: "/dashboard",
};

@ -0,0 +1,27 @@
import { Injectable } from '@angular/core';
import { Subject } from 'rxjs';
import { AppConfig } from '../_domain/appconfig';
@Injectable()
export class AppConfigService {
config: AppConfig = {
theme: 'saga-blue',
dark: false,
inputStyle: 'outlined',
ripple: true
};
private configUpdate = new Subject<AppConfig>();
configUpdate$ = this.configUpdate.asObservable();
updateConfig(config: AppConfig) {
this.config = config;
this.configUpdate.next(config);
}
getConfig() {
return this.config;
}
}

@ -0,0 +1,158 @@
import { Injectable } from '@angular/core';
import { HttpClient, HttpHeaders } from '@angular/common/http';
import { Router } from '@angular/router';
import { apiUrl } from '../_resources/api-url.properties';
import { routePath } from '../_resources/route-path.properties';
import { ProvidersService } from '../providers.service';
import { BehaviorSubject, Observable } from 'rxjs';
import { map } from 'rxjs/operators';
import { AuthenticationDto } from 'src/app/_dto/authentication.dto';
import { TokenDto } from 'src/app/_dto/token.dto';
/*
Created By : Arun Joy
Created On : 14-01-2020
Created For : Created for getting authentication data from authentication API.
*/
@Injectable({
providedIn: 'root'
})
export class AuthService {
headers: HttpHeaders = new HttpHeaders();
environment: any;
firebaseToken: string = ''
currentUserShortInfo: { userId: string, userName: string, userImagePath: string } = { userId: '', userName: '', userImagePath: '' };
private currentUserSubject: BehaviorSubject<any>;
public currentUser: Observable<any>;
constructor(
private http: HttpClient,
private router: Router,
private conn: ProvidersService
) {
this.environment = this.conn.environment;
this.currentUserSubject = new BehaviorSubject<any>(localStorage.getItem('authtoken') ? true : false);
this.currentUser = this.currentUserSubject.asObservable();
}
public get currentUserValue(): any {
return this.currentUserSubject.value;
}
signIn(param: AuthenticationDto)
: Promise<TokenDto> {
this.headers.append('Content-Type', 'application/json');
this.headers.append('emailid', param.username);
return (this.http.post<TokenDto>(`${this.environment.apiUrl}/${apiUrl.login}`, param)
.pipe(map(user => {
console.log("=======user========", user)
if (user && user != null) {
console.log("=======user======1==", user)
// if (user.accessToken)
this.currentUserSubject.next(user);
// else
// return user;
}
return user;
})))
.toPromise();
}
getUserModule(param: AuthenticationDto): Promise<void> {
return this.http.get<any>(`${this.environment.apiUrl}/${apiUrl.login}`, { headers: { 'emailid': param.username } }).toPromise();
}
getUserInfo(): Promise<{ userId: string, userName: string, userImagePath: string, userEmail: string, userMobile: string }> {
return this.http.get<any>(`${this.environment.apiUrl}/${apiUrl.userInfo}`).toPromise();
}
facebookSignIn() {
var myWindow = window.open(`${this.environment.apiUrl}/${apiUrl.facebookSignIn}`, "_system", "width=400,height=400,toolbar=yes,scrollbars=yes,resizable=yes");
// console.log("====my window", myWindow);
let timer = setInterval(() => {
if (myWindow.closed) {
clearInterval(timer);
let token = localStorage.getItem("authtoken");
if (token) {
this.router.navigate([routePath.dashboard]);
}
}
}, 1000);
}
googleSignIn() {
var myWindow = window.open(`${this.environment.apiUrl}/${apiUrl.googleSignIn}`, "_system", "width=400,height=400,toolbar=yes,scrollbars=yes,resizable=yes");
// console.log("====my window", myWindow);
let timer = setInterval(() => {
if (myWindow.closed) {
clearInterval(timer);
let token = localStorage.getItem("authtoken");
if (token) {
this.router.navigate([routePath.dashboard]);
}
}
}, 1000);
}
async logOut() {
localStorage.setItem('authtoken', '');
localStorage.setItem('refreshtoken', '');
localStorage.setItem('emailId', '');
localStorage.setItem('module', '');
await localStorage.removeItem('authtoken');
localStorage.removeItem('refreshtoken');
localStorage.removeItem('emailId');
localStorage.removeItem('module');
localStorage.removeItem('passwordVersion');
this.currentUserSubject.next(null);
// await this.router.navigate([routePath.login]);
// location.reload();
// this.navCntrl.navigateBack('/Login');
let institute = localStorage.getItem("institute");
this.router.navigate([routePath.login]);
}
async getUserImage(imageName: string): Promise<any> {
return this.http.get(`${this.environment.apiUrl}/${apiUrl.userImageUpload}/${imageName}`, { responseType: 'blob' }).toPromise();
}
async changePassword(body, id?): Promise<any> {
return await this.http.patch<any>(`${this.environment.apiUrl}/${"user/change-password"}`, body).toPromise();
}
async patchToken(): Promise<any> {
console.log(this.firebaseToken, 'firebase token');
return await this.http.patch<any>(`${this.environment.apiUrl}/${"user/firebase"}`, { token: this.firebaseToken }).toPromise();
}
// async validatePassword(authCredentials:AuthenticationDto)
// {
// console.log("===validatePassword authCredentials====",authCredentials);
// return this.http.get(`${this.environment.apiUrl}/${apiUrl.validatePassword}/${authCredentials}`).toPromise();
// }
async sendOtp(email,FR): Promise<any> {
console.log("==",email)
return await this.http.post<any>(`${this.environment.apiUrl}/${"auth/otp"}/${FR}`,email).toPromise();
}
async verifyOtp(body,FR): Promise<any> {
return await this.http.post<any>(`${this.environment.apiUrl}/${"auth/verifyOtp"}/${FR}`,body).toPromise();
}
async forgotPassword(body): Promise<any> {
return await this.http.post<any>(`${this.environment.apiUrl}/${"auth/forgot-password"}`,body).toPromise();
}
}

@ -0,0 +1,56 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { ProvidersService } from '../providers.service';
/**************************
Created by Ajith A Pradeep
Created on 21/03/2022
**************************/
@Injectable({
providedIn: 'root'
})
export class ErrorTranslateService {
helpPrimaryData: any = {};
helpSecondaryData: any = {};
environment: any;
primaryLangauge: any="en";
constructor(
private httpClient: HttpClient,
private conn: ProvidersService
) {
this.environment = this.conn.environment;
this.init();
}
async init() {
await this.getPrimarySecondryLangauge();
}
async getPrimarySecondryLangauge(): Promise<void> {
this.helpPrimaryData = await this.getErrorJsonData(this.primaryLangauge);
}
translate(code: string): string {
return this.first(code) ;
}
first(code: string): string {
switch (this.primaryLangauge) {
case "": return;
default:
return this.helpPrimaryData[code] ? (this.helpPrimaryData[code]) : code;
}
}
private async getErrorJsonData(lang: string): Promise<any> {
if (!lang || lang.trim() == "") return {};
return await this.httpClient.get(`assets/i18n/error/${lang}.json`).toPromise();
}
}

@ -0,0 +1,89 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
import { UiService } from './ui.service';
/**************************
Created by Ajith A Pradeep
Created on 04/04/2022
**************************/
@Injectable({
providedIn: 'root'
})
export class MasterService {
loading: boolean = false;
constructor(
private http: HttpClient,
private _uiService: UiService
) { }
async getMasterData(apiUrl, filter?: string): Promise<any> {
if (!filter)
filter = ''
return await this.http.get<any>(`${environment.apiUrl}/${apiUrl}${filter}`).toPromise();
}
async getMasterDatabyId(apiUrl, id): Promise<any> {
return await this.http.get<any>(`${environment.apiUrl}/${apiUrl}/${id}`).toPromise();
}
async saveMasterData(apiUrl, body): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${apiUrl}`, body).toPromise();
}
async saveAllMasterData(apiUrl, body): Promise<any[]> {
return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl}`, body).toPromise();
}
async postMasterData(apiUrl, body, id): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${apiUrl}/${id}`, body).toPromise();
}
async updateMasterData(apiUrl, body, id): Promise<any> {
return await this.http.put<any>(`${environment.apiUrl}/${apiUrl}/${id}`, body).toPromise();
}
async deleteMasterData(apiUrl, id): Promise<any[]> {
return await this.http.delete<any>(`${environment.apiUrl}/${apiUrl}/${id}`).toPromise();
}
async saveImage(apiUrl, body): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${apiUrl}`, body).toPromise();
}
async getImg(apiUrlEnd: string, imagePath: string) {
return await this.http.get(`${environment.apiUrl}/${apiUrlEnd}/${imagePath}`, { responseType: 'blob' }).toPromise();
}
async getJsonData(name: string): Promise<any> {
if (!name || name.trim() == "") return {};
return await this.http.get(`assets/i18n/json/${name}.json`).toPromise();
}
async getLovDataFormat(endUrl, filterCondition?) {
let data = []
this.loading = true;
let filter = ''
if (filterCondition) {
filter = filterCondition
}
await this.getMasterData(endUrl, filter).then((res: any[]) => {
data = res;
this.loading = false;
},
err => {
this.loading = false;
console.log("----err----", err);
this._uiService.toastMessage(err.error.message, 5000, true);
});
return data;
}
}

@ -0,0 +1,35 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
/**************************
Created by Ajith A Pradeep
Created on 02/04/2022
**************************/
@Injectable({
providedIn: 'root'
})
export class MenuService {
menuData: any;
favouriteMenuData: any;
public isShowSidebar: boolean;
constructor(
private httpClient: HttpClient
) { }
async getJsonData(name: string): Promise<any> {
if (!name || name.trim() == "") return {};
return await this.httpClient.get(`assets/i18n/json/${name}.json`).toPromise();
}
async getMenuData(apiUrl, filter?): Promise<any> {
if (!filter)
filter = ''
return await this.httpClient.get(`${environment.apiUrl}/${apiUrl}${filter}`).toPromise();
}
}

@ -0,0 +1,43 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { IgissueDetailDto } from 'src/app/_dto/igissue-detail.dto';
import { IgissueSummaryDto } from 'src/app/_dto/igissue-summary.dto';
import { environment } from 'src/environments/environment';
import { apiUrl } from '../_resources/api-url.properties';
@Injectable({
providedIn: 'root'
})
export class SupportService {
constructor(private http: HttpClient,
) { }
async getMasterData(apiEndUrl: string, filter?: string): Promise<IgissueSummaryDto[]> {
return await this.http.get<IgissueSummaryDto[]>(`${environment.apiUrl}/${apiEndUrl}`).toPromise();
}
async save(body: any): Promise<IgissueSummaryDto> {
return await this.http.post<IgissueSummaryDto>(`${environment.apiUrl}/${apiUrl.issueTracker}`, body).toPromise();
}
async getDetailMasterData(apiEndUrl: string, filter?: string): Promise<IgissueDetailDto[]> {
return await this.http.get<IgissueDetailDto[]>(`${environment.apiUrl}/${apiEndUrl}/${filter}`).toPromise();
}
async updateMasterData(apiEndurl: string, body: any): Promise<IgissueSummaryDto> {
return await this.http.post<IgissueSummaryDto>(`${environment.apiUrl}/${apiEndurl}`, body).toPromise();
}
async updateDetailData(apiEndUrl: string, body): Promise<IgissueDetailDto> {
return await this.http.post<IgissueDetailDto>(`${environment.apiUrl}/${apiEndUrl}`, body).toPromise();
}
async getImg(apiUrlEnd: string, imagePath: string) {
return await this.http.get(`${environment.apiUrl}/${apiUrlEnd}/${imagePath}`, { responseType: 'blob' }).toPromise();
}
}

@ -0,0 +1,84 @@
import { DatePipe } from '@angular/common';
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
import { apiUrl } from '../_resources/api-url.properties';
/**************************
Created by Ajith A Pradeep
Created on 07/05/2022
**************************/
@Injectable({
providedIn: 'root'
})
export class TransactionService {
constructor(
private http: HttpClient,
private _datePipe:DatePipe
) { }
dateFormatting(dateValue) {
let inputDate = new Date(dateValue)
let today = new Date()
let formattedDate
if (inputDate < today && this._datePipe.transform(inputDate, 'dd/MM/yyyy') != this._datePipe.transform(today, 'dd/MM/yyyy')) {
formattedDate = this._datePipe.transform(new Date(inputDate), 'yyyy/MM/dd') + " 23:59:59"
}
else if (inputDate > today && this._datePipe.transform(inputDate, 'dd/MM/yyyy') != this._datePipe.transform(today, 'dd/MM/yyyy')) {
formattedDate = this._datePipe.transform(new Date(inputDate), 'yyyy/MM/dd') + " 00:00:01"
}
else {
formattedDate = this._datePipe.transform(new Date(), 'yyyy/MM/dd HH:mm:ss')
}
return formattedDate
}
async getTransactionData(apiUrl, filter?: string): Promise<any> {
if (!filter)
filter = ''
return await this.http.get<any>(`${environment.apiUrl}/${apiUrl}${filter}`).toPromise();
}
async getTransactionDatabyId(apiUrl, id): Promise<any> {
return await this.http.get<any>(`${environment.apiUrl}/${apiUrl}/${id}`).toPromise();
}
async saveTransactionData(apiUrl, body): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${apiUrl}`, body).toPromise();
}
async updateTransactionData(apiUrl, body, id): Promise<any> {
return await this.http.put<any>(`${environment.apiUrl}/${apiUrl}/${id}`, body).toPromise();
}
async deleteTransactionData(apiUrl, id): Promise<any[]> {
return await this.http.delete<any>(`${environment.apiUrl}/${apiUrl}/${id}`).toPromise();
}
async encryptedCode(code): Promise<any> {
return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl.cryptoEncrypt}`, { data: code }).toPromise();
}
async decryptedCode(code): Promise<any> {
return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl.cryptoDecrypt}`, { data: code }).toPromise();
}
async sendOtp(email, FR): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${"sms-api/otp"}/${FR}`, email).toPromise();
}
async verifyOtp(body, FR): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${"sms-api/verifyOtp"}/${FR}`, body).toPromise();
}
async saveMultipleData(apiUrl, body): Promise<any[]> {
return await this.http.post<any[]>(`${environment.apiUrl}/${apiUrl}`, body).toPromise();
}
}

@ -0,0 +1,150 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { MatSnackBar } from '@angular/material/snack-bar';
import { environment } from 'src/environments/environment';
import { apiUrl } from '../_resources/api-url.properties';
import { ToWords } from 'to-words';
import { AuthService } from './auth.service';
import { ErrorTranslateService } from './error-translate.service';
/**************************
Created by Ajith A Pradeep
Created on 21/03/2022
**************************/
@Injectable({
providedIn: 'root'
})
export class UiService {
isCapitalized: boolean = true;
toWords = new ToWords({
localeCode: 'en-IN',
converterOptions: {
currency: true,
ignoreDecimal: false,
ignoreZeroCurrency: false,
doNotAddOnly: false,
}
});
numberToWords = new ToWords();
constructor(
public _snackBar: MatSnackBar,
private http: HttpClient,
private authService: AuthService,
private _errorTranslateService: ErrorTranslateService
) {
}
parseDate(dateString: string): Date {
if (dateString) {
return new Date(dateString);
}
return null;
}
toastMessage(message: string, timeDuration?: number, error?: boolean, green?: boolean, button?: string) {
let defaultButton = "Close";
let defaultTime = 3000;
if (button && button != null)
defaultButton = button;
if (timeDuration && timeDuration != null)
defaultTime = timeDuration
if (error)
this._snackBar.open(message, defaultButton, { duration: defaultTime, panelClass: ['mat-toolbar', 'mat-warn'] });
else
this._snackBar.open(message, defaultButton, { duration: defaultTime });
if (error && green)
this._snackBar.open(message, defaultButton, { duration: defaultTime });
if (green)
this._snackBar.open(message, defaultButton, { duration: defaultTime, panelClass: ['custom-green-snackbar'] });
else
this._snackBar.open(message, defaultButton, { duration: defaultTime });
}
openSnackBar(message: string, action: string) {
this._snackBar.open(message, action);
}
admissionNoValidation(number) {
let regex = new RegExp(/^\d{4}$/i)
return regex.test(number)
}
phoneNoValidation(number) {
let regex = new RegExp(/^(?:(?:\+|0{0,2})91(\s*[\-]\s*)?|[0]?)?[6789]\d{9}$/);
return regex.test(number)
}
emailValidation(email) {
let regex = new RegExp(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/);
return regex.test(email)
}
alphabetsOnlyValidation(stringValue) {
let regex = new RegExp(/^[a-zA-Z ]*$/);
return regex.test(stringValue);
}
async getUserInfo(body): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${apiUrl.userInfo}`, body).toPromise();
}
getInstitution() {
let institution = {
name: '',
logo: '',
fullName: ''
}
institution.name = localStorage.getItem('institute');
if (institution.name) {
switch (institution.name) {
case 'salesapp':
institution.logo = "./../../../../../assets/accurate/images/salesapp.jpg";
break;
case 'dav':
institution.logo = "./../../../../../assets/accurate/images/dav.png";
break;
default:
institution.logo = './../../../../../assets/accurate/images/institute.png';
break;
}
} else {
institution.logo = './../../../../../assets/accurate/images/institute.png';
}
return institution;
}
async userValidation() {
// await this.getUserInfo().then((res) => {
// }, (err) => {
// console.log("err==", err);
// this.toastMessage((err.error.message) ? err.error.message : this._errorTranslateService.translate('errorInApi'));
// });
}
async capitalizeInputs() {
if (this.isCapitalized) {
let inputs = document.querySelectorAll(".capitalise");
inputs.forEach(item => {
item.addEventListener("input", this.capitalize, true);
});
}
}
capitalize(e) {
e.target.value = e.target.value.toUpperCase();
}
}

@ -0,0 +1,26 @@
import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { environment } from 'src/environments/environment';
/**************************
Created by Abhijith
Created on 06/05/2022
**************************/
@Injectable({
providedIn: 'root'
})
export class ValidationService {
constructor(
private http: HttpClient
) { }
async validateFormNo(apiUrl, formNo): Promise<any> {
return await this.http.post<any>(`${environment.apiUrl}/${apiUrl}`, { formNo: formNo }).toPromise();
}
}

@ -0,0 +1,20 @@
import { Component, OnInit } from '@angular/core';
@Component({
selector: 'lib-providers',
template: `
<p>
providers works!
</p>
`,
styles: [
]
})
export class ProvidersComponent implements OnInit {
constructor() { }
ngOnInit(): void {
}
}

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save