Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dilpreet | Prod | Currency Task #274

Open
wants to merge 22 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
ec86915
sadique | admin design issue fixed
sadiksheikh7 May 29, 2020
83aede0
Merge pull request #258 from Walkover-Web-Solution/advance-search-ali…
sadik-walkover May 29, 2020
8d7199e
implemented on user page local storage
rohit-walkover May 29, 2020
b34511b
Merge pull request #259 from Walkover-Web-Solution/master
sadik-walkover May 29, 2020
adbf89f
sadique | admin panel back button
sadiksheikh7 May 29, 2020
5d2f10f
Merge pull request #261 from Walkover-Web-Solution/advance-search-ali…
sadik-walkover May 29, 2020
a3612b5
store filter in local storage done
rohit-walkover May 30, 2020
95fb648
Merge pull request #262 from Walkover-Web-Solution/master
sadik-walkover Jun 1, 2020
157dd01
delete clear local storage filter on logout done
rohit-walkover Jul 13, 2020
d5f0eb4
Resolved conflicts
rohit-walkover Jul 13, 2020
275728f
Return type added
rohit-walkover Jul 13, 2020
b467c05
Merge pull request #264 from Walkover-Web-Solution/GIDS-58_new
rohit-walkover Jul 13, 2020
f1bccf4
Countries of Plan is getting displayed instead of Country of User in …
ravinderwalkover Dec 5, 2020
8abf64e
Merge pull request #267 from Walkover-Web-Solution/1n9x8k-stage
ravinderwalkover Dec 5, 2020
08ee12a
Ravinder | Test | Added subscription link
ravinderwalkover Dec 29, 2021
8ecf78e
Merge pull request #268 from Walkover-Web-Solution/add-link
ravinderwalkover Dec 29, 2021
a2e4ee2
Fixed build issue
ravinderwalkover Dec 30, 2021
cc0857a
Merge pull request #269 from Walkover-Web-Solution/add-link
ravinderwalkover Dec 30, 2021
0fcc628
test
ravinderwalkover Aug 3, 2022
28b7050
updated readme
ravinderwalkover Aug 14, 2022
614c0e2
conflict resolved for syncing
dilpreetsinghofficial Aug 7, 2023
dec4a5f
Dilpreet | Stage | Need to provide support of currency in create plan…
dilpreetsinghofficial Aug 7, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions apps/web-giddh-admin/src/app/header/header.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ export class HeaderComponent implements OnInit {

public clearData() {
this.generalService.clearUserSession();
// To clear all stored local storage filter
this.generalService.clearCacheStoredFilter();
}

public getCompaniesList() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ <h3>No records found.</h3>
</div>
<div class="paginationWrapper">
<div *ngIf="LicenceKeyRes && LicenceKeyRes.totalItems > 50">
<pagination [totalItems]="LicenceKeyRes.totalItems" [maxSize]="5" class="pagination-sm" [boundaryLinks]="true" [itemsPerPage]="50" [rotate]="false" previousText="&#9668;" nextText="&#9658;" (pageChanged)="pageChanged($event)"></pagination>
<pagination [totalItems]="LicenceKeyRes.totalItems" [maxSize]="5" class="pagination-sm" [(ngModel)]="getAllLicenceKeyRequest.page" [boundaryLinks]="true" [itemsPerPage]="50" [rotate]="false" previousText="&#9668;" nextText="&#9658;" (pageChanged)="pageChanged($event)"></pagination>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
import { Component, OnInit, ViewChild } from '@angular/core';
import { LicenceService } from '../../services/licence.service';
import { SubscriberList, PAGINATION_COUNT } from '../../modules/modules/api-modules/subscription';
import { BsModalService, BsModalRef } from 'ngx-bootstrap/modal';
import { GeneralService } from '../../services/general.service';
import { Router } from '@angular/router';
import { FavouriteColumnPageTypeEnum } from '../../actions/general/general.const';
import { ColumnFilterService } from '../../services/column-filter.service';
import { ToasterService } from '../../services/toaster.service';
import { cloneDeep } from '../../lodash-optimized';
import { LicenseFieldFilterColumnNames } from '../../models/company';
import { BsModalRef, BsModalService } from 'ngx-bootstrap/modal';
import { BsDropdownDirective } from 'ngx-bootstrap/dropdown';

@Component({
Expand Down Expand Up @@ -47,9 +47,11 @@ export class LicenceKeyComponent implements OnInit {
this.generalService.setCurrentPageTitle("License Keys");
this.getAllLicenceKeyRequest.count = PAGINATION_COUNT;
this.getAllLicenceKeyRequest.page = 1;
this.getAllLicenceKey();

/** To get dynamic column filter */
this.getColumnFilter();
/** To check local storage filter available */
this.checkLocalStorageFilter();
}

/**
Expand All @@ -58,6 +60,8 @@ export class LicenceKeyComponent implements OnInit {
* @memberof LicenceKeyComponent
*/
public getAllLicenceKey() {

localStorage.setItem("licensePaginationFilter", JSON.stringify(this.getAllLicenceKeyRequest));
this.licenseService.getAllLicenseKeys(this.getAllLicenceKeyRequest).subscribe(res => {
if (res.status === 'success') {
this.LicenceKeyRes = res.body;
Expand Down Expand Up @@ -261,4 +265,21 @@ export class LicenceKeyComponent implements OnInit {
}
});
}

/**
*To check local storage filter available
*
* @memberof UserListComponent
*/
public checkLocalStorageFilter() {

let licensePaginationFilter = localStorage.getItem("licensePaginationFilter");
if (licensePaginationFilter) {
let retrievedLicensePaginationFilterObject = JSON.parse(licensePaginationFilter);
this.getAllLicenceKeyRequest = retrievedLicensePaginationFilterObject;
this.getAllLicenceKey();
} else {
this.getAllLicenceKey();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';
import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
import { PaginationModule } from 'ngx-bootstrap/pagination';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { TooltipModule } from 'ngx-bootstrap/tooltip';
import { LicenceKeyRoutingModule } from './licence-key-routing.module';
import { LicenceKeyComponent } from './licence-key-component/licence-key.component';
import { GenerateKeyComponent } from './components/generate-key/generate-key.component';
import { ShSelectModule } from '../theme/ng-virtual-select/sh-select.module';
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';
import { BsDropdownModule } from 'ngx-bootstrap/dropdown';
import { PaginationModule } from 'ngx-bootstrap/pagination';
import { TooltipModule } from 'ngx-bootstrap/tooltip';

@NgModule({
declarations: [LicenceKeyComponent, GenerateKeyComponent],
Expand Down
2 changes: 1 addition & 1 deletion apps/web-giddh-admin/src/app/login/login.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';

import { PerfectScrollbarModule } from 'ngx-perfect-scrollbar';
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';

import { LoginComponent } from './login.component'
import { LoginRoutingModule } from './login-routing.module';
import { BsDatepickerModule } from 'ngx-bootstrap/datepicker';



Expand Down
Original file line number Diff line number Diff line change
@@ -1,52 +1,138 @@
<div class="bg-box" [ngClass]="rightToggle ? 'in': 'out'"></div>
<div class="rightSlide kot-repring-sidebar" [ngClass]="rightToggle ? 'in': 'out'">
<div class="top-right-head">
<p class="bold text-18 text-white mb-0">Create Plan</p>
<a href="javascript:;" (click)="closePopup()" class="close"><i class="icon-cross"></i></a>
</div>
<div class="clearfix pr-2 pl-2 pt-2">
<form name="form" #createPlanForm="ngForm" novalidate="" autocomplete="off">
<div class="form-group">
<label>Plan name</label>
<input type="text" class="form-control" #planName name="name" [(ngModel)]="createPlanRequest.name" required (blur)="validatePlanName()">
</div>
<div class="form-group">
<label>Number of companies allowed</label>
<input type="number" class="form-control" (blur)="validateMinValue()" name="companiesLimit" [(ngModel)]="createPlanRequest.companiesLimit" required>
</div>
<div class="form-group">
<label>Number of transactions</label>
<input type="number" class="form-control" (blur)="validateMinValue()" name="transactionLimit" [(ngModel)]="createPlanRequest.transactionLimit" required>
</div>
<div class="form-group">
<label>Subscription price</label>
<input type="number" class="form-control" name="amount" [(ngModel)]="createPlanRequest.amount" required>
</div>
<div class="form-group">
<label>Country</label>
<sh-select [multiple]="true" placeholder="Select Countries" name="countries" autocomplete="false" id="countries" [(ngModel)]="createPlanRequest.countries" [options]="countries" [isFilterEnabled]="true" [ItemHeight]="33"></sh-select>
</div>
<!-- <div class="form-group">
<label>Currency</label>
<sh-select placeholder="Select Currency" name="currency" autocomplete="false" id="currency" [(ngModel)]="createPlanRequest.currency" [options]="currencies" [isFilterEnabled]="true" [ItemHeight]="33"></sh-select>
</div> -->
<div class="form-group">
<label>Duration</label>
<input type="number" class="form-control" (blur)="validateMinValue()" name="duration" [(ngModel)]="createPlanRequest.duration" required>
</div>
<div class="form-group">
<label>Duration unit</label>
<sh-select placeholder="Select Duration Unit" name="durationUnit" autocomplete="false" id="durationUnit" [(ngModel)]="createPlanRequest.durationUnit" [options]="durationUnits" [isFilterEnabled]="true" [ItemHeight]="33"></sh-select>
</div>
<div class="form-group">
<label>Rate per extra transaction</label>
<input type="number" class="form-control" (blur)="validateMinValue()" name="ratePerExtraTransaction" [(ngModel)]="createPlanRequest.ratePerExtraTransaction" required>
</div>
<div class="form-group">
<input type="checkbox" name="isCommonPlan" [(ngModel)]="createPlanRequest.isCommonPlan" value="1">
<label class="mr-1">Is Common Plan</label>
</div>
<input type="button" value="Create" class="btn-blue btn" (click)="createPlan()" [disabled]="createPlanForm.invalid || isLoading">
</form>
</div>
</div>
<div class="bg-box" [ngClass]="rightToggle ? 'in' : 'out'"></div>
<div
class="rightSlide kot-repring-sidebar"
[ngClass]="rightToggle ? 'in' : 'out'"
>
<div class="top-right-head">
<p class="bold text-18 text-white mb-0">Create Plan</p>
<a href="javascript:;" (click)="closePopup()" class="close"
><i class="icon-cross"></i
></a>
</div>
<div class="clearfix pr-2 pl-2 pt-2">
<form name="form" #createPlanForm="ngForm" novalidate="" autocomplete="off">
<div class="form-group">
<label>Plan name</label>
<input
type="text"
class="form-control"
#planName
name="name"
[(ngModel)]="createPlanRequest.name"
required
(blur)="validatePlanName()"
/>
</div>
<div class="form-group">
<label>Number of companies allowed</label>
<input
type="number"
class="form-control"
(blur)="validateMinValue()"
name="companiesLimit"
[(ngModel)]="createPlanRequest.companiesLimit"
required
/>
</div>
<div class="form-group">
<label>Number of transactions</label>
<input
type="number"
class="form-control"
(blur)="validateMinValue()"
name="transactionLimit"
[(ngModel)]="createPlanRequest.transactionLimit"
required
/>
</div>
<div class="form-group">
<label>Subscription price</label>
<input
type="number"
class="form-control"
name="amount"
[(ngModel)]="createPlanRequest.amount"
required
/>
</div>
<div class="form-group">
<label>Country</label>
<sh-select
[multiple]="true"
placeholder="Select Countries"
name="countries"
autocomplete="false"
id="countries"
[(ngModel)]="createPlanRequest.countries"
[options]="countries"
[isFilterEnabled]="true"
[ItemHeight]="33"
></sh-select>
</div>
<div class="form-group">
<label>Currency</label>
<sh-select
placeholder="Select Currency"
name="currency"
autocomplete="false"
id="currency"
[(ngModel)]="createPlanRequest.currency"
[options]="currencies"
[isFilterEnabled]="true"
[ItemHeight]="33"
></sh-select>
</div>
<div class="form-group">
<label>Duration</label>
<input
type="number"
class="form-control"
(blur)="validateMinValue()"
name="duration"
[(ngModel)]="createPlanRequest.duration"
required
/>
</div>
<div class="form-group">
<label>Duration unit</label>
<sh-select
placeholder="Select Duration Unit"
name="durationUnit"
autocomplete="false"
id="durationUnit"
[(ngModel)]="createPlanRequest.durationUnit"
[options]="durationUnits"
[isFilterEnabled]="true"
[ItemHeight]="33"
></sh-select>
</div>
<div class="form-group">
<label>Rate per extra transaction</label>
<input
type="number"
class="form-control"
(blur)="validateMinValue()"
name="ratePerExtraTransaction"
[(ngModel)]="createPlanRequest.ratePerExtraTransaction"
required
/>
</div>
<div class="form-group">
<input
type="checkbox"
name="isCommonPlan"
[(ngModel)]="createPlanRequest.isCommonPlan"
value="1"
/>
<label class="mr-1">Is Common Plan</label>
</div>
<input
type="button"
value="Create"
class="btn-blue btn"
(click)="createPlan()"
[disabled]="createPlanForm.invalid || isLoading"
/>
</form>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -74,14 +74,14 @@
<thead>
<tr (clickOutside)="inlineSearch = null">
<th class="table-search" *ngIf="showFieldFilter.planName">
<div [hidden]="inlineSearch == 'planName'">
<div [hidden]="inlineSearch == 'planName' || getAllPlansPostRequest.planName">
<div class="d-flex align-items-center justify-content-between">
<span>Plan Name</span>
<i class="fa fa-search pull-right" (click)="focusOnColumnSearch('planName')"></i>
</div>
</div>
<div class="input-container" [hidden]="inlineSearch !== 'planName'">
<input type="text" placeholder="Plan Name" class="form-control w100" #planNameField name="planName" [(ngModel)]="getAllPlansPostRequest.planName" (keypress)="columnSearch()" (keydown)="columnSearch()" />
<div class="input-container" [hidden]="inlineSearch !== 'planName' && !getAllPlansPostRequest.planName">
<input type="text" placeholder="Plan Name" class="form-control w100" #planNameField name="planName" [(ngModel)]="getAllPlansPostRequest.planName" (ngModelChange)="searchViaPlanName$.next($event)" />
</div>
</th>
<th *ngIf="showFieldFilter.createdOn">
Expand All @@ -95,7 +95,7 @@
<th *ngIf="showFieldFilter.totalAmount" (click)="sortBy('TOTAL_AMOUNT')">Total Amount
<i [ngClass]="{'fa pull-right': 1 === 1, 'icon-icon-sort-up': getAllPlansRequest.sortType === 'desc' && getAllPlansRequest.sortBy === 'TOTAL_AMOUNT', 'icon-icon-sort-down': (getAllPlansRequest.sortType === 'asc' && getAllPlansRequest.sortBy === 'TOTAL_AMOUNT') || getAllPlansRequest.sortBy !== 'TOTAL_AMOUNT'}"></i>
</th>
<th *ngIf="showFieldFilter.expiry" (click)="sortBy('EXPIRY')">Expiry in next 30 days
<th class="min-width-210" *ngIf="showFieldFilter.expiry" (click)="sortBy('EXPIRY')">Expiry in next 30 days
<i [ngClass]="{'fa pull-right': 1 === 1, 'icon-icon-sort-up': getAllPlansRequest.sortType === 'desc' && getAllPlansRequest.sortBy === 'EXPIRY', 'icon-icon-sort-down': (getAllPlansRequest.sortType === 'asc' && getAllPlansRequest.sortBy === 'EXPIRY') || getAllPlansRequest.sortBy !== 'EXPIRY'}"></i>
</th>

Expand Down Expand Up @@ -135,55 +135,57 @@
</tbody>
<tbody *ngIf="!plansData || !plansDataResults || plansDataResults.length === 0">
<tr>
<td colspan="7" align="center"><h3>No records found.</h3></td>
<td colspan="7" align="center">
<h3>No records found.</h3>
</td>
</tr>
</tbody>
</table>
</div>

<div class="paginationWrapper">
<div *ngIf="plansData && plansData.totalItems > PAGINATION_COUNT">
<pagination [totalItems]="plansData.totalItems" [maxSize]="5" class="pagination-sm" [boundaryLinks]="true" [itemsPerPage]="PAGINATION_COUNT" [rotate]="false" previousText="&#9668;" nextText="&#9658;" (pageChanged)="pageChanged($event)"></pagination>
<pagination [totalItems]="plansData.totalItems" [maxSize]="5" class="pagination-sm" [boundaryLinks]="true" [(ngModel)]="getAllPlansRequest.page" [itemsPerPage]="PAGINATION_COUNT" [rotate]="false" previousText="&#9668;" nextText="&#9658;" (pageChanged)="pageChanged($event)"></pagination>
</div>
</div>

<div class="page-footer">
<div class="row">
<div class="col-md-1 col-sm-3 wrap-row">
<div class="userNumber">
<h4>{{planStats?.commonPlans}}</h4>
<h4>{{planStates?.commonPlans}}</h4>
</div>
<div class="aboutUser">
<p>Common Plans</p>
</div>
</div>
<div class="col-md-1 col-sm-3 wrap-row">
<div class="userNumber">
<h4>{{planStats?.adminPlans}}</h4>
<h4>{{planStates?.adminPlans}}</h4>
</div>
<div class="aboutUser">
<p>Admin Plans</p>
</div>
</div>
<div class="col-md-1 col-sm-3 wrap-row">
<div class="userNumber">
<h4>{{planStats?.totalPlans}}</h4>
<h4>{{planStates?.totalPlans}}</h4>
</div>
<div class="aboutUser">
<p>Total Plans</p>
</div>
</div>
<div class="col-md-1 col-sm-3 wrap-row">
<div class="userNumber">
<h4>{{planStats?.paidPlans}}</h4>
<h4>{{planStates?.paidPlans}}</h4>
</div>
<div class="aboutUser">
<p>Paid Plans</p>
</div>
</div>
<div class="col-md-1 col-sm-3 wrap-row">
<div class="userNumber">
<h4>{{planStats?.trialPlans}}</h4>
<h4>{{planStates?.trialPlans}}</h4>
</div>
<div class="aboutUser">
<p>Trial Plans</p>
Expand Down
Loading