This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| "styles": [ | |
| "src/styles.css", | |
| "node_modules/@ctrl/ngx-emoji-mart/picker.css", | |
| "src/cometchat-pro-angular-ui-kit/CometChatWorkspace/projects/angular-chat-ui-kit/src/css/styles.scss" | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { Component, OnInit } from "@angular/core"; | |
| import { NgForm } from "@angular/forms"; | |
| import { Router } from "@angular/router"; | |
| import { CometChat } from "@cometchat-pro/chat"; | |
| import { COMETCHAT_CONSTANTS } from "../../CONSTS"; | |
| import { User } from "./user"; | |
| import { ModalService } from "../_modal"; | |
| import { AuthService } from "./auth.service"; | |
| import { GetProductDetailService } from "../product/_api/get-product-detail.service"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| navigateToConversationListScreen() { | |
| this.router.navigate(["/conversation"]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <div class="responsive"> | |
| <cometchat-conversation-list-with-messages></cometchat-conversation-list-with-messages> | |
| </div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import { NgModule } from '@angular/core'; | |
| import { CommonModule } from '@angular/common'; | |
| import { RouterModule } from "@angular/router"; | |
| import { InboxComponent } from './inbox.component'; | |
| import { CometChatConversationComponent } from './comet-chat-conversation.component'; | |
| import { CometChatConversationListWithMessages } from "@cometChatComponents/Chats/CometChat-conversation-list-with-messages/cometchat-conversation-list-with-messages.module"; | |
| import { CometChatMessages } from "@cometChatComponents/Messages/CometChat-messages/cometchat-messages.module"; | |
| import { AuthGuard } from "../account/auth.guard"; | |
| import { UserMessageComponent } from './user-message.component'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| onViewFaceMask(): void { | |
| this.router.navigate(["facemask"]); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // ... | |
| import { ProductModule } from "../product/product.module"; | |
| import { FaceMaskProductListComponent } from "../product/face-mask-product-list.component"; | |
| import { ProductDetailComponent } from "../product/product-detail.component"; | |
| const routes: Routes = [ | |
| { | |
| path: "home", | |
| component: ContentComponent, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export class GetProductDetailService { | |
| constructor() { | |
| // ... | |
| if (window.localStorage[PRODUCT_METADATA]) { | |
| // always remove so that newly added product in facemasks.json will be added into the metadata | |
| window.localStorage.removeItem(PRODUCT_METADATA); | |
| } | |
| this.initProductMetadataLocalStorage(); | |
| } | |
| private initProductMetadataLocalStorage(): void { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| putFacemaskOnSale(id: number): void { | |
| if (window.localStorage[PRODUCT_METADATA]) { | |
| let facemaskMetadata: Metadata[] = JSON.parse( | |
| window.localStorage[PRODUCT_METADATA] | |
| ); | |
| if (id < facemaskMetadata.length) { | |
| facemaskMetadata[id].isProductAdded = true; | |
| window.localStorage[PRODUCT_METADATA] = | |
| JSON.stringify(facemaskMetadata); |