Login Feature #1
@@ -10457,7 +10457,7 @@ a.text-darker:focus {
|
||||
margin: 4px 1px;
|
||||
border-radius: 0.4285rem;
|
||||
cursor: pointer;
|
||||
background: #211069;
|
||||
background: #211069 !important;
|
||||
background-image: -webkit-linear-gradient(
|
||||
to bottom left,
|
||||
#211069,
|
||||
@@ -10510,27 +10510,27 @@ a.text-darker:focus {
|
||||
background-color: #263148 !important;
|
||||
background-image: linear-gradient(
|
||||
to bottom left,
|
||||
#344675,
|
||||
#263148,
|
||||
#344675
|
||||
#211069,
|
||||
#564794,
|
||||
#211069
|
||||
) !important;
|
||||
background-image: -webkit-linear-gradient(
|
||||
to bottom left,
|
||||
#211069,
|
||||
#263148,
|
||||
#564794,
|
||||
#211069
|
||||
) !important;
|
||||
background-image: -o-linear-gradient(
|
||||
to bottom left,
|
||||
#211069,
|
||||
#263148,
|
||||
#564794,
|
||||
#211069
|
||||
) !important;
|
||||
background-image: -moz-linear-gradient(
|
||||
to bottom left,
|
||||
#344675,
|
||||
#263148,
|
||||
#344675
|
||||
#211069,
|
||||
#564794,
|
||||
#211069
|
||||
) !important;
|
||||
color: #ffffff;
|
||||
box-shadow: none;
|
||||
@@ -10643,9 +10643,9 @@ fieldset[disabled] .navbar .navbar-nav > a.btn.active {
|
||||
border-color: #344675;
|
||||
background-image: linear-gradient(
|
||||
to bottom left,
|
||||
#344675,
|
||||
#263148,
|
||||
#344675
|
||||
#211069,
|
||||
#564794,
|
||||
#211069
|
||||
) !important;
|
||||
background-image: -webkit-linear-gradient(
|
||||
to bottom left,
|
||||
|
||||
@@ -2,11 +2,15 @@ import { NgModule } from "@angular/core";
|
||||
import { CommonModule } from "@angular/common";
|
||||
import { BrowserModule } from "@angular/platform-browser";
|
||||
import { Routes, RouterModule } from "@angular/router";
|
||||
|
||||
import { LoginComponent } from "./pages/login/login.component";
|
||||
import { AdminLayoutComponent } from "./layouts/admin-layout/admin-layout.component";
|
||||
import { AuthLayoutComponent } from './layouts/auth-layout/auth-layout.component';
|
||||
|
||||
const routes: Routes = [
|
||||
{
|
||||
path: "login",
|
||||
component: LoginComponent
|
||||
},
|
||||
{
|
||||
path: "",
|
||||
redirectTo: "company-information",
|
||||
|
||||
@@ -14,6 +14,7 @@ import { NgbModule } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { AppRoutingModule } from "./app-routing.module";
|
||||
import { ComponentsModule } from "./components/components.module";
|
||||
import { LoginComponent } from './pages/login/login.component';
|
||||
// import { DatePipe } from "@angular/common";
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
||||
@@ -1,123 +1,129 @@
|
||||
<nav class=" navbar navbar-expand-lg navbar-absolute navbar-transparent">
|
||||
<div class=" container-fluid">
|
||||
<div class=" navbar-wrapper">
|
||||
<div class=" navbar-toggle d-inline">
|
||||
<button class=" navbar-toggler" type="button" (click)="sidebarToggle()">
|
||||
<span class=" navbar-toggler-bar bar1"> </span>
|
||||
<span class=" navbar-toggler-bar bar2"> </span>
|
||||
<span class=" navbar-toggler-bar bar3"> </span>
|
||||
<nav class="navbar navbar-expand-lg navbar-absolute navbar-transparent">
|
||||
<div class="container-fluid">
|
||||
<div class="navbar-wrapper">
|
||||
<div class="navbar-toggle d-inline">
|
||||
<button class="navbar-toggler" type="button" (click)="sidebarToggle()">
|
||||
<span class="navbar-toggler-bar bar1"> </span>
|
||||
<span class="navbar-toggler-bar bar2"> </span>
|
||||
<span class="navbar-toggler-bar bar3"> </span>
|
||||
</button>
|
||||
</div>
|
||||
<a class=" navbar-brand" href="javascript:void(0)"> {{ getTitle() }} </a>
|
||||
<a class="navbar-brand" href="javascript:void(0)"> {{ getTitle() }} </a>
|
||||
</div>
|
||||
<button
|
||||
aria-label="Toggle navigation"
|
||||
class=" navbar-toggler"
|
||||
class="navbar-toggler"
|
||||
(click)="collapse()"
|
||||
[attr.aria-expanded]="!isCollapsed"
|
||||
aria-controls="collapseExample"
|
||||
id="navigation"
|
||||
type="button"
|
||||
>
|
||||
<span class=" navbar-toggler-bar navbar-kebab"> </span>
|
||||
<span class=" navbar-toggler-bar navbar-kebab"> </span>
|
||||
<span class=" navbar-toggler-bar navbar-kebab"> </span>
|
||||
<span class="navbar-toggler-bar navbar-kebab"> </span>
|
||||
<span class="navbar-toggler-bar navbar-kebab"> </span>
|
||||
<span class="navbar-toggler-bar navbar-kebab"> </span>
|
||||
</button>
|
||||
<div class=" navbar-collapse" [ngbCollapse]="isCollapsed" id="navigation">
|
||||
<ul class=" navbar-nav ml-auto">
|
||||
<li class=" search-bar input-group">
|
||||
<div class="navbar-collapse" [ngbCollapse]="isCollapsed" id="navigation">
|
||||
<ul class="navbar-nav ml-auto">
|
||||
<li class="search-bar input-group">
|
||||
<button
|
||||
class=" btn btn-link"
|
||||
class="btn btn-link"
|
||||
data-target="#searchModal"
|
||||
data-toggle="modal"
|
||||
(click)="open(content)"
|
||||
id="search-button"
|
||||
>
|
||||
<i class=" tim-icons icon-zoom-split"> </i>
|
||||
<span class=" d-lg-none d-md-block"> Search </span>
|
||||
<i class="tim-icons icon-zoom-split"> </i>
|
||||
<span class="d-lg-none d-md-block"> Search </span>
|
||||
</button>
|
||||
</li>
|
||||
<li class=" nav-item" ngbDropdown>
|
||||
<li class="nav-item" ngbDropdown>
|
||||
<a
|
||||
class=" nav-link"
|
||||
class="nav-link"
|
||||
data-toggle="dropdown"
|
||||
href="javascript:void(0)"
|
||||
ngbDropdownToggle
|
||||
>
|
||||
<div class=" notification d-none d-lg-block d-xl-block"></div>
|
||||
<i class=" tim-icons icon-sound-wave"> </i>
|
||||
<p class=" d-lg-none">Notifications</p>
|
||||
<div class="notification d-none d-lg-block d-xl-block"></div>
|
||||
<i class="bi bi-bell"></i>
|
||||
<p class="d-lg-none">Notifications</p>
|
||||
</a>
|
||||
<ul class=" dropdown-menu-right dropdown-navbar" ngbDropdownMenu>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<ul class="dropdown-menu-right dropdown-navbar" ngbDropdownMenu>
|
||||
<li class="nav-link">
|
||||
<a class="nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
Mike John responded to your email
|
||||
</a>
|
||||
</li>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<li class="nav-link">
|
||||
<a class="nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
You have 5 more tasks
|
||||
</a>
|
||||
</li>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<li class="nav-link">
|
||||
<a class="nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
Your friend Michael is in town
|
||||
</a>
|
||||
</li>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<li class="nav-link">
|
||||
<a class="nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
Another notification
|
||||
</a>
|
||||
</li>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<li class="nav-link">
|
||||
<a class="nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
Another one
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class=" nav-item" ngbDropdown>
|
||||
<li class="nav-item" ngbDropdown>
|
||||
<a
|
||||
class=" nav-link"
|
||||
class="nav-link"
|
||||
data-toggle="dropdown"
|
||||
href="javascript:void(0)"
|
||||
ngbDropdownToggle
|
||||
>
|
||||
<div class=" photo">
|
||||
<img alt="Profile Photo" src="assets/img/anime3.png" />
|
||||
<div class="photo">
|
||||
<!-- <img alt="Profile Photo" [src]="assets/img/anime3.png" /> -->
|
||||
<img alt="Profile Photo" [src]="company.image" />
|
||||
</div>
|
||||
<b class=" caret d-none d-lg-block d-xl-block"> </b>
|
||||
<p class=" d-lg-none">Log out</p>
|
||||
<b class="caret d-none d-lg-block d-xl-block"> </b>
|
||||
<p class="d-lg-none">Log out</p>
|
||||
</a>
|
||||
<ul class=" dropdown-navbar" ngbDropdownMenu>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<ul class="dropdown-navbar" ngbDropdownMenu>
|
||||
<li class="nav-link">
|
||||
<a class="nav-item" routerLink="/company-profile" href="javascript:void(0)" ngbDropdownItem>
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<li class="nav-link">
|
||||
<a class="nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
Settings
|
||||
</a>
|
||||
</li>
|
||||
<li class=" dropdown-divider"></li>
|
||||
<li class=" nav-link">
|
||||
<a class=" nav-item" href="javascript:void(0)" ngbDropdownItem>
|
||||
<li class="dropdown-divider"></li>
|
||||
<li class="nav-link">
|
||||
<a
|
||||
class="nav-item"
|
||||
href="javascript:void(0)"
|
||||
(click)="logout()"
|
||||
ngbDropdownItem
|
||||
>
|
||||
Log out
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li class=" separator d-lg-none"></li>
|
||||
<li class="separator d-lg-none"></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<ng-template #content let-modal>
|
||||
<div class=" modal-header">
|
||||
<div class="modal-header">
|
||||
<input
|
||||
class=" form-control"
|
||||
class="form-control"
|
||||
id="inlineFormInputGroup"
|
||||
placeholder="SEARCH"
|
||||
type="text"
|
||||
@@ -125,13 +131,12 @@
|
||||
|
||||
<button
|
||||
aria-label="Close"
|
||||
class=" close"
|
||||
class="close"
|
||||
data-dismiss="modal"
|
||||
type="button"
|
||||
(click)="modal.dismiss('Cross click')"
|
||||
>
|
||||
<i class=" tim-icons icon-simple-remove"> </i>
|
||||
<i class="tim-icons icon-simple-remove"> </i>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
</ng-template>
|
||||
|
||||
@@ -2,12 +2,14 @@ import { Component, OnInit, ElementRef, OnDestroy } from "@angular/core";
|
||||
import { ROUTES } from "../sidebar/sidebar.component";
|
||||
import { Location } from "@angular/common";
|
||||
import { Router } from "@angular/router";
|
||||
import { NgbModal, ModalDismissReasons } from '@ng-bootstrap/ng-bootstrap';
|
||||
import { NgbModal, ModalDismissReasons } from "@ng-bootstrap/ng-bootstrap";
|
||||
import { ToastrService } from "ngx-toastr";
|
||||
import { CompanyService } from "../../services/company.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-navbar",
|
||||
templateUrl: "./navbar.component.html",
|
||||
styleUrls: ["./navbar.component.css"]
|
||||
styleUrls: ["./navbar.component.css"],
|
||||
})
|
||||
export class NavbarComponent implements OnInit, OnDestroy {
|
||||
private listTitles: any[];
|
||||
@@ -19,33 +21,49 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
||||
public isCollapsed = true;
|
||||
|
||||
closeResult: string;
|
||||
company: any;
|
||||
companyLocalStorage: any;
|
||||
|
||||
constructor(
|
||||
location: Location,
|
||||
private element: ElementRef,
|
||||
private router: Router,
|
||||
private modalService: NgbModal
|
||||
private modalService: NgbModal,
|
||||
private toastr: ToastrService,
|
||||
private companyService: CompanyService
|
||||
) {
|
||||
this.location = location;
|
||||
this.sidebarVisible = false;
|
||||
|
||||
this.companyLocalStorage = JSON.parse(
|
||||
localStorage.getItem("companyData") || "{}"
|
||||
);
|
||||
|
||||
this.companyService
|
||||
.getCompanyById(this.companyLocalStorage.id)
|
||||
.subscribe((company) => {
|
||||
this.company = company;
|
||||
|
||||
console.log(this.company);
|
||||
});
|
||||
}
|
||||
// function that adds color white/transparent to the navbar on resize (this is for the collapse)
|
||||
updateColor = () => {
|
||||
var navbar = document.getElementsByClassName('navbar')[0];
|
||||
if (window.innerWidth < 993 && !this.isCollapsed) {
|
||||
navbar.classList.add('bg-white');
|
||||
navbar.classList.remove('navbar-transparent');
|
||||
} else {
|
||||
navbar.classList.remove('bg-white');
|
||||
navbar.classList.add('navbar-transparent');
|
||||
}
|
||||
};
|
||||
updateColor = () => {
|
||||
var navbar = document.getElementsByClassName("navbar")[0];
|
||||
if (window.innerWidth < 993 && !this.isCollapsed) {
|
||||
navbar.classList.add("bg-white");
|
||||
navbar.classList.remove("navbar-transparent");
|
||||
} else {
|
||||
navbar.classList.remove("bg-white");
|
||||
navbar.classList.add("navbar-transparent");
|
||||
}
|
||||
};
|
||||
ngOnInit() {
|
||||
window.addEventListener("resize", this.updateColor);
|
||||
this.listTitles = ROUTES.filter(listTitle => listTitle);
|
||||
this.listTitles = ROUTES.filter((listTitle) => listTitle);
|
||||
const navbar: HTMLElement = this.element.nativeElement;
|
||||
this.toggleButton = navbar.getElementsByClassName("navbar-toggler")[0];
|
||||
this.router.events.subscribe(event => {
|
||||
this.router.events.subscribe((event) => {
|
||||
this.sidebarClose();
|
||||
var $layer: any = document.getElementsByClassName("close-layer")[0];
|
||||
if ($layer) {
|
||||
@@ -77,7 +95,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
||||
mainPanel.style.position = "fixed";
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
toggleButton.classList.add("toggled");
|
||||
}, 500);
|
||||
|
||||
@@ -93,7 +111,7 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
||||
);
|
||||
|
||||
if (window.innerWidth < 991) {
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
mainPanel.style.position = "";
|
||||
}, 500);
|
||||
}
|
||||
@@ -118,13 +136,13 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
||||
if ($layer) {
|
||||
$layer.remove();
|
||||
}
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
$toggle.classList.remove("toggled");
|
||||
}, 400);
|
||||
|
||||
this.mobile_menu_visible = 0;
|
||||
} else {
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
$toggle.classList.add("toggled");
|
||||
}, 430);
|
||||
|
||||
@@ -139,16 +157,16 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
||||
.appendChild($layer);
|
||||
}
|
||||
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
$layer.classList.add("visible");
|
||||
}, 100);
|
||||
|
||||
$layer.onclick = function() {
|
||||
$layer.onclick = function () {
|
||||
//asign a function
|
||||
html.classList.remove("nav-open");
|
||||
this.mobile_menu_visible = 0;
|
||||
$layer.classList.remove("visible");
|
||||
setTimeout(function() {
|
||||
setTimeout(function () {
|
||||
$layer.remove();
|
||||
$toggle.classList.remove("toggled");
|
||||
}, 400);
|
||||
@@ -174,23 +192,39 @@ export class NavbarComponent implements OnInit, OnDestroy {
|
||||
}
|
||||
|
||||
open(content) {
|
||||
this.modalService.open(content, {windowClass: 'modal-search'}).result.then((result) => {
|
||||
this.closeResult = `Closed with: ${result}`;
|
||||
}, (reason) => {
|
||||
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
|
||||
});
|
||||
this.modalService
|
||||
.open(content, { windowClass: "modal-search" })
|
||||
.result.then(
|
||||
(result) => {
|
||||
this.closeResult = `Closed with: ${result}`;
|
||||
},
|
||||
(reason) => {
|
||||
this.closeResult = `Dismissed ${this.getDismissReason(reason)}`;
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
private getDismissReason(reason: any): string {
|
||||
if (reason === ModalDismissReasons.ESC) {
|
||||
return 'by pressing ESC';
|
||||
return "by pressing ESC";
|
||||
} else if (reason === ModalDismissReasons.BACKDROP_CLICK) {
|
||||
return 'by clicking on a backdrop';
|
||||
return "by clicking on a backdrop";
|
||||
} else {
|
||||
return `with: ${reason}`;
|
||||
return `with: ${reason}`;
|
||||
}
|
||||
}
|
||||
ngOnDestroy(){
|
||||
window.removeEventListener("resize", this.updateColor);
|
||||
ngOnDestroy() {
|
||||
window.removeEventListener("resize", this.updateColor);
|
||||
}
|
||||
|
||||
logout() {
|
||||
localStorage.removeItem("companyData");
|
||||
localStorage.clear();
|
||||
|
||||
this.toastr.success("Logout Successfully");
|
||||
|
||||
setTimeout(() => {
|
||||
this.router.navigate(["login"]);
|
||||
}, 1000);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,13 +6,16 @@ export const company: CompanyModel[] = [
|
||||
name: "Stark Industries",
|
||||
username: "starkindustries",
|
||||
email: "info@starkindustries.com",
|
||||
password: "password1",
|
||||
phone: "09055784625",
|
||||
image:
|
||||
"https://webtoolfeed.files.wordpress.com/2012/05/the-union-repoman.jpg",
|
||||
"https://images.pexels.com/photos/16092112/pexels-photo-16092112.jpeg?auto=compress&cs=tinysrgb&w=600&lazy=load",
|
||||
|
||||
description:
|
||||
"A multinational technology company specializing in weapons manufacturing, led by Tony Stark.",
|
||||
address: "200 Park Ave, New York, NY 10166",
|
||||
city: "New York City, NY ",
|
||||
industry: "Technology",
|
||||
stagingUrl: "stage.starkindustries.com",
|
||||
productionUrl: "starkindustries.com",
|
||||
},
|
||||
@@ -21,6 +24,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Wayne Enterprises",
|
||||
username: "wayneenterprises",
|
||||
email: "info@wayneenterprises.com",
|
||||
password: "password2",
|
||||
phone: "0812012234",
|
||||
image:
|
||||
"https://www.thesun.co.uk/wp-content/uploads/2019/07/NINTCHDBPICT000491000000.jpg?strip=all&w=960",
|
||||
@@ -28,6 +32,7 @@ export const company: CompanyModel[] = [
|
||||
"A multinational conglomerate holding company headquartered in Gotham City, led by Bruce Wayne.",
|
||||
address: "10 Wayne Tower, Gotham City, NJ 07102",
|
||||
city: "Gotham City, NJ ",
|
||||
industry: "Technology",
|
||||
stagingUrl: "stage.wayneenterprises.com",
|
||||
productionUrl: "wayneenterprises.com",
|
||||
},
|
||||
@@ -36,6 +41,7 @@ export const company: CompanyModel[] = [
|
||||
name: "LexCorp",
|
||||
username: "lexcorp",
|
||||
email: "info@lexcorp.com",
|
||||
password: "password3",
|
||||
phone: "08174361092",
|
||||
image:
|
||||
"https://www.shutterstock.com/image-vector/young-smiling-woman-mia-avatar-600w-2127358541.jpg",
|
||||
@@ -43,6 +49,7 @@ export const company: CompanyModel[] = [
|
||||
"LexCorp is a multinational conglomerate that operates in various industries, including technology, finance, and media. Founded by billionaire businessman and philanthropist Lex Luthor.",
|
||||
address: "LexCorp Tower, Metropolis, NY 10001",
|
||||
city: "Metropolis, NY",
|
||||
industry: "Advertising and marketing",
|
||||
stagingUrl: "stage.lexcorp.com",
|
||||
productionUrl: "lexcorp.com",
|
||||
},
|
||||
@@ -51,6 +58,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Sahara Security & Investigation Ltd.",
|
||||
username: "saharasecurity_ng",
|
||||
email: "info@saharasecurity.ng",
|
||||
password: "password4",
|
||||
phone: "08120122347",
|
||||
image:
|
||||
"https://www.shutterstock.com/image-vector/young-smiling-man-adam-avatar-600w-2107967969.jpg",
|
||||
@@ -58,6 +66,7 @@ export const company: CompanyModel[] = [
|
||||
"Sahara Security & Investigation is a leading provider of security and investigation services for businesses and individuals across Nigeria. With a team of highly trained professionals and state-of-the-art equipment, we are committed to protecting our clients' assets and interests.",
|
||||
address: "5, Bode Thomas Street, Surulere, Lagos State",
|
||||
city: "Lagos, Nigeria",
|
||||
industry: "Security",
|
||||
stagingUrl: "stage.saharasecurity.com",
|
||||
productionUrl: "saharasecurity.ng",
|
||||
},
|
||||
@@ -66,6 +75,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Umbrella Corporation",
|
||||
username: "umbrellacorporation",
|
||||
email: "info@umbrellacorp.com",
|
||||
password: "password5",
|
||||
phone: "07073214806",
|
||||
image:
|
||||
"https://www.shutterstock.com/image-vector/young-smiling-man-adam-avatar-600w-2107967969.jpg",
|
||||
@@ -73,6 +83,7 @@ export const company: CompanyModel[] = [
|
||||
"Umbrella Corporation is a pharmaceutical company that specializes in bioweapons and bioengineering.",
|
||||
address: "Umbrella Corporation, Raccoon City, NY 10001",
|
||||
city: "Raccoon City, NY",
|
||||
industry: "Pharmaceuticals",
|
||||
stagingUrl: "stage.umbrellacorp.com",
|
||||
productionUrl: "umbrellacorp.com",
|
||||
},
|
||||
@@ -81,6 +92,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Aperture Science",
|
||||
username: "aperturescience",
|
||||
email: "aperturescience@info.com",
|
||||
password: "password6",
|
||||
phone: "08033567890",
|
||||
image:
|
||||
"https://www.shutterstock.com/image-vector/young-smiling-man-adam-avatar-600w-2107967969.jpg",
|
||||
@@ -88,6 +100,7 @@ export const company: CompanyModel[] = [
|
||||
"Aperture Science is a science and technology company that specializes in the development of advanced research facilities and the manufacturing of consumer products.",
|
||||
address: "Aperture Science, New York City, NY 10001",
|
||||
city: "New York City, NY",
|
||||
industry: "Technology",
|
||||
stagingUrl: "stage.aperturescience.com",
|
||||
productionUrl: "aperturescience.com",
|
||||
},
|
||||
@@ -96,6 +109,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Stellar Airways Nigeria Ltd.",
|
||||
username: "stellarairways_ng",
|
||||
email: "info@stellarairways.ng",
|
||||
password: "password7",
|
||||
phone: "07084849673",
|
||||
image:
|
||||
"https://www.shutterstock.com/image-vector/young-smiling-woman-mia-avatar-600w-2127358541.jpg",
|
||||
@@ -103,6 +117,7 @@ export const company: CompanyModel[] = [
|
||||
"Stellar Airways Nigeria is a premier airline that provides domestic and international travel services to individuals and businesses across Nigeria. With a focus on safety, comfort, and convenience, we are dedicated to providing exceptional travel experiences to our customers.",
|
||||
address: "Murtala Muhammed International Airport, Ikeja, Lagos State",
|
||||
city: "Lagos, Nigeria",
|
||||
industry: "Airlines",
|
||||
stagingUrl: "stage.stellarairways.com",
|
||||
productionUrl: "stellarairways.ng",
|
||||
},
|
||||
@@ -111,6 +126,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Deltacore Technologies Ltd.",
|
||||
username: "deltacore_ng",
|
||||
email: "info@deltacore.ng",
|
||||
password: "password8",
|
||||
phone: "09022345109",
|
||||
image:
|
||||
"https://www.shutterstock.com/image-vector/young-smiling-woman-mia-avatar-600w-2127358541.jpg",
|
||||
@@ -118,6 +134,7 @@ export const company: CompanyModel[] = [
|
||||
"Deltacore Technologies is a leading provider of software and hardware solutions for businesses and individuals across Nigeria. With a focus on innovation and quality, we provide cutting-edge technology products and services to help our clients stay ahead of the competition.",
|
||||
address: "23, Adeyemo Alakija Street, Victoria Island, Lagos State",
|
||||
city: "Lagos, Nigeria",
|
||||
industry: "Technology",
|
||||
stagingUrl: "stage.deltacore.com",
|
||||
productionUrl: "deltacore.ng",
|
||||
},
|
||||
@@ -126,6 +143,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Goldmine Oil & Gas Ltd.",
|
||||
username: "goldmineoilgas_ng",
|
||||
email: "info@goldmineoilgas.ng",
|
||||
password: "password9",
|
||||
phone: "0911250021",
|
||||
image:
|
||||
"https://www.shutterstock.com/image-vector/young-smiling-man-adam-avatar-600w-2107967969.jpg",
|
||||
@@ -133,6 +151,7 @@ export const company: CompanyModel[] = [
|
||||
"Goldmine Oil & Gas is a leading exploration and production company that operates in the Nigerian oil and gas industry. With a focus on sustainability and innovation, we are committed to maximizing the potential of Nigeria's natural resources while minimizing our environmental impact.",
|
||||
address: "14, Marina Road, Warri South, Delta State",
|
||||
city: "Warri, Nigeria",
|
||||
industry: "Oil & Gas",
|
||||
stagingUrl: "stage.goldmineoilgas.com",
|
||||
productionUrl: "goldmineoilgas.ng",
|
||||
},
|
||||
@@ -141,6 +160,7 @@ export const company: CompanyModel[] = [
|
||||
name: "Cedarwood Construction & Engineering Ltd.",
|
||||
username: "cedarwoodconstruction_ng",
|
||||
email: "info@cedarwoodconstruction.ng",
|
||||
password: "password10",
|
||||
phone: "0911250021",
|
||||
image:
|
||||
"https://thumbs.dreamstime.com/b/male-avatar-icon-flat-style-male-user-icon-cartoon-man-avatar-hipster-vector-stock-91462914.jpg",
|
||||
@@ -148,6 +168,7 @@ export const company: CompanyModel[] = [
|
||||
"Cedarwood Construction & Engineering is a leading construction company that provides innovative solutions for residential, commercial, and industrial projects across Nigeria. With a team of skilled professionals and state-of-the-art equipment, we are committed to delivering high-quality projects on time and within budget.",
|
||||
address: "9, Adeniyi Jones Avenue, Ikeja, Lagos State",
|
||||
city: "Lagos, Nigeria",
|
||||
industry: "Construction",
|
||||
stagingUrl: "stage.cedarwoodconstruction.com",
|
||||
productionUrl: "cedarwoodconstruction.ng",
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@ import { CompanyInformationComponent } from "../../pages/company-information/com
|
||||
import { CompanyProfileComponent } from "../../pages/company-profile/company-profile.component";
|
||||
import { InvoicesComponent } from "../../pages/invoices/invoices.component";
|
||||
import { PaymentsComponent } from "../../pages/payments/payments.component";
|
||||
import { LoginComponent } from "src/app/pages/login/login.component";
|
||||
// import { LoginComponent } from "src/app/pages/login/login.component";
|
||||
|
||||
import { NotificationsComponent } from "../../pages/notifications/notifications.component";
|
||||
|
||||
@@ -16,5 +16,5 @@ export const AdminLayoutRoutes: Routes = [
|
||||
{ path: "invoices", component: InvoicesComponent },
|
||||
{ path: "payments", component: PaymentsComponent },
|
||||
{ path: "notifications", component: NotificationsComponent },
|
||||
{ path: "login", component: LoginComponent}
|
||||
// { path: "login", component: LoginComponent}
|
||||
];
|
||||
|
||||
@@ -3,11 +3,13 @@ export interface CompanyModel {
|
||||
name: string;
|
||||
username: string;
|
||||
email: string;
|
||||
password: string;
|
||||
phone: string;
|
||||
image: string;
|
||||
description: string;
|
||||
address: string;
|
||||
city: string;
|
||||
industry: string;
|
||||
stagingUrl: string;
|
||||
productionUrl: string;
|
||||
}
|
||||
|
||||
@@ -27,30 +27,35 @@ export class CompanyInformationComponent implements OnInit {
|
||||
private databaseInfoService: DatabaseInfoService,
|
||||
private serverInfoService: ServerInfoService
|
||||
) {
|
||||
this.companyService.getCompanyById(1).subscribe((company) => {
|
||||
this.company = company;
|
||||
console.log("Company: ", this.company);
|
||||
});
|
||||
this.companyLocalStorage = JSON.parse(
|
||||
localStorage.getItem("companyData") || "{}"
|
||||
);
|
||||
|
||||
this.hostingInfoService.getHostingInfoById(2).subscribe((hostingInfo) => {
|
||||
this.hostingInfo = hostingInfo;
|
||||
console.log("Hosting Info: ", this.hostingInfo);
|
||||
|
||||
this.timeDiff = this.calculateTimeDiff(this.hostingInfo.expirationDate);
|
||||
console.log("Time Diff: ", this.timeDiff);
|
||||
});
|
||||
|
||||
this.databaseInfoService
|
||||
.getDatabaseInfoById(1)
|
||||
.subscribe((databaseInfo) => {
|
||||
this.databaseInfo = databaseInfo;
|
||||
console.log("Database Info: ", this.databaseInfo);
|
||||
this.companyService
|
||||
.getCompanyById(this.companyLocalStorage.id)
|
||||
.subscribe((company) => {
|
||||
this.company = company;
|
||||
});
|
||||
|
||||
this.serverInfoService.getServerInfoById(1).subscribe((serverInfo) => {
|
||||
this.serverInfo = serverInfo;
|
||||
console.log("Server Info: ", this.serverInfo);
|
||||
});
|
||||
this.hostingInfoService
|
||||
.getHostingInfoById(this.companyLocalStorage.id)
|
||||
.subscribe((hostingInfo) => {
|
||||
this.hostingInfo = hostingInfo;
|
||||
|
||||
this.timeDiff = this.calculateTimeDiff(this.hostingInfo.expirationDate);
|
||||
});
|
||||
|
||||
this.databaseInfoService
|
||||
.getDatabaseInfoById(this.companyLocalStorage.id)
|
||||
.subscribe((databaseInfo) => {
|
||||
this.databaseInfo = databaseInfo;
|
||||
});
|
||||
|
||||
this.serverInfoService
|
||||
.getServerInfoById(this.companyLocalStorage.id)
|
||||
.subscribe((serverInfo) => {
|
||||
this.serverInfo = serverInfo;
|
||||
});
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
<input
|
||||
type="file"
|
||||
name="companyLogo"
|
||||
|
||||
style="display: none"
|
||||
id="avatar-image"
|
||||
accept="image/*"
|
||||
@@ -394,9 +393,7 @@
|
||||
</div>
|
||||
|
||||
<div class="updateSaveBtn">
|
||||
<button class="btn btn-fill btn-save" type="submit">
|
||||
Save
|
||||
</button>
|
||||
<button class="btn btn-fill btn-save" type="submit">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
@@ -412,24 +409,22 @@
|
||||
<div class="block block-three"></div>
|
||||
<div class="block block-four"></div>
|
||||
<a href="javascript:void(0)">
|
||||
<img alt="..." class="avatar" src="assets/img/emilyz.jpg" />
|
||||
<img alt="..." class="avatar" [src]="company.image" />
|
||||
|
||||
<h5 class="title">Mike Andrew</h5>
|
||||
<h5 class="title">{{ company.name }}</h5>
|
||||
</a>
|
||||
<p class="description">Ceo/Co-Founder</p>
|
||||
<p class="description">{{ company.industry }}</p>
|
||||
</div>
|
||||
<div class="card-description">
|
||||
Do not be scared of the truth because we need to restart the human
|
||||
foundation in truth And I love you like Kanye loves Kanye I love
|
||||
Rick Owens’ bed design but the back is...
|
||||
{{ company.description }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<div class="button-container">
|
||||
<button class="btn btn-icon btn-round btn-facebook" href="#">
|
||||
<button class="btn btn-icon btn-round btn-facebook mr-2" href="#">
|
||||
<i class="bi bi-facebook"> </i>
|
||||
</button>
|
||||
<button class="btn btn-icon btn-round btn-twitter" href="#">
|
||||
<button class="btn btn-icon btn-round btn-twitter mr-2" href="#">
|
||||
<i class="bi bi-twitter"> </i>
|
||||
</button>
|
||||
<button class="btn btn-icon btn-round btn-linkedin" href="#">
|
||||
|
||||
@@ -17,6 +17,7 @@ export class CompanyProfileComponent implements OnInit {
|
||||
imgFormatError: boolean = false;
|
||||
fileSizeError: boolean = false;
|
||||
company: any;
|
||||
companyLocalStorage: any;
|
||||
|
||||
private emailPattern =
|
||||
"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\\])";
|
||||
@@ -47,9 +48,12 @@ export class CompanyProfileComponent implements OnInit {
|
||||
companyLogo: ["", Validators.required],
|
||||
});
|
||||
|
||||
this.companyService.getCompanyById(1).subscribe((company) => {
|
||||
this.companyLocalStorage = JSON.parse(
|
||||
localStorage.getItem("companyData") || "{}"
|
||||
);
|
||||
|
||||
this.companyService.getCompanyById(this.companyLocalStorage.id).subscribe((company) => {
|
||||
this.company = company;
|
||||
console.log(this.company);
|
||||
});
|
||||
}
|
||||
|
||||
@@ -80,8 +84,6 @@ export class CompanyProfileComponent implements OnInit {
|
||||
this.imgFile = <File>event.target.files[0];
|
||||
this.fileName = this.imgFile.name;
|
||||
|
||||
console.log(this.imgFile);
|
||||
|
||||
if (this.checkFileType(this.imgFile)) {
|
||||
let reader = new FileReader();
|
||||
reader.readAsDataURL(event.target.files[0]);
|
||||
|
||||
@@ -10,10 +10,15 @@ import { InvoiceService } from "../../services/invoice.service";
|
||||
export class InvoicesComponent implements OnInit {
|
||||
invoices: InvoiceModel[];
|
||||
options: any;
|
||||
companyLocalStorage: any;
|
||||
|
||||
constructor(private invoiceService: InvoiceService) {
|
||||
this.companyLocalStorage = JSON.parse(
|
||||
localStorage.getItem("companyData") || "{}"
|
||||
);
|
||||
|
||||
this.invoiceService
|
||||
.getInvoiceById(1)
|
||||
.getInvoiceById(this.companyLocalStorage.id)
|
||||
.subscribe((invoice: InvoiceModel[]) => {
|
||||
this.invoices = invoice;
|
||||
|
||||
|
||||
@@ -1,15 +1,33 @@
|
||||
<div class="content ml-2 signinContainer overflow-hidden">
|
||||
<div class="logo">
|
||||
<img
|
||||
src="../../../assets/img/logo.png"
|
||||
src="../../../assets/img/logo-white.png"
|
||||
class="img-fluid"
|
||||
height="150"
|
||||
width="150"
|
||||
alt="logo"
|
||||
style="width: 200px; height: 200px"
|
||||
style="width: 200px; height: 200px; border-radius: 50%"
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div style="text-align: center; margin-bottom: 3rem;">
|
||||
<h1>
|
||||
TALENTTIC TECH HUB CRM
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<ng-container *ngIf="loginSuccess">
|
||||
<div class="alert alert-success" role="alert">
|
||||
<i class="bi bi-check-circle mr-1"></i>
|
||||
<span>Logged in successfully</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<ng-container *ngIf="loginError">
|
||||
<div class="alert alert-danger" role="alert">
|
||||
<i class="bi bi-exclamation-circle mr-1"></i>
|
||||
<span>Invalid email or password</span>
|
||||
</div>
|
||||
</ng-container>
|
||||
|
||||
<section class="forms">
|
||||
<form (ngSubmit)="signin()" [formGroup]="loginForm" novalidate>
|
||||
<div class="forms__inputBox">
|
||||
@@ -17,7 +35,8 @@
|
||||
type="email"
|
||||
formControlName="companyEmail"
|
||||
id="companyEmail"
|
||||
autocomplete="off"
|
||||
data-cy="signin-email"
|
||||
autocomplete="new-email"
|
||||
required
|
||||
/>
|
||||
<label for="companyEmail">Email</label>
|
||||
@@ -50,7 +69,7 @@
|
||||
formControlName="password"
|
||||
id="password"
|
||||
data-cy="signin-password"
|
||||
autocomplete="off"
|
||||
autocomplete="new-password"
|
||||
required
|
||||
/>
|
||||
<i
|
||||
|
||||
@@ -1,4 +1,12 @@
|
||||
.signinContainer {
|
||||
height: 100vh;
|
||||
padding: 3rem;
|
||||
|
||||
.logo {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 1.5rem;
|
||||
}
|
||||
.forms {
|
||||
// Sign in form
|
||||
form {
|
||||
@@ -69,7 +77,9 @@
|
||||
|
||||
// Forgot password
|
||||
.forgotPassw {
|
||||
margin-top: 0.6rem;
|
||||
margin-top: 0.3rem;
|
||||
margin-bottom: 1.6rem;
|
||||
|
||||
p {
|
||||
margin-top: 5px !important;
|
||||
margin-bottom: 0 !important;
|
||||
@@ -129,6 +139,13 @@
|
||||
font-weight: 600;
|
||||
cursor: pointer;
|
||||
font-size: 1.07rem;
|
||||
|
||||
&:hover,
|
||||
&:focus {
|
||||
background-color: white;
|
||||
color: #211069;
|
||||
border: 2px solid #211069;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { FormGroup, FormBuilder, Validators } from "@angular/forms";
|
||||
import { ActivatedRoute, Router } from "@angular/router";
|
||||
import { CompanyService } from "../../services/company.service";
|
||||
|
||||
@Component({
|
||||
selector: "app-login",
|
||||
@@ -10,40 +11,79 @@ import { ActivatedRoute, Router } from "@angular/router";
|
||||
export class LoginComponent implements OnInit {
|
||||
private emailPattern =
|
||||
"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\\])";
|
||||
loginForm: FormGroup;
|
||||
hide: boolean = true;
|
||||
loginForm: FormGroup;
|
||||
hide: boolean = true;
|
||||
company: any;
|
||||
loginSuccess: boolean = false;
|
||||
loginError: boolean = false;
|
||||
companyLocalStorage: any;
|
||||
|
||||
constructor(private fb: FormBuilder) {
|
||||
constructor(
|
||||
private fb: FormBuilder,
|
||||
private companyService: CompanyService,
|
||||
private router: Router,
|
||||
private route: ActivatedRoute
|
||||
) {
|
||||
this.loginForm = this.fb.group({
|
||||
companyEmail: ["", [Validators.required, Validators.pattern(this.emailPattern)]],
|
||||
companyEmail: [
|
||||
"",
|
||||
[Validators.required, Validators.pattern(this.emailPattern)],
|
||||
],
|
||||
password: ["", [Validators.required, Validators.minLength(6)]],
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
|
||||
this.companyService
|
||||
.getCompanyById(1)
|
||||
.subscribe((company) => {
|
||||
this.company = company;
|
||||
});
|
||||
}
|
||||
|
||||
get formControls() {
|
||||
return this.loginForm.controls;
|
||||
}
|
||||
|
||||
ngOnInit(): void {}
|
||||
ngOnInit(): void {
|
||||
this.loginForm.patchValue({
|
||||
companyEmail: this.company.email,
|
||||
password: this.company.password,
|
||||
});
|
||||
}
|
||||
|
||||
signin() {
|
||||
const email = this.loginForm.get('email')?.value;
|
||||
const password = this.loginForm.get('password')?.value;
|
||||
const email = this.company.email;
|
||||
const password = this.company.password;
|
||||
|
||||
if (this.loginForm.invalid) {
|
||||
console.log('Form error');
|
||||
console.log("Form error");
|
||||
return;
|
||||
}
|
||||
|
||||
this.loginForm.reset();
|
||||
// this.userService.signinUser(email, password);
|
||||
if (
|
||||
this.loginForm.value.companyEmail !== email ||
|
||||
this.loginForm.value.password !== password
|
||||
) {
|
||||
console.log("Invalid email or password");
|
||||
this.loginError = true;
|
||||
return;
|
||||
}
|
||||
|
||||
// this.userService.signinMessage$.subscribe((msg) => {
|
||||
// console.log('message', msg);
|
||||
// this.signinMessage = msg;
|
||||
// setTimeout(() => {
|
||||
// this.signinMessage = msg;
|
||||
// }, 1000);
|
||||
// });
|
||||
this.loginSuccess = true;
|
||||
|
||||
localStorage.setItem("companyData", JSON.stringify(this.company));
|
||||
|
||||
this.companyLocalStorage = JSON.parse(
|
||||
localStorage.getItem("companyData") || "{}"
|
||||
);
|
||||
|
||||
if (this.companyLocalStorage) {
|
||||
setTimeout(() => {
|
||||
this.router.navigate(["/company-information"]);
|
||||
}, 1000);
|
||||
}
|
||||
|
||||
this.loginForm.reset();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -10,10 +10,15 @@ import { PaymentService } from "../../services/payment.service";
|
||||
export class PaymentsComponent implements OnInit {
|
||||
payments: PaymentModel[];
|
||||
options: any;
|
||||
companyLocalStorage: any;
|
||||
|
||||
constructor(private paymentService: PaymentService) {
|
||||
this.companyLocalStorage = JSON.parse(
|
||||
localStorage.getItem("companyData") || "{}"
|
||||
);
|
||||
|
||||
this.paymentService
|
||||
.getPaymentById(1)
|
||||
.getPaymentById(this.companyLocalStorage.id)
|
||||
.subscribe((payment: PaymentModel[]) => {
|
||||
this.payments = payment;
|
||||
|
||||
|
||||
BIN
src/assets/img/logo-white.png
Normal file
BIN
src/assets/img/logo-white.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 85 KiB |
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user