Skip to content

Instantly share code, notes, and snippets.

View moein459's full-sized avatar

Moein moein459

  • Yaas Arghavani System Engineering
  • Iran, Tehran
  • LinkedIn in/moein459
View GitHub Profile
@moein459
moein459 / jalali-moment.adapter.ts
Last active April 20, 2023 09:41
ng-zorro jalali moment date adapter
import moment, { Moment } from 'jalali-moment';
import { DateMode, NzDateAdapter } from 'ng-zorro-antd/core/time';
import StartOf = moment.unitOfTime.StartOf;
export class JalaliMomentDateAdapter extends NzDateAdapter<Moment> {
constructor() {
super();
moment.locale('fa');
searchByLegalCode(legalCode: string) {
return this.http
.get<MerchantFilterModel>(`api/backoffice/merchantFilters/nationalLegalCode?nationalLegalCode=${legalCode}`);
}
searchByNationalCode(nationalCode: string) {
return this.http
.get<MerchantFilterModel>(`api/backoffice/merchantFilters/nationalCode?nationalCode=${nationalCode}`);
}
import {Injectable} from '@angular/core';
import {HubConnection, HubConnectionBuilder, LogLevel} from '@microsoft/signalr';
import {environment} from '../../../environments/environment';
import {Deal, Offer} from 'core';
import {DealsStore} from '../../modules/room/modules/deal/state/deals.store';
import {Subject} from 'rxjs';
import {shareReplay, take} from 'rxjs/operators';
import {OffersStore} from "../../modules/room/modules/offer/state/offers.store";
import {ToastrService} from "ngx-toastr";
import {Room} from "../../modules/room/state/rooms.model";