JSFiddle - React, Tailwind, and code Playground

by Suryar Praveen

HTML

populateDefaultStore () {
    this.currentStore$.add(this.userService.currentStore$
      .subscribe(currentStore => {
         if (currentStore) {
          const store = this.stores?.find(store => store.name === currentStore);
          if (store) {
            this.store.dispatch(
              new mtbActions.storeActions.SetSelectedStore({
                displayName: store.displayName,
                formattedAddress: store.formattedAddress,
                name: store.name
              })              
            );
            this.appService.setSelectedStore(store);
			 }
        }
		}));
  }
  
  
  setUserStore (userData) {
    let userSelectedStore;
    if (userData.location_number) {
      const validStore = this.stores?.filter(store => store.name === userData.location_number);
      if (validStore?.length) {
        userSelectedStore = userData.location_number;
      } else {
        userSelectedStore = '7001';
      }
    } else {
      userSelectedStore = '7001';
    }
    this.userService.setUserSelectedStore(userSelectedStore);
  }
  
  
  import { Component, OnInit, Input, Output, ViewChild, EventEmitter, SimpleChanges, OnChanges } from '@angular/core';
import { CART_ORDER_ITEMS, PRODUCT_DETAILS } from '../../constants/mock-item-details.constants';
import { AbstractControl, FormArray, FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { CurrencyPipe } from '@angular/common';
import { AppRouteService } from '../../shared/services/app-routes.service';
import { APP_ROUTES } from '../../config/app-config.constants';
import { AclIFormInputMeta, AclRadioGroup, AclIRadioOptions } from '@hdca/fe-angular-cl/acl-forms';
import { CartDetailsModel } from '../../models/cart-details.model';
import { CartItemListModel } from '../../models/cart-item-list.model';
import { CartUpdateLineRequestModel } from '../../models/cart-update-line-request.model';
import { UI_CONSTANTS } from '../../constants/ui.constants';
import {...

JavaScript

One command prompt
npm run ng serve

Second command prompt
just --> node server

npm config set legacy-peer-deps true // Command to run the project for aot false and buildOptimizer true
npm install


`npm install -g [email protected]`