Skip to content

Commit

Permalink
Merge branch 'production' of https://github.com/Walkover-Web-Solution…
Browse files Browse the repository at this point in the history
…/Giddh-New-Angular4-App into 22dec-mac-electron
  • Loading branch information
the-prateek-mishra committed Jan 22, 2021
2 parents 181d739 + 8eedf5d commit d8b09e5
Show file tree
Hide file tree
Showing 54 changed files with 1,567 additions and 484 deletions.
2 changes: 2 additions & 0 deletions apps/web-giddh/src/app/app.constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ export enum OnBoardingType {

/** Pagination limit for every module */
export const PAGINATION_LIMIT = 50;
/** API default count limit */
export const API_COUNT_LIMIT = 20;

/** SubVoucher type */
export enum SubVoucher {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ <h1 class="audit-log-heading">{{log.operationType}}
</div>
<div>
<label class="pull-left mr-l2">User:</label>
<p class="pull-left ml-05">{{log.user?.name}}</p>
<p class="pull-left mr-l05">{{log.user?.name}}</p>
</div>
<div *ngIf="log && log.groupName && log.groupName != null">
<label class="pull-left mr-l2">Group:</label>
Expand All @@ -28,14 +28,14 @@ <h1 class="audit-log-heading">{{log.operationType}}
</div>
<div *ngIf="log.log && log.log?.sharedWith && log.log?.sharedWith != undefined && log.log?.sharedWith?.name.length > 0">
<label class="pull-left mr-l2">Shared with:</label>
<p class="pull-left ml-05">{{log.log?.sharedWith?.name}}
<p class="pull-left mr-l05">{{log.log?.sharedWith?.name}}
<span *ngIf="log.log?.sharedWith?.email && log.log?.sharedWith?.email != null && log.log?.sharedWith?.email?.length > 0">
| {{log.log?.sharedWith?.email}}</span>
</p>
</div>
<div *ngIf="log && log.log && log.log?.description != undefined && log.log?.description?.length > 0">
<label class="pull-left mr-l2">Description:</label>
<p class="pull-left ml-05">{{log.log?.description}}</p>
<p class="pull-left mr-l05">{{log.log?.description}}</p>
</div>
</div>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<div class="row mr-t3">
<div class="col-xs-12 col-sm-12">
<div class="export-data-form">
<div class="d-flex">
<div class="d-flex flex-wrap">
<div class="file-type-label mr-r15 linked-entities" *ngIf="currentCompanyBranches?.length">
<label class="d-block">Entity</label>
<div class="form-group">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,14 @@
padding-bottom: 5px;
}
}

.btn-success, .btn-primary{
margin-top: 24px;
margin-bottom: 24px;
}

.input-upload{
max-width: 250px;
}
@media(max-width:991px){
.export-data-form{
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ <h3 class=""><span>Account Details</span></h3>
<div class="aside-body">
<div class="aside-pane-form">
<account-add-new-details #addAccountNewComponent *ngIf="activeGroupUniqueName && !isUpdateAccount"
class="mr-t4" [activeGroupUniqueName]="activeGroupUniqueName" [flatGroupsOptions]="flatGroupsOptions"
class="mr-t4" [activeGroupUniqueName]="activeGroupUniqueName"
[fetchingAccUniqueName$]="fetchingAccUniqueName$" [isAccountNameAvailable$]="isAccountNameAvailable$"
[isDebtorCreditor]="isDebtorCreditor" [createAccountInProcess$]="createAccountInProcess$"
(submitClicked)="addNewAcSubmit($event)" (isGroupSelected)="isGroupSelected($event)"
[isGstEnabledAcc]="isGstEnabledAcc" [isHsnSacEnabledAcc]="isHsnSacEnabledAcc"
[showBankDetail]="showBankDetail">
[showBankDetail]="showBankDetail" [isCustomerCreation]="true" [isFlattenRemoved]="true">
</account-add-new-details>

<account-update-new-details *ngIf="activeGroupUniqueName && isUpdateAccount"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,9 @@ import { AccountsAction } from '../../actions/accounts.actions';
import { IOption } from '../../theme/ng-select/option.interface';
import { GroupResponse } from '../../models/api-models/Group';
import { ModalDirective } from 'ngx-bootstrap/modal';
import { GroupsWithAccountsResponse } from '../../models/api-models/GroupsWithAccounts';
import { GroupWithAccountsAction } from '../../actions/groupwithaccounts.actions';
import { IFlattenGroupsAccountsDetail } from '../../models/interfaces/flattenGroupsAccountsDetail.interface';
import { GeneralActions } from '../../actions/general/general.actions';
import { AccountAddNewDetailsComponent } from '../../shared/header/components';

const GROUP = ['revenuefromoperations', 'otherincome', 'operatingcost', 'indirectexpenses'];

@Component({
selector: 'aside-menu-account',
styleUrls: ['aside.menu.account.component.scss'],
Expand Down Expand Up @@ -48,10 +43,8 @@ export class AsideMenuAccountInContactComponent implements OnInit, OnDestroy {
public updateAccountInProcess$: Observable<boolean>;
public updateAccountIsSuccess$: Observable<boolean>;
public deleteAccountSuccess$: Observable<boolean>;
public groupList$: Observable<GroupsWithAccountsResponse[]>;
public accountDetails: any = '';
public breadcrumbUniquePath: string[] = [];
private flattenGroups$: Observable<IFlattenGroupsAccountsDetail[]>;

// private below
private destroyed$: ReplaySubject<boolean> = new ReplaySubject(1);
Expand All @@ -60,7 +53,6 @@ export class AsideMenuAccountInContactComponent implements OnInit, OnDestroy {
private store: Store<AppState>,
private accountsAction: AccountsAction,
private _groupWithAccountsAction: GroupWithAccountsAction,
private _generalActions: GeneralActions
) {
// account-add component's property
this.fetchingAccUniqueName$ = this.store.pipe(select(state => state.groupwithaccounts.fetchingAccUniqueName), takeUntil(this.destroyed$));
Expand All @@ -73,12 +65,9 @@ export class AsideMenuAccountInContactComponent implements OnInit, OnDestroy {
this.updateAccountInProcess$ = this.store.pipe(select(state => state.groupwithaccounts.updateAccountInProcess), takeUntil(this.destroyed$));
this.updateAccountIsSuccess$ = this.store.pipe(select(state => state.groupwithaccounts.updateAccountIsSuccess), takeUntil(this.destroyed$));
this.deleteAccountSuccess$ = this.store.pipe(select(s => s.groupwithaccounts.isDeleteAccSuccess)).pipe(takeUntil(this.destroyed$));
this.groupList$ = this.store.pipe(select(state => state.general.groupswithaccounts), takeUntil(this.destroyed$));
this.flattenGroups$ = this.store.pipe(select(state => state.general.flattenGroups), takeUntil(this.destroyed$));
}

public ngOnInit() {
this.store.dispatch(this._generalActions.getFlattenGroupsReq());
if (this.isUpdateAccount && this.activeAccountDetails) {
this.accountDetails = this.activeAccountDetails;
this.store.dispatch(this._groupWithAccountsAction.getGroupWithAccounts(this.activeAccountDetails.name));
Expand Down Expand Up @@ -112,14 +101,6 @@ export class AsideMenuAccountInContactComponent implements OnInit, OnDestroy {
});
}
});
this.flattenGroups$.subscribe(flattenGroups => {
if (flattenGroups) {
let items: IOption[] = flattenGroups.filter(grps => {
return grps.groupUniqueName === this.activeGroupUniqueName || (grps && grps.parentGroups.some(s => s.uniqueName === this.activeGroupUniqueName));
}).map((m: any) => ({ value: m.groupUniqueName, label: m.groupName, additional: m.parentGroups }));
this.flatGroupsOptions = items;
}
});

this.deleteAccountSuccess$.subscribe(res => {
if (res) {
Expand All @@ -136,9 +117,9 @@ export class AsideMenuAccountInContactComponent implements OnInit, OnDestroy {

public isGroupSelected(event) {
if (event) {
this.activeGroupUniqueName = event;
this.activeGroupUniqueName = event.value;
// in case of sundrycreditors or sundrydebtors no need to show address tab
if (event === 'sundrycreditors' || event === 'sundrydebtors') {
if (event.value === 'sundrycreditors' || event.value === 'sundrydebtors') {
this.isDebtorCreditor = true;
}
}
Expand Down
19 changes: 0 additions & 19 deletions apps/web-giddh/src/app/contact/contact.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,6 @@ export class ContactComponent implements OnInit, OnDestroy {
public selectedGroupForCreateAcc: 'sundrydebtors' | 'sundrycreditors' = 'sundrydebtors';
public cashFreeAvailableBalance: number;
public payoutForm: CashfreeClass;
public bankAccounts$: Observable<IOption[]>;
public flattenAccountsStream$: Observable<IFlattenAccountsResultItem[]>;
public payoutObj: CashfreeClass = new CashfreeClass();
public dueAmountReportData$: Observable<DueAmountReportResponse>;
public moment = moment;
Expand Down Expand Up @@ -275,7 +273,6 @@ export class ContactComponent implements OnInit, OnDestroy {
this.dueAmountReportRequest = new DueAmountReportQueryRequest();
this.createAccountIsSuccess$ = this.store.pipe(select(s => s.groupwithaccounts.createAccountIsSuccess), takeUntil(this.destroyed$));
this.universalDate$ = this.store.pipe(select(state => state.session.applicationDate), takeUntil(this.destroyed$));
this.flattenAccountsStream$ = this.store.pipe(select(s => s.general.flattenAccounts), takeUntil(this.destroyed$));
this.store.pipe(select(s => s.agingreport.data), takeUntil(this.destroyed$)).subscribe((data) => {
if (data && data.results) {
this.dueAmountReportRequest.page = data.page;
Expand Down Expand Up @@ -368,22 +365,6 @@ export class ContactComponent implements OnInit, OnDestroy {
}
});

this.flattenAccountsStream$.subscribe(data => {

if (data) {
let accounts: IOption[] = [];
let bankAccounts: IOption[] = [];
forEach(data, (item) => {
accounts.push({ label: item.name, value: item.uniqueName });
let findBankIndx = (item.parentGroups) ? item.parentGroups.findIndex((grp) => grp && grp.uniqueName === 'bankaccounts') : -1;
if (findBankIndx !== -1) {
bankAccounts.push({ label: item.name, value: item.uniqueName });
}
});
this.bankAccounts$ = observableOf(accounts);
}
});

this.searchStr$.pipe(
debounceTime(1000),
distinctUntilChanged(), takeUntil(this.destroyed$))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ <h3 class="modal-title bg" id="modal-title">Advance Search</h3>
<div class="col-6 col-sm-6">
<div class="form-group">
<sh-select [options]="accounts$ | async" name="particulars" (onClear)="onDDClear('particulars')" [forceClearReactive]="forceClearParticulars$ | async" (selected)="onDDElementSelect('particulars', $event)" [isFilterEnabled]="true" [multiple]="true" [placeholder]="'Select Accounts'"
[ItemHeight]="33"></sh-select>
[enableDynamicSearch]="true" [isPaginationEnabled]="true" [doNotResetSelectedValues]="true"
(scrollEnd)="handleScrollEnd()" (dynamicSearchedQuery)="onAccountSearchQueryChanged($event)" [ItemHeight]="33"></sh-select>
</div>
</div>
</div>
Expand Down Expand Up @@ -140,7 +141,9 @@ <h3 class="modal-title bg" id="modal-title">Advance Search</h3>
</div>
<div class="col-sm-6">
<div class="form-group">
<sh-select [options]="stockListDropDown$ | async" name="inventory" (onClear)="onDDClear('inventory')" (selected)="onDDElementSelect('inventory', $event)" [isFilterEnabled]="true" [multiple]="true" [placeholder]="'Select Accounts'" [ItemHeight]="33"></sh-select>
<sh-select [options]="stockListDropDown$ | async" name="inventory" (onClear)="onDDClear('inventory')" (selected)="onDDElementSelect('inventory', $event)" [isFilterEnabled]="true" [multiple]="true" [placeholder]="'Select Accounts'" [ItemHeight]="33"
[enableDynamicSearch]="true" [isPaginationEnabled]="true" [doNotResetSelectedValues]="true"
(scrollEnd)="handleStockScrollEnd()" (dynamicSearchedQuery)="onStockSearchQueryChanged($event)"></sh-select>
</div>
</div>
</div>
Expand Down
Loading

0 comments on commit d8b09e5

Please sign in to comment.