Share Product and Share Account views updated
This commit is contained in:
committed by
Jose Alberto Hernandez
parent
fafdd0dd20
commit
a41df49a3e
@@ -10,10 +10,17 @@
|
||||
<div class="container">
|
||||
|
||||
<div #filter fxLayout="row" fxLayoutGap="20px">
|
||||
<mat-form-field fxFlex>
|
||||
<mat-form-field fxFlex fxFlex="68%">
|
||||
<mat-label>{{'labels.inputs.Filter' | translate}}</mat-label>
|
||||
<input matInput (keyup)="applyFilter($event.target.value)">
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex fxFlex="28%">
|
||||
<mat-select placeholder="{{'labels.inputs.Filter' | translate}}" (selectionChange)="filterByAppliesTo($event.value)">
|
||||
<mat-option *ngFor="let chargeAppliesTo of chargeAppliesToOptions" [value]="chargeAppliesTo.id">
|
||||
{{ chargeAppliesTo.value | translateCatalog }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
</div>
|
||||
|
||||
<div #chargesTable class="mat-elevation-z8">
|
||||
@@ -46,18 +53,23 @@
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="penalty">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.commons.Is" | translate}} {{"labels.inputs.Penalty" | translate}}? </th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.commons.Is" | translate}}
|
||||
{{"labels.inputs.Penalty" | translate}}? </th>
|
||||
<td mat-cell *matCellDef="let charge" class="center">
|
||||
<fa-icon *ngIf="charge.penalty" icon="check-circle" size="lg" class="ispenalty" matTooltip="Yes" matTooltipPosition="right"></fa-icon>
|
||||
<fa-icon *ngIf="!charge.penalty" icon="times-circle" size="lg" class="nopenalty" matTooltip="No" matTooltipPosition="right"></fa-icon>
|
||||
<fa-icon *ngIf="charge.penalty" icon="check-circle" size="lg" class="ispenalty" matTooltip="Yes"
|
||||
matTooltipPosition="right"></fa-icon>
|
||||
<fa-icon *ngIf="!charge.penalty" icon="times-circle" size="lg" class="nopenalty" matTooltip="No"
|
||||
matTooltipPosition="right"></fa-icon>
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="active">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.commons.Is" | translate}} {{"labels.status.Active" | translate}}? </th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{"labels.commons.Is" | translate}}
|
||||
{{"labels.status.Active" | translate}}? </th>
|
||||
<td mat-cell *matCellDef="let charge" class="center">
|
||||
<div [className]="charge.active === true ? 'true' : 'false'">
|
||||
<fa-icon matTooltip="{{ charge.active === true ? 'Active' : 'Inactive' }}" matTooltipPosition="right" icon="circle" size="lg"></fa-icon>
|
||||
<fa-icon matTooltip="{{ charge.active === true ? 'Active' : 'Inactive' }}" matTooltipPosition="right"
|
||||
icon="circle" size="lg"></fa-icon>
|
||||
</div>
|
||||
</td>
|
||||
</ng-container>
|
||||
@@ -77,26 +89,34 @@
|
||||
<h2>{{"labels.text.Create Charge" | translate}}</h2>
|
||||
<p class="mw300">{{"labels.text.Supports Loan charges, Savings & deposits" | translate}}</p>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="warn"
|
||||
(click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();previousStep()">Back</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">Next</button>
|
||||
<button mat-raised-button color="primary"
|
||||
(click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">Next</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #templateFilter let-popover="popover">
|
||||
<h4>{{"labels.heading.Search bar to filter charges." | translate}}</h4>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateButtonCreateCharge,buttonCreateCharge , 'bottom', true)">Back</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateChargesTable,chargesTable, 'top', true)">Next</button>
|
||||
<button mat-raised-button color="warn"
|
||||
(click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary"
|
||||
(click)="popover.close();showPopover(templateButtonCreateCharge,buttonCreateCharge , 'bottom', true)">Back</button>
|
||||
<button mat-raised-button color="primary"
|
||||
(click)="popover.close();showPopover(templateChargesTable,chargesTable, 'top', true)">Next</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #templateChargesTable let-popover="popover">
|
||||
<h4 class="mw300">{{"labels.heading.List of charges in the organization. For more details click" | translate}}: <a href="https://mifosforge.jira.com/wiki/spaces/docs/pages/72908813/Charges" target="_blank">Charges</a></h4>
|
||||
<h4 class="mw300">{{"labels.heading.List of charges in the organization. For more details click" | translate}}: <a
|
||||
href="https://mifosforge.jira.com/wiki/spaces/docs/pages/72908813/Charges" target="_blank">Charges</a></h4>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">Back</button>
|
||||
<button mat-raised-button color="warn"
|
||||
(click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary"
|
||||
(click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">Back</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();nextStep()">Next</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
</ng-template>
|
||||
@@ -11,6 +11,9 @@ import { of } from 'rxjs';
|
||||
/** Custom Services */
|
||||
import { PopoverService } from '../../configuration-wizard/popover/popover.service';
|
||||
import { ConfigurationWizardService } from '../../configuration-wizard/configuration-wizard.service';
|
||||
import { Charges } from 'app/core/utils/charges';
|
||||
import { OptionData } from 'app/shared/models/option-data.model';
|
||||
import { Charge } from './models/charge.model';
|
||||
|
||||
/**
|
||||
* Charges component.
|
||||
@@ -23,7 +26,7 @@ import { ConfigurationWizardService } from '../../configuration-wizard/configura
|
||||
export class ChargesComponent implements OnInit, AfterViewInit {
|
||||
|
||||
/** Charge data. */
|
||||
chargeData: any;
|
||||
chargeData: Charge[] = [];
|
||||
/** Columns to be displayed in charges table. */
|
||||
displayedColumns: string[] = ['name', 'chargeAppliesTo', 'chargeTimeType', 'chargeCalculationType', 'amount', 'penalty', 'active'];
|
||||
/** Data source for charges table. */
|
||||
@@ -43,6 +46,8 @@ export class ChargesComponent implements OnInit, AfterViewInit {
|
||||
/* Template for popover on charges table */
|
||||
@ViewChild('templateChargesTable') templateChargesTable: TemplateRef<any>;
|
||||
|
||||
chargeAppliesToOptions: OptionData[] = [];
|
||||
|
||||
/**
|
||||
* Retrieves the charges data from `resolve`.
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -53,10 +58,12 @@ export class ChargesComponent implements OnInit, AfterViewInit {
|
||||
constructor(private route: ActivatedRoute,
|
||||
private router: Router,
|
||||
private configurationWizardService: ConfigurationWizardService,
|
||||
private popoverService: PopoverService) {
|
||||
private popoverService: PopoverService,
|
||||
private charges: Charges) {
|
||||
this.route.data.subscribe(( data: { charges: any }) => {
|
||||
this.chargeData = data.charges;
|
||||
});
|
||||
this.chargeAppliesToOptions = this.charges.getChargeAppliesToOptions();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -136,4 +143,13 @@ export class ChargesComponent implements OnInit, AfterViewInit {
|
||||
this.configurationWizardService.showCharges = true;
|
||||
this.router.navigate(['/products']);
|
||||
}
|
||||
|
||||
filterByAppliesTo(chargeAppliesTo: number) {
|
||||
console.log(chargeAppliesTo);
|
||||
const filteredCharges: Charge[] = this.chargeData.filter((charge: Charge) => {
|
||||
return (charge.chargeAppliesTo.id === chargeAppliesTo);
|
||||
});
|
||||
this.dataSource = new MatTableDataSource(filteredCharges);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
import { Currency, PaymentTypeOption } from 'app/shared/models/general.model';
|
||||
import { OptionData } from 'app/shared/models/option-data.model';
|
||||
|
||||
export interface Charge {
|
||||
id: number;
|
||||
name: string;
|
||||
active: boolean;
|
||||
penalty: boolean;
|
||||
freeWithdrawal: boolean;
|
||||
freeWithdrawalChargeFrequency: number;
|
||||
restartFrequency: number;
|
||||
restartFrequencyEnum: number;
|
||||
isPaymentType: boolean;
|
||||
currency: Currency;
|
||||
amount: number;
|
||||
chargeTimeType: OptionData;
|
||||
chargeAppliesTo: OptionData;
|
||||
chargeCalculationType: OptionData;
|
||||
chargePaymentMode: OptionData;
|
||||
feeInterval?: number;
|
||||
feeFrequency?: OptionData;
|
||||
feeOnMonthDay?: number[];
|
||||
paymentTypeOptions?: PaymentTypeOption;
|
||||
}
|
||||
|
||||
export enum ChargeAppliesToCode {
|
||||
ChargeAppliesToClient = 'chargeAppliesTo.client',
|
||||
ChargeAppliesToLoan = 'chargeAppliesTo.loan',
|
||||
ChargeAppliesToSavings = 'chargeAppliesTo.savings',
|
||||
ChargeAppliesToShares = 'chargeAppliesTo.shares',
|
||||
ChargeCalculationTypeFlat = 'chargeCalculationType.flat',
|
||||
ChargeCalculationTypePercentOfAmount = 'chargeCalculationType.percent.of.amount',
|
||||
ChargeCalculationTypePercentOfAmountAndInterest = 'chargeCalculationType.percent.of.amount.and.interest',
|
||||
ChargeCalculationTypePercentOfInterest = 'chargeCalculationType.percent.of.interest',
|
||||
ChargeTimeTypeActivation = 'chargeTimeType.activation',
|
||||
ChargeTimeTypeAnnualFee = 'chargeTimeType.annualFee',
|
||||
ChargeTimeTypeDisbursement = 'chargeTimeType.disbursement',
|
||||
ChargeTimeTypeInstalmentFee = 'chargeTimeType.instalmentFee',
|
||||
ChargeTimeTypeMonthlyFee = 'chargeTimeType.monthlyFee',
|
||||
ChargeTimeTypeOverdueInstallment = 'chargeTimeType.overdueInstallment',
|
||||
ChargeTimeTypeSavingsActivation = 'chargeTimeType.savingsActivation',
|
||||
ChargeTimeTypeSavingsNoActivityFee = 'chargeTimeType.savingsNoActivityFee',
|
||||
ChargeTimeTypeSharespurchase = 'chargeTimeType.sharespurchase',
|
||||
ChargeTimeTypeSharesredeem = 'chargeTimeType.sharesredeem',
|
||||
ChargeTimeTypeSolidarityFund = 'chargeTimeType.solidarityFund',
|
||||
ChargeTimeTypeSpecifiedDueDate = 'chargeTimeType.specifiedDueDate',
|
||||
ChargeTimeTypeWeeklyFee = 'chargeTimeType.weeklyFee',
|
||||
ChargeTimeTypeWithdrawalFee = 'chargeTimeType.withdrawalFee',
|
||||
ChargepaymentmodeAccounttransfer = 'chargepaymentmode.accounttransfer',
|
||||
ChargepaymentmodeRegular = 'chargepaymentmode.regular',
|
||||
FeeFrequencyperiodFrequencyTypeMonths = 'feeFrequencyperiodFrequencyType.months',
|
||||
}
|
||||
+1
-1
@@ -128,7 +128,7 @@
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="fixedDepositProductData.minBalanceForInterestCalculation">
|
||||
<span fxFlex="40%">{{'labels.inputs.Balance Required For Interest Calculation' | translate}}:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Balance Required for Interest Calculation' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ fixedDepositProductData.minBalanceForInterestCalculation | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
|
||||
+8
-8
@@ -24,7 +24,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductDetailsForm">
|
||||
|
||||
<ng-template matStepLabel>DETAILS</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.DETAILS' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-details-step></mifosx-share-product-details-step>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductCurrencyForm">
|
||||
|
||||
<ng-template matStepLabel>CURRENCY</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.CURRENCY' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-currency-step [shareProductsTemplate]="shareProductsTemplate"></mifosx-share-product-currency-step>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductTermsForm">
|
||||
|
||||
<ng-template matStepLabel>TERMS</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.TERMS' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-terms-step></mifosx-share-product-terms-step>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductSettingsForm">
|
||||
|
||||
<ng-template matStepLabel>SETTINGS</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.SETTINGS' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-settings-step [shareProductsTemplate]="shareProductsTemplate"></mifosx-share-product-settings-step>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductMarketPriceForm">
|
||||
|
||||
<ng-template matStepLabel>MARKET PRICE</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.MARKET PRICE' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-market-price-step></mifosx-share-product-market-price-step>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<mat-step>
|
||||
|
||||
<ng-template matStepLabel>CHARGES</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.CHARGES' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-charges-step
|
||||
[shareProductsTemplate]="shareProductsTemplate"
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductAccountingForm">
|
||||
|
||||
<ng-template matStepLabel>ACCOUNTING</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.ACCOUNTING' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-accounting-step
|
||||
[shareProductsTemplate]="shareProductsTemplate"
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
<mat-step state="preview" *ngIf="shareProductFormValid" completed>
|
||||
|
||||
<ng-template matStepLabel>PREVIEW</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.PREVIEW' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-preview-step
|
||||
[shareProductsTemplate]="shareProductsTemplate"
|
||||
|
||||
+5
-2
@@ -14,6 +14,7 @@ import { ShareProductAccountingStepComponent } from '../share-product-stepper/sh
|
||||
/** Custom Services */
|
||||
import { ProductsService } from 'app/products/products.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Accounting } from 'app/core/utils/accounting';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-create-share-product',
|
||||
@@ -31,7 +32,7 @@ export class CreateShareProductComponent implements OnInit {
|
||||
@ViewChild(ShareProductAccountingStepComponent, { static: true }) shareProductAccountingStep: ShareProductAccountingStepComponent;
|
||||
|
||||
shareProductsTemplate: any;
|
||||
accountingRuleData = ['None', 'Cash'];
|
||||
accountingRuleData: string[] = [];
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -43,10 +44,12 @@ export class CreateShareProductComponent implements OnInit {
|
||||
constructor(private route: ActivatedRoute,
|
||||
private productsService: ProductsService,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
private settingsService: SettingsService,
|
||||
private accounting: Accounting) {
|
||||
this.route.data.subscribe((data: { shareProductsTemplate: any }) => {
|
||||
this.shareProductsTemplate = data.shareProductsTemplate;
|
||||
});
|
||||
this.accountingRuleData = this.accounting.getAccountingRulesForShares();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
+8
-8
@@ -24,7 +24,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductDetailsForm" completed>
|
||||
|
||||
<ng-template matStepLabel>DETAILS</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.DETAILS' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-details-step [shareProductsTemplate]="shareProductAndTemplate"></mifosx-share-product-details-step>
|
||||
|
||||
@@ -32,7 +32,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductCurrencyForm" completed>
|
||||
|
||||
<ng-template matStepLabel>CURRENCY</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.CURRENCY' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-currency-step [shareProductsTemplate]="shareProductAndTemplate"></mifosx-share-product-currency-step>
|
||||
|
||||
@@ -40,7 +40,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductTermsForm" completed>
|
||||
|
||||
<ng-template matStepLabel>TERMS</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.TERMS' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-terms-step [shareProductsTemplate]="shareProductAndTemplate"></mifosx-share-product-terms-step>
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductSettingsForm" completed>
|
||||
|
||||
<ng-template matStepLabel>SETTINGS</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.SETTINGS' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-settings-step [shareProductsTemplate]="shareProductAndTemplate"></mifosx-share-product-settings-step>
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductMarketPriceForm" completed>
|
||||
|
||||
<ng-template matStepLabel>MARKET PRICE</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.MARKET PRICE' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-market-price-step [shareProductsTemplate]="shareProductAndTemplate"></mifosx-share-product-market-price-step>
|
||||
|
||||
@@ -64,7 +64,7 @@
|
||||
|
||||
<mat-step completed>
|
||||
|
||||
<ng-template matStepLabel>CHARGES</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.CHARGES' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-charges-step
|
||||
[shareProductsTemplate]="shareProductAndTemplate"
|
||||
@@ -76,7 +76,7 @@
|
||||
|
||||
<mat-step [stepControl]="shareProductAccountingForm" completed>
|
||||
|
||||
<ng-template matStepLabel>ACCOUNTING</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.ACCOUNTING' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-accounting-step
|
||||
[shareProductsTemplate]="shareProductAndTemplate"
|
||||
@@ -89,7 +89,7 @@
|
||||
|
||||
<mat-step state="preview" *ngIf="shareProductFormValidAndNotPristine" completed>
|
||||
|
||||
<ng-template matStepLabel>PREVIEW</ng-template>
|
||||
<ng-template matStepLabel>{{'labels.inputs.PREVIEW' | translate}}</ng-template>
|
||||
|
||||
<mifosx-share-product-preview-step
|
||||
[shareProductsTemplate]="shareProductAndTemplate"
|
||||
|
||||
@@ -14,6 +14,7 @@ import { ShareProductAccountingStepComponent } from '../share-product-stepper/sh
|
||||
/** Custom Services */
|
||||
import { ProductsService } from 'app/products/products.service';
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Accounting } from 'app/core/utils/accounting';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-edit-share-product',
|
||||
@@ -31,7 +32,7 @@ export class EditShareProductComponent implements OnInit {
|
||||
@ViewChild(ShareProductAccountingStepComponent, { static: true }) shareProductAccountingStep: ShareProductAccountingStepComponent;
|
||||
|
||||
shareProductAndTemplate: any;
|
||||
accountingRuleData = ['None', 'Cash'];
|
||||
accountingRuleData: string[] = [];
|
||||
|
||||
/**
|
||||
* @param {ActivatedRoute} route Activated Route.
|
||||
@@ -43,10 +44,12 @@ export class EditShareProductComponent implements OnInit {
|
||||
constructor(private route: ActivatedRoute,
|
||||
private productsService: ProductsService,
|
||||
private router: Router,
|
||||
private settingsService: SettingsService) {
|
||||
private settingsService: SettingsService,
|
||||
private accounting: Accounting) {
|
||||
this.route.data.subscribe((data: { shareProductAndTemplate: any }) => {
|
||||
this.shareProductAndTemplate = data.shareProductAndTemplate;
|
||||
});
|
||||
this.accountingRuleData = this.accounting.getAccountingRulesForShares();
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
+23
-51
@@ -4,7 +4,7 @@
|
||||
|
||||
<mat-radio-group fxFlex="98%" fxLayout="row" fxLayoutGap="5%" fxLayout.lt-md="column" formControlName="accountingRule">
|
||||
<mat-radio-button *ngFor="let accountingRule of accountingRuleData; let i = index" [value]="i+1">
|
||||
{{ accountingRule }}
|
||||
{{ 'labels.accounting.' + accountingRule | translate }}
|
||||
</mat-radio-button>
|
||||
</mat-radio-group>
|
||||
|
||||
@@ -12,67 +12,39 @@
|
||||
|
||||
<div *ngIf="shareProductAccountingForm.value.accountingRule === 2" fxFlexFill fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">Assets</h4>
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Assets' | translate}}</h4>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Share reference</mat-label>
|
||||
<mat-select formControlName="shareReferenceId" required>
|
||||
<mat-option *ngFor="let assetAccount of assetAccountData" [value]="assetAccount.id">
|
||||
({{ assetAccount.glCode }}) {{ assetAccount.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
Share reference is <strong>required</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mifosx-gl-account-selector fxFlex="48%"
|
||||
[inputFormControl]="shareProductAccountingForm.controls.shareReferenceId"
|
||||
[glAccountList]="assetAccountData" [required]="true" [inputLabel]="'Share reference'">
|
||||
</mifosx-gl-account-selector>
|
||||
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">Liabilities</h4>
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Liabilities' | translate}}</h4>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Share suspense control</mat-label>
|
||||
<mat-select formControlName="shareSuspenseId" required>
|
||||
<mat-option *ngFor="let liabilityAccount of liabilityAccountData" [value]="liabilityAccount.id">
|
||||
({{ liabilityAccount.glCode }}) {{ liabilityAccount.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
Share suspense control is <strong>required</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mifosx-gl-account-selector fxFlex="48%"
|
||||
[inputFormControl]="shareProductAccountingForm.controls.shareSuspenseId"
|
||||
[glAccountList]="liabilityAccountData" [required]="true" [inputLabel]="'Share suspense control'">
|
||||
</mifosx-gl-account-selector>
|
||||
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">Share Equity</h4>
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Share Equity' | translate}}</h4>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Equity</mat-label>
|
||||
<mat-select formControlName="shareEquityId" required>
|
||||
<mat-option *ngFor="let equityAccount of equityAccountData" [value]="equityAccount.id">
|
||||
({{ equityAccount.glCode }}) {{ equityAccount.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
Equity is <strong>required</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mifosx-gl-account-selector fxFlex="48%"
|
||||
[inputFormControl]="shareProductAccountingForm.controls.shareEquityId"
|
||||
[glAccountList]="equityAccountData" [required]="true" [inputLabel]="'Equity'">
|
||||
</mifosx-gl-account-selector>
|
||||
|
||||
<mat-divider fxFlex="98%"></mat-divider>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">Income</h4>
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.heading.Income' | translate}}</h4>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Income from fees</mat-label>
|
||||
<mat-select formControlName="incomeFromFeeAccountId" required>
|
||||
<mat-option *ngFor="let incomeAccount of incomeAccountData" [value]="incomeAccount.id">
|
||||
({{ incomeAccount.glCode }}) {{ incomeAccount.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
Income from fees is <strong>required</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
<mifosx-gl-account-selector fxFlex="48%"
|
||||
[inputFormControl]="shareProductAccountingForm.controls.incomeFromFeeAccountId"
|
||||
[glAccountList]="incomeAccountData" [required]="true" [inputLabel]="'Income from fees'">
|
||||
</mifosx-gl-account-selector>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -81,10 +53,10 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext [disabled]="!shareProductFormValid">
|
||||
Next
|
||||
{{'labels.buttons.Next' | translate}}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+12
-12
@@ -1,7 +1,7 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Charge</mat-label>
|
||||
<mat-label>{{'labels.inputs.Charge' | translate}}</mat-label>
|
||||
<mat-select #charge>
|
||||
<mat-option *ngFor="let charge of chargeData | chargesFilter:chargesDataSource:currencyCode.value" [value]="charge">
|
||||
{{ charge.name }}
|
||||
@@ -12,42 +12,42 @@
|
||||
<div fxFlex="48%" fxFlexAlign="center">
|
||||
<button type="button" mat-raised-button color="primary" (click)="addCharge(charge)" [disabled]="!charge.value">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>
|
||||
Add
|
||||
{{'labels.buttons.Add' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table fxFlex="98%" class="mat-elevation-z1" mat-table [dataSource]="chargesDataSource" [hidden]="chargesDataSource.length === 0">
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> Name </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Name' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.name + ', ' + charge.currency.displaySymbol }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeCalculationType">
|
||||
<th mat-header-cell *matHeaderCellDef> Type </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Type' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value }}
|
||||
{{ charge.chargeCalculationType.value | translateCatalog }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> Amount </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Amount' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount }}
|
||||
{{ charge.amount | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeTimeType">
|
||||
<th mat-header-cell *matHeaderCellDef> Collected On </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Collected On' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeTimeType.value }}
|
||||
{{ charge.chargeTimeType.value | translateCatalog }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="action">
|
||||
<th mat-header-cell *matHeaderCellDef> Actions </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Actions' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
<button mat-icon-button color="warn" (click)="deleteCharge(charge)">
|
||||
<fa-icon icon="trash"></fa-icon>
|
||||
@@ -65,10 +65,10 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext>
|
||||
Next
|
||||
{{'labels.buttons.Next' | translate}}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+8
-8
@@ -3,30 +3,30 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Currency</mat-label>
|
||||
<mat-label>{{'labels.inputs.Currency' | translate}}</mat-label>
|
||||
<mat-select matTooltip="The currency to be used" formControlName="currencyCode" required>
|
||||
<mat-option *ngFor="let currency of currencyData" [value]="currency.code">
|
||||
{{ currency.name }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
<mat-error>
|
||||
Currency is <strong>required</strong>
|
||||
{{'labels.inputs.Currency' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Decimal Places</mat-label>
|
||||
<mat-label>{{'labels.inputs.Decimal Places' | translate}}</mat-label>
|
||||
<input type="number" matTooltip="The number of decimal places to be used to track and report on share accounts" matInput formControlName="digitsAfterDecimal" required>
|
||||
<mat-error>
|
||||
Decimal Places is <strong>required</strong>
|
||||
{{'labels.inputs.Decimal Places' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Currency in multiples of</mat-label>
|
||||
<mat-label>{{'labels.inputs.Currency in multiples of' | translate}}</mat-label>
|
||||
<input type="number" matInput matTooltip="The amount to be rounded off (example: 100 rounds off to 200, 300, 400, etc)" formControlName="inMultiplesOf" required>
|
||||
<mat-error>
|
||||
Currency in multiples of is <strong>required</strong>
|
||||
{{'labels.inputs.Currency in multiples of' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -35,10 +35,10 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext>
|
||||
Next
|
||||
{{'labels.buttons.Next' | translate}}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -3,23 +3,23 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Product Name</mat-label>
|
||||
<mat-label>{{'labels.inputs.Product Name' | translate}}</mat-label>
|
||||
<input matInput formControlName="name" matTooltip="A unique identifier for the share product" required>
|
||||
<mat-error>
|
||||
Product Name is <strong>required</strong>
|
||||
{{'labels.inputs.Product Name' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Short Name</mat-label>
|
||||
<mat-label>{{'labels.inputs.Short Name' | translate}}</mat-label>
|
||||
<input matInput formControlName="shortName" matTooltip="A unique identifier for the share product" maxlength="4" required>
|
||||
<mat-error>
|
||||
Short Name is <strong>required</strong>
|
||||
{{'labels.inputs.Short Name' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="98%">
|
||||
<mat-label>Description</mat-label>
|
||||
<mat-label>{{'labels.inputs.Description' | translate}}</mat-label>
|
||||
<textarea matInput formControlName="description" matTooltip="Provides additional information regarding the purpose and characteristics of the share product" required></textarea>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -28,10 +28,10 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious disabled>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext>
|
||||
Next
|
||||
{{'labels.buttons.Next' | translate}}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+7
-7
@@ -1,32 +1,32 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<h4 fxFlex="23%" class="mat-h4">Market Price Periods <i class="fas fa-question" matTooltip="Add future share value with date range"></i></h4>
|
||||
<h4 fxFlex="23%" class="mat-h4">{{'labels.inputs.Market Price Period' | translate}} <i class="fas fa-question" matTooltip="Add future share value with date range"></i></h4>
|
||||
|
||||
<div fxFlex="73%">
|
||||
<button type="button" mat-raised-button color="primary" (click)="addMarketPricePeriod()">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>
|
||||
Add
|
||||
{{'labels.buttons.Add' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<table fxFlex="98%" class="mat-elevation-z1" mat-table [dataSource]="marketPricePeriods.value" *ngIf="marketPricePeriods.value.length">
|
||||
|
||||
<ng-container matColumnDef="fromDate">
|
||||
<th mat-header-cell *matHeaderCellDef> From Date </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.From Date' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let marketPricePeriod">
|
||||
{{ marketPricePeriod.fromDate | dateFormat }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="shareValue">
|
||||
<th mat-header-cell *matHeaderCellDef> Nominal/Unit Price </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Nominal/Unit Price' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let marketPricePeriod">
|
||||
{{ marketPricePeriod.shareValue }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="actions">
|
||||
<th mat-header-cell *matHeaderCellDef> Actions </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Actions' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let variation; let i = index">
|
||||
<button mat-icon-button color="primary" (click)="editMarketPricePeriod(i)">
|
||||
<fa-icon icon="edit"></fa-icon>
|
||||
@@ -47,10 +47,10 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext>
|
||||
Next
|
||||
{{'labels.buttons.Next' | translate}}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+6
-4
@@ -14,6 +14,7 @@ import { InputBase } from 'app/shared/form-dialog/formfield/model/input-base';
|
||||
/** Custom Services */
|
||||
import { SettingsService } from 'app/settings/settings.service';
|
||||
import { Dates } from 'app/core/utils/dates';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-share-product-market-price-step',
|
||||
@@ -38,7 +39,8 @@ export class ShareProductMarketPriceStepComponent implements OnInit {
|
||||
constructor(private formBuilder: UntypedFormBuilder,
|
||||
public dialog: MatDialog,
|
||||
private dateUtils: Dates,
|
||||
private settingsService: SettingsService) {
|
||||
private settingsService: SettingsService,
|
||||
private translateService: TranslateService) {
|
||||
this.createShareProductMarketPriceForm();
|
||||
}
|
||||
|
||||
@@ -99,14 +101,14 @@ export class ShareProductMarketPriceStepComponent implements OnInit {
|
||||
}
|
||||
|
||||
getData(values?: any) {
|
||||
return { title: 'Market Price Period', formfields: this.getFormfields(values) };
|
||||
return { title: this.translateService.instant('labels.inputs.Market Price Period'), formfields: this.getFormfields(values) };
|
||||
}
|
||||
|
||||
getFormfields(values?: any) {
|
||||
const formfields: FormfieldBase[] = [
|
||||
new DatepickerBase({
|
||||
controlName: 'fromDate',
|
||||
label: 'From Date',
|
||||
label: this.translateService.instant('labels.inputs.From Date'),
|
||||
value: values ? values.fromDate : undefined,
|
||||
maxDate: new Date(new Date().setFullYear(new Date().getFullYear() + 10)),
|
||||
required: true,
|
||||
@@ -114,7 +116,7 @@ export class ShareProductMarketPriceStepComponent implements OnInit {
|
||||
}),
|
||||
new InputBase({
|
||||
controlName: 'shareValue',
|
||||
label: 'Nominal/Unit Price',
|
||||
label: this.translateService.instant('labels.inputs.Nominal/Unit Price'),
|
||||
value: values ? values.shareValue : undefined,
|
||||
type: 'number',
|
||||
required: true,
|
||||
|
||||
+46
-46
@@ -4,106 +4,106 @@
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Details</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Details' | translate}}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Short Name:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Short Name' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shortName }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.description">
|
||||
<span fxFlex="40%">Description:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Description' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.description }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Currency</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Currency' | translate}}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Currency:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Currency' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.currencyCode | find:shareProductsTemplate.currencyOptions:'code':'name' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Decimal Places:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Decimal Places' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.digitsAfterDecimal }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Currency in multiples of:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Currency in multiples of' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.inMultiplesOf }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Terms</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Terms' | translate}}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Total Number of Shares:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.totalShares }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Total Number of Shares' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.totalShares | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Shares to be Issued:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.sharesIssued }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Shares to be Issued' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.sharesIssued | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Nominal/Unit Price:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.unitPrice }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Nominal/Unit Price' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.unitPrice | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Capital Value:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shareCapital }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Capital Value' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shareCapital | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Settings</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Settings' | translate}}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Shares per Client:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Shares per Client' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.nominalShares + ' (Min: ' + (shareProduct.minimumShares ? shareProduct.minimumShares : shareProduct.nominalShares) + ', Max: ' + (shareProduct.maximumShares ? shareProduct.maximumShares : shareProduct.nominalShares) + ')' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.minimumActivePeriodForDividends">
|
||||
<span fxFlex="40%">Minimum Active Period:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Minimum Active Period' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.minimumActivePeriodForDividends + ' ' + (shareProduct.minimumactiveperiodFrequencyType | find:shareProductsTemplate.minimumActivePeriodFrequencyTypeOptions:'id':'value') }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.lockinPeriodFrequency">
|
||||
<span fxFlex="40%">Lock-in Period:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Lock-in Period' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.lockinPeriodFrequency + ' ' + (shareProduct.lockinPeriodFrequencyType | find:shareProductsTemplate.lockinPeriodFrequencyTypeOptions:'id':'value') }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Allow dividends for inactive clients:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Allow dividends for inactive clients' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.allowDividendCalculationForInactiveClients | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.marketPricePeriods.length" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Market Price Periods</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.inputs.Market Price Period' | translate}}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="shareProduct.marketPricePeriods">
|
||||
|
||||
<ng-container matColumnDef="fromDate">
|
||||
<th mat-header-cell *matHeaderCellDef> From Date </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.From Date' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let marketPricePeriod">
|
||||
{{ marketPricePeriod.fromDate | dateFormat }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="shareValue">
|
||||
<th mat-header-cell *matHeaderCellDef> Nominal/Unit Price </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Nominal/Unit Price' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let marketPricePeriod">
|
||||
{{ marketPricePeriod.shareValue }}
|
||||
{{ marketPricePeriod.shareValue | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
@@ -116,37 +116,37 @@
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.chargesSelected.length" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Charges</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Charges' | translate}}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="shareProduct.chargesSelected">
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> Name </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Name' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.name + ', ' + charge.currency.displaySymbol }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeCalculationType">
|
||||
<th mat-header-cell *matHeaderCellDef> Type </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Type' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value }}
|
||||
{{ charge.chargeCalculationType.value | translateCatalog }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> Amount </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Amount' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount }}
|
||||
{{ charge.amount | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeTimeType">
|
||||
<th mat-header-cell *matHeaderCellDef> Collected On </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Collected On' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeTimeType.value }}
|
||||
{{ charge.chargeTimeType.value | translateCatalog }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
@@ -157,42 +157,42 @@
|
||||
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Accounting</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Accounting' | translate}}</h3>
|
||||
|
||||
<mat-divider fxFlexFill></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Type:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Type' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ accountingRuleData[shareProduct.accountingRule-1] }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.accountingRule === 2" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Assets</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Assets' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Share reference:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Share reference' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shareReferenceId | find:shareProductsTemplate.accountingMappingOptions.assetAccountOptions:'id':'name' }}</span>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Liabilities</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Liabilities' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Share suspense control:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Share suspense control' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shareSuspenseId | find:shareProductsTemplate.accountingMappingOptions.liabilityAccountOptions:'id':'name' }}</span>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Share Equity</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Share Equity' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Equity:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Equity' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shareEquityId | find:shareProductsTemplate.accountingMappingOptions.equityAccountOptions:'id':'name' }}</span>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Income</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Income' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Income from fees:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Income from fees' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.incomeFromFeeAccountId | find:shareProductsTemplate.accountingMappingOptions.incomeAccountOptions:'id':'name' }}</span>
|
||||
</div>
|
||||
|
||||
@@ -203,12 +203,12 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button [routerLink]="['../']">
|
||||
Cancel
|
||||
{{'labels.buttons.Cancel' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" (click)="submit.emit()" *mifosxHasPermission="taskPermission">
|
||||
Submit
|
||||
{{'labels.buttons.Submit' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+16
-16
@@ -2,60 +2,60 @@
|
||||
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">Shares per Client <i class="fas fa-question" matTooltip="These fields are used to define the minimum, default, maximum shares per customer"></i></h4>
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.inputs.Shares per Client' | translate}} <i class="fas fa-question" matTooltip="These fields are used to define the minimum, default, maximum shares per customer"></i></h4>
|
||||
|
||||
<mat-form-field fxFlex="31%">
|
||||
<mat-label>Minimum</mat-label>
|
||||
<mat-label>{{'labels.inputs.Minimum' | translate}}</mat-label>
|
||||
<input type="number" matInput formControlName="minimumShares">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="31%">
|
||||
<mat-label>Default</mat-label>
|
||||
<mat-label>{{'labels.inputs.Default' | translate}}</mat-label>
|
||||
<input type="number" matInput formControlName="nominalShares" required>
|
||||
<mat-error>
|
||||
Default Shares per Client is <strong>required</strong>
|
||||
{{'labels.inputs.Default Shares per Client' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="31%">
|
||||
<mat-label>Maximum</mat-label>
|
||||
<mat-label>{{'labels.inputs.Maximum' | translate}}</mat-label>
|
||||
<input type="number" matInput formControlName="maximumShares">
|
||||
</mat-form-field>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">Minimum Active Period <i class="fas fa-question" matTooltip="Minimum active period to consider for dividend calculations"></i></h4>
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.inputs.Minimum Active Period' | translate}} <i class="fas fa-question" matTooltip="Minimum active period to consider for dividend calculations"></i></h4>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Frequency</mat-label>
|
||||
<mat-label>{{'labels.inputs.Frequency' | translate}}</mat-label>
|
||||
<input type="number" matInput formControlName="minimumActivePeriodForDividends">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Type</mat-label>
|
||||
<mat-label>{{'labels.inputs.Type' | translate}}</mat-label>
|
||||
<mat-select formControlName="minimumactiveperiodFrequencyType">
|
||||
<mat-option *ngFor="let minimumActivePeriodFrequencyType of minimumActivePeriodFrequencyTypeData" [value]="minimumActivePeriodFrequencyType.id">
|
||||
{{ minimumActivePeriodFrequencyType.value }}
|
||||
{{ minimumActivePeriodFrequencyType.value | translateCatalog }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<h4 fxFlex="98%" class="mat-h4">Lock-in Period <i class="fas fa-question" matTooltip="Used to indicate the length of time that a share account of this share product type is locked-in and redeems are not allowed"></i></h4>
|
||||
<h4 fxFlex="98%" class="mat-h4">{{'labels.inputs.Lock-in Period' | translate}} <i class="fas fa-question" matTooltip="Used to indicate the length of time that a share account of this share product type is locked-in and redeems are not allowed"></i></h4>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Frequency</mat-label>
|
||||
<mat-label>{{'labels.inputs.Frequency' | translate}}</mat-label>
|
||||
<input type="number" matInput formControlName="lockinPeriodFrequency">
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Type</mat-label>
|
||||
<mat-label>{{'labels.inputs.Type' | translate}}</mat-label>
|
||||
<mat-select formControlName="lockinPeriodFrequencyType">
|
||||
<mat-option *ngFor="let lockinPeriodFrequencyType of lockinPeriodFrequencyTypeData" [value]="lockinPeriodFrequencyType.id">
|
||||
{{ lockinPeriodFrequencyType.value }}
|
||||
{{ lockinPeriodFrequencyType.value | translateCatalog }}
|
||||
</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-checkbox fxFlex="98%" class="margin-v" labelPosition="before" matTooltip="Indicates whether the dividends can be processed even share account of this share product is inactive" formControlName="allowDividendCalculationForInactiveClients">
|
||||
Allow dividends for inactive clients
|
||||
{{'labels.inputs.Allow dividends for inactive clients' | translate}}
|
||||
</mat-checkbox>
|
||||
|
||||
</div>
|
||||
@@ -63,10 +63,10 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext>
|
||||
Next
|
||||
{{'labels.buttons.Next' | translate}}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
+10
-10
@@ -3,34 +3,34 @@
|
||||
<div fxLayout="row wrap" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Total Number of Shares</mat-label>
|
||||
<mat-label>{{'labels.inputs.Total Number of Shares' | translate}}</mat-label>
|
||||
<input type="number" matInput matTooltip="Total number of shares that a product is offering" formControlName="totalShares" required>
|
||||
<mat-error>
|
||||
Total Number of Shares is <strong>required</strong>
|
||||
{{'labels.inputs.Total Number of Shares' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Shares to be Issued</mat-label>
|
||||
<mat-label>{{'labels.inputs.Shares to be Issued' | translate}}</mat-label>
|
||||
<input type="number" matInput matTooltip="Total number of shares that an orgranization wants to issue to it's clients" formControlName="sharesIssued" required>
|
||||
<mat-error>
|
||||
Shares to be Issued is <strong>required</strong>
|
||||
{{'labels.inputs.Shares to be Issued' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Nominal/Unit Price</mat-label>
|
||||
<mat-label>{{'labels.inputs.Nominal/Unit Price' | translate}}</mat-label>
|
||||
<input type="number" matInput matTooltip="Unit/Nominal Price of each share" formControlName="unitPrice" required>
|
||||
<mat-error>
|
||||
Nominal Price is <strong>required</strong>
|
||||
{{'labels.inputs.Nominal Price' | translate}} {{'labels.commons.is' | translate}} <strong>{{'labels.commons.required' | translate}}</strong>
|
||||
</mat-error>
|
||||
</mat-form-field>
|
||||
|
||||
<mat-form-field fxFlex="48%">
|
||||
<mat-label>Capital Value</mat-label>
|
||||
<mat-label>{{'labels.inputs.Capital Value' | translate}}</mat-label>
|
||||
<input type="number" matInput matTooltip="Total Capital Value" formControlName="shareCapital" readonly>
|
||||
<mat-hint>
|
||||
Shares to be Issued * Nominal Price (Auto calculated)
|
||||
{{'labels.inputs.Shares to be Issued * Nominal Price (Auto calculated)' | translate}}
|
||||
</mat-hint>
|
||||
</mat-form-field>
|
||||
|
||||
@@ -39,10 +39,10 @@
|
||||
<div fxLayout="row" class="margin-t" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="2%">
|
||||
<button mat-raised-button matStepperPrevious>
|
||||
<fa-icon icon="arrow-left" class="m-r-10"></fa-icon>
|
||||
Previous
|
||||
{{'labels.buttons.Previous' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button matStepperNext>
|
||||
Next
|
||||
{{'labels.buttons.Next' | translate}}
|
||||
<fa-icon icon="arrow-right" class="m-l-10"></fa-icon>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div #buttonCreateShareProduct class="in-block">
|
||||
<button mat-raised-button color="primary" [routerLink]="['create']" *mifosxHasPermission="'CREATE_SHAREPRODUCT'">
|
||||
<fa-icon icon="plus" class="m-r-10"></fa-icon>
|
||||
Create Share Product
|
||||
{{ 'labels.buttons.Create Share Product' | translate }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -21,17 +21,17 @@
|
||||
<table mat-table [dataSource]="dataSource" matSort>
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Name </th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Name' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let shareProduct"> {{ shareProduct.name }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="shortName">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Short Name </th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Short Name' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let shareProduct"> {{ shareProduct.shortName }} </td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="totalShares">
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> Total Shares </th>
|
||||
<th mat-header-cell *matHeaderCellDef mat-sort-header> {{ 'labels.inputs.Total Shares' | translate }} </th>
|
||||
<td mat-cell *matCellDef="let shareProduct"> {{ shareProduct.totalShares }} </td>
|
||||
</ng-container>
|
||||
|
||||
@@ -47,29 +47,29 @@
|
||||
</div>
|
||||
|
||||
<ng-template #templateButtonCreateShareProduct let-popover="popover">
|
||||
<h2>Create share product</h2>
|
||||
<h2>{{ 'labels.buttons.Create Share Product' | translate }}</h2>
|
||||
<p class="mw300">This option allows you to create new share product.</p>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();previousStep()">Back</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">Next</button>
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">{{ 'labels.buttons.Close' | translate }}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();previousStep()">{{ 'labels.buttons.Back' | translate }}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">{{ 'labels.buttons.Next' | translate }}</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #templateFilter let-popover="popover">
|
||||
<h4>Search bar to filter share products.</h4>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateButtonCreateShareProduct,buttonCreateShareProduct , 'bottom', true)">Back</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateShareProductsTable,shareProductsTable, 'top', true)">Next</button>
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">{{ 'labels.buttons.Close' | translate }}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateButtonCreateShareProduct,buttonCreateShareProduct , 'bottom', true)">{{ 'labels.buttons.Back' | translate }}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateShareProductsTable,shareProductsTable, 'top', true)">{{ 'labels.buttons.Next' | translate }}</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
<ng-template #templateShareProductsTable let-popover="popover">
|
||||
<h4 class="mw300">List of share products in the organization. For more details click: <a href="https://mifosforge.jira.com/wiki/spaces/docs/pages/129531946/Share+products" target="_blank">Share Products</a></h4>
|
||||
<h4 class="mw300">List of share products in the organization. For more details click: <a href="https://mifosforge.jira.com/wiki/spaces/docs/pages/129531946/Share+products" target="_blank">{{ 'labels.buttons.Share Products' | translate }}</a></h4>
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column">
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">Close</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">Back</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();nextStep()">Next</button>
|
||||
<button mat-raised-button color="warn" (click)="popover.close();configurationWizardService.closeConfigWizard()">{{ 'labels.buttons.Close' | translate }}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();showPopover(templateFilter,filter, 'bottom', true)">{{ 'labels.buttons.Back' | translate }}</button>
|
||||
<button mat-raised-button color="primary" (click)="popover.close();nextStep()">{{ 'labels.buttons.Next' | translate }}</button>
|
||||
</div>
|
||||
</ng-template>
|
||||
|
||||
+55
-51
@@ -1,11 +1,11 @@
|
||||
<div fxLayout="row" fxLayoutAlign="end" fxLayoutGap="2%" fxLayout.lt-md="column" class="container m-b-20">
|
||||
<button mat-raised-button color="primary" [routerLink]="['../edit']" *mifosxHasPermission="'UPDATE_SHAREPRODUCT'">
|
||||
<fa-icon icon="edit" class="m-r-10"></fa-icon>
|
||||
Edit
|
||||
{{'labels.buttons.Edit' | translate}}
|
||||
</button>
|
||||
<button mat-raised-button color="primary" [routerLink]="['../dividends']" *mifosxHasPermission="'UPDATE_SHAREPRODUCT'">
|
||||
<fa-icon icon="hand-holding-usd" class="m-r-10"></fa-icon>
|
||||
Dividends
|
||||
{{'labels.buttons.Dividends' | translate}}
|
||||
</button>
|
||||
</div>
|
||||
|
||||
@@ -21,106 +21,106 @@
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Details</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.inputs.Details' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Short Name:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Short Name' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shortName }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.description">
|
||||
<span fxFlex="40%">Description:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Description' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.description }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Currency</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Currency' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Currency:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Currency' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.currency.name }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Decimal Places:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Decimal Places' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.currency.decimalPlaces }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Currency in multiples of:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Currency in multiples of' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.currency.inMultiplesOf }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Terms</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Terms' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Total Number of Shares:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.totalShares }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Total Number of Shares' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.totalShares | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Shares to be Issued:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.totalSharesIssued }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Shares to be Issued' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.totalSharesIssued | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Nominal/Unit Price:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.unitPrice }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Nominal/Unit Price' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.unitPrice | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Capital Value:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shareCapital }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Capital Value' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.shareCapital | formatNumber }}</span>
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Settings</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Settings' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Shares per Client:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Shares per Client' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.nominalShares + ' (Min: ' + (shareProduct.minimumShares ? shareProduct.minimumShares : shareProduct.nominalShares) + ', Max: ' + (shareProduct.maximumShares ? shareProduct.maximumShares : shareProduct.nominalShares) + ')' }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.minimumActivePeriod">
|
||||
<span fxFlex="40%">Minimum Active Period:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.minimumActivePeriod + ' ' + shareProduct.minimumActivePeriodForDividendsTypeEnum.value }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Minimum Active Period' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.minimumActivePeriod }} {{ shareProduct.minimumActivePeriodForDividendsTypeEnum.value | translateCatalog }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.lockinPeriod">
|
||||
<span fxFlex="40%">Lock-in Period:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.lockinPeriod + ' ' + shareProduct.lockPeriodTypeEnum.value }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Lock-in Period' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.lockinPeriod }} {{ shareProduct.lockPeriodTypeEnum.value | translateCatalog}}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Allow dividends for inactive clients:</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Allow dividends for inactive clients' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.allowDividendCalculationForInactiveClients | yesNo }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.marketPrice?.length" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Market Price Periods</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.inputs.Market Price Period' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="shareProduct.marketPrice">
|
||||
|
||||
<ng-container matColumnDef="fromDate">
|
||||
<th mat-header-cell *matHeaderCellDef> From Date </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.From Date' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let marketPrice">
|
||||
{{ marketPrice.fromDate | dateFormat }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="shareValue">
|
||||
<th mat-header-cell *matHeaderCellDef> Nominal/Unit Price </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Nominal/Unit Price' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let marketPrice">
|
||||
{{ marketPrice.shareValue }}
|
||||
{{ marketPrice.shareValue | formatNumber }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
@@ -133,37 +133,37 @@
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.charges.length" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Charges</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Charges' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<table fxFlexFill class="mat-elevation-z1" mat-table [dataSource]="shareProduct.charges">
|
||||
|
||||
<ng-container matColumnDef="name">
|
||||
<th mat-header-cell *matHeaderCellDef> Name </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Name' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.name + ', ' + charge.currency.displaySymbol }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeCalculationType">
|
||||
<th mat-header-cell *matHeaderCellDef> Type </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Type' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeCalculationType.value }}
|
||||
{{ charge.chargeCalculationType.value | translateCatalog }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="amount">
|
||||
<th mat-header-cell *matHeaderCellDef> Amount </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Amount' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.amount | numberFormat }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
<ng-container matColumnDef="chargeTimeType">
|
||||
<th mat-header-cell *matHeaderCellDef> Collected On </th>
|
||||
<th mat-header-cell *matHeaderCellDef> {{'labels.inputs.Collected On' | translate}} </th>
|
||||
<td mat-cell *matCellDef="let charge">
|
||||
{{ charge.chargeTimeType.value }}
|
||||
{{ charge.chargeTimeType.value | translateCatalog }}
|
||||
</td>
|
||||
</ng-container>
|
||||
|
||||
@@ -174,43 +174,47 @@
|
||||
|
||||
</div>
|
||||
|
||||
<h3 class="mat-h3" fxFlexFill>Accounting</h3>
|
||||
<h3 class="mat-h3" fxFlexFill>{{'labels.heading.Accounting' | translate}}</h3>
|
||||
|
||||
<mat-divider [inset]="true"></mat-divider>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Type:</span>
|
||||
<span fxFlex="60%">{{ shareProduct.accountingRule.value }}</span>
|
||||
<span fxFlex="40%">{{'labels.inputs.Type' | translate}}:</span>
|
||||
<span fxFlex="60%">{{ 'labels.accounting.' + getAccountingRuleName(shareProduct.accountingRule.value) | translate }}</span>
|
||||
</div>
|
||||
|
||||
<div fxFlexFill *ngIf="shareProduct.accountingRule.id === 2" fxLayout="row wrap" fxLayout.lt-md="column">
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Assets</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Assets' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Share reference:</span>
|
||||
<span fxFlex="60%">({{ shareProduct.accountingMappings.shareReferenceId.glCode }}) {{ shareProduct.accountingMappings.shareReferenceId.name }}</span>
|
||||
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Share reference'"
|
||||
[glAccount]="shareProduct.accountingMappings.shareReferenceId" [withTitle]="'40%'">
|
||||
</mifosx-gl-account-display>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Liabilities</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Liabilities' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Share suspense control:</span>
|
||||
<span fxFlex="60%">({{ shareProduct.accountingMappings.shareSuspenseId.glCode }}) {{ shareProduct.accountingMappings.shareSuspenseId.name }}</span>
|
||||
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Share suspense control'"
|
||||
[glAccount]="shareProduct.accountingMappings.shareSuspenseId" [withTitle]="'40%'">
|
||||
</mifosx-gl-account-display>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Share Equity</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Share Equity' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Equity:</span>
|
||||
<span fxFlex="60%">({{ shareProduct.accountingMappings.shareEquityId.glCode }}) {{ shareProduct.accountingMappings.shareEquityId.name }}</span>
|
||||
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Equity'"
|
||||
[glAccount]="shareProduct.accountingMappings.shareEquityId" [withTitle]="'40%'">
|
||||
</mifosx-gl-account-display>
|
||||
</div>
|
||||
|
||||
<h4 fxFlexFill class="mat-h4">Income</h4>
|
||||
<h4 fxFlexFill class="mat-h4">{{'labels.heading.Income' | translate}}</h4>
|
||||
|
||||
<div fxFlexFill>
|
||||
<span fxFlex="40%">Income from fees:</span>
|
||||
<span fxFlex="60%">({{ shareProduct.accountingMappings.incomeFromFeeAccountId.glCode }}) {{ shareProduct.accountingMappings.incomeFromFeeAccountId.name }}</span>
|
||||
<mifosx-gl-account-display fxFlex="100%" [accountTitle]="'Income from fees'"
|
||||
[glAccount]="shareProduct.accountingMappings.incomeFromFeeAccountId" [withTitle]="'40%'">
|
||||
</mifosx-gl-account-display>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
+7
-1
@@ -1,5 +1,6 @@
|
||||
import { Component, OnInit } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { Accounting } from 'app/core/utils/accounting';
|
||||
|
||||
@Component({
|
||||
selector: 'mifosx-share-product-general-tab',
|
||||
@@ -13,7 +14,8 @@ export class ShareProductGeneralTabComponent implements OnInit {
|
||||
marketPriceDisplayedColumns: string[] = ['fromDate', 'shareValue'];
|
||||
chargesDisplayedColumns: string[] = ['name', 'chargeCalculationType', 'amount', 'chargeTimeType'];
|
||||
|
||||
constructor(private route: ActivatedRoute) {
|
||||
constructor(private route: ActivatedRoute,
|
||||
private accounting: Accounting) {
|
||||
this.route.data.subscribe((data: { shareProduct: any }) => {
|
||||
this.shareProduct = data.shareProduct;
|
||||
});
|
||||
@@ -22,4 +24,8 @@ export class ShareProductGeneralTabComponent implements OnInit {
|
||||
ngOnInit(): void {
|
||||
}
|
||||
|
||||
getAccountingRuleName(value: string): string {
|
||||
return this.accounting.getAccountRuleName(value.toUpperCase());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@
|
||||
<nav mat-tab-nav-bar class="navigation-tabs">
|
||||
<a mat-tab-link [routerLink]="['./general']" routerLinkActive #general="routerLinkActive"
|
||||
[active]="general.isActive">
|
||||
General
|
||||
{{'labels.inputs.General' | translate}}
|
||||
</a>
|
||||
<ng-container *ngFor="let shareProductDatatable of shareProductDatatables">
|
||||
<a mat-tab-link [routerLink]="['./datatables',shareProductDatatable.registeredTableName]" routerLinkActive
|
||||
|
||||
Reference in New Issue
Block a user