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
| @Pipe({ | |
| name: 'ticketDetails', | |
| }) | |
| export class TicketDetailsPipe implements PipeTransform { | |
| transform(ticket: Ticket): TicketVm { | |
| return { | |
| ...ticket, | |
| statusClass: resolveStatusClass(ticket.status), | |
| typeIcon: resolveTypeIcon(ticket.type), | |
| typeClass: resolveTypeClass(ticket.type), |
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
| @Pipe({ | |
| name: 'ticketDetails', | |
| }) | |
| export class TicketDetailsPipe implements PipeTransform { | |
| transform(ticket: Ticket): TicketVm { | |
| return { | |
| ...ticket, | |
| statusClass: resolveStatusClass(ticket.status), | |
| updatedDateLabel: resolveNumOfDays(ticket.lastUpdated), | |
| }; |
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
| @Pipe({ | |
| name: 'ticketDetails', | |
| }) | |
| export class TicketDetailsPipe implements PipeTransform { | |
| transform(ticket: Ticket): TicketVm { | |
| return { | |
| ...ticket, | |
| statusClass: resolveStatusClass(ticket.status), | |
| }; | |
| } |
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
| @Component({ | |
| selector: 'poc-ticket-details', | |
| }) | |
| export class TicketDetailsComponent { | |
| @Input() ticket!: TicketVm; | |
| } | |
| @Pipe({ | |
| name: 'ticketDetails', | |
| }) |
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
| describe('demo', () => { | |
| beforeEach(() => { | |
| cy.init(); | |
| }); | |
| it('should login and navigate to the home page', () => { | |
| cy.login('demo-user@example.com', '123456'); | |
| cy.visit('/'); | |
| // ... | |
| }); |
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 { | |
| getAuth, | |
| browserPopupRedirectResolver, | |
| connectAuthEmulator, | |
| initializeAuth, | |
| signInWithEmailAndPassword, | |
| browserSessionPersistence, | |
| } from 'firebase/auth'; | |
| import { getApp, initializeApp } from 'firebase/app'; |
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 { | |
| collection, | |
| collectionData, | |
| CollectionReference, | |
| Firestore, | |
| } from '@angular/fire/firestore'; | |
| @Component({ | |
| selector: 'poc-fire-ticket', | |
| templateUrl: './fire-ticket.component.html', |
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 { getApp, initializeApp, provideFirebaseApp } from '@angular/fire/app'; | |
| import { | |
| initializeFirestore, | |
| provideFirestore, | |
| connectFirestoreEmulator, | |
| enableIndexedDbPersistence, | |
| } from '@angular/fire/firestore'; | |
| import { | |
| browserPopupRedirectResolver, | |
| browserSessionPersistence, |
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 { InMemoryDbService } from 'angular-in-memory-web-api'; | |
| @Injectable({ | |
| providedIn: 'root', | |
| }) | |
| export class InMemoryDatabaseService implements InMemoryDbService { | |
| createDb(): {} | Observable<{}> | Promise<{}> { | |
| const tickets: Ticket[] = [ | |
| { | |
| id: '1', |
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 { HttpClientInMemoryWebApiModule } from 'angular-in-memory-web-api'; | |
| @NgModule({ | |
| declarations: [AppComponent], | |
| imports: [ | |
| environment.prototype | |
| ? HttpClientInMemoryWebApiModule.forRoot(InMemoryDatabaseService, { | |
| delay: 0, | |
| passThruUnknownUrl: false, | |
| }) |
NewerOlder