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 { Injectable } from '@angular/core'; | |
| import { HttpInterceptor, HttpRequest, HttpHandler, HttpEvent, HttpErrorResponse } from '@angular/common/http'; | |
| import { Observable, BehaviorSubject } from 'rxjs'; | |
| import { catchError, filter, switchMap, take } from 'rxjs/operators'; | |
| import { AuthService } from '@services/auth.service'; | |
| import { Router } from '@angular/router'; | |
| import { TokenType } from '@app/graphql.module'; | |
| @Injectable() | |
| export class AuthInterceptor implements HttpInterceptor { |
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
| // Generate AccesToken keypair | |
| openssl genrsa -out access_token.pem 2048 | |
| openssl rsa -in access_token.pem -pubout -out access_token_publickey.crt | |
| openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in access_token.pem -out access_token_pkcs8.key | |
| // Generate RefreshToken keypair | |
| openssl genrsa -out refresh_token.pem 2048 | |
| openssl rsa -in refresh_token.pem -pubout -out refresh_token_publickey.crt | |
| openssl pkcs8 -topk8 -inform PEM -outform PEM -nocrypt -in refresh_token.pem -out refresh_token_pkcs8.key |
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 x-data="{ | |
| value: {{ value }} ?? '', | |
| displayValue: {{ value }} ?? '', | |
| demaskValue(value) { | |
| this.value = value.replaceAll('$', '').replaceAll(',', '') | |
| } | |
| }" class="-mr-2"> | |
| <input | |
| type="text" | |
| x-mask:dynamic="'$' + $money($input)" |
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 'package:biocidalmobile/components/bio_text_form_field.dart'; | |
| import 'package:flutter/material.dart'; | |
| class BioLoginForm extends StatefulWidget { | |
| const BioLoginForm({super.key}); | |
| @override | |
| BioLoginFormState createState() { | |
| return BioLoginFormState(); | |
| } |
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 { ChangeDetectionStrategy, Component, HostListener, Inject, OnInit, OnDestroy } from '@angular/core'; | |
| import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog'; | |
| import { Observable, tap } from 'rxjs'; | |
| import { InsectInfoDialogQuery } from '@generated-types'; | |
| import { InsectService } from '@app/services/insect.service'; | |
| export interface InsectInfoDialogData { | |
| id: string; | |
| } |
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, Input, OnInit } from ‘@angular/core’; | |
| @Component({ | |
| selector: ‘app-dumb’, | |
| templateUrl: ‘./dumb.component.html’, | |
| styleUrls: [‘./dumb.component.css’] | |
| }) | |
| export class DumbComponent implements OnInit { | |
| @Input(‘car’) car: Car[]; | |
| constructor() { } | |
| ngOnInit() { |
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 { Pipe, PipeTransform } from '@angular/core'; | |
| import * as moment from 'moment'; | |
| import 'moment/locale/tr'; | |
| @Pipe({ | |
| name: 'humanReadableDate', | |
| }) | |
| export class HumanReadableDatePipe implements PipeTransform { | |
| transform(date: Date) { | |
| const now = moment(); |
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
| const now = new Date(); | |
| const scheduledDate = new Date(this.element.scheduledDate); | |
| const diff = scheduledDate.getTime() - now.getTime(); | |
| diff < 0 ? (this.showWarningColor = true) : (this.showWarningColor = false); |
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
| @Entity() | |
| @ObjectType() | |
| export class Foo extends BaseEntity { | |
| @PrimaryGeneratedColumn('uuid') | |
| @Field(() => ID) | |
| id: string; | |
| @Column() | |
| @Field() | |
| title: string; |