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

Added support for Inlinedashboard page #79

Merged
merged 8 commits into from
Nov 20, 2023
Merged

Added support for Inlinedashboard page #79

merged 8 commits into from
Nov 20, 2023

Conversation

4manasa
Copy link
Contributor

@4manasa 4manasa commented Nov 15, 2023

No description provided.

@@ -0,0 +1,26 @@
<div *ngFor="let kid of children">
<div *ngIf="kid.type === 'DateTime'" [formGroup]="rangeFormGroup">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why are you using two formGroups?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the rangeFormGroup and using the existing one.

Comment on lines 15 to 20
<component-mapper [name]="kid.c11nEnv.getPConnect().getComponentName()" [props]="{
pConn$: kid.c11nEnv.getPConnect(),
formGroup$: formGroup$
}"
errorMsg="Promoted filters wants component not yet available: {{ kid.c11nEnv.getPConnect().getComponentName() }}">
</component-mapper>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like formatting is missing here, are you using prettier to format the code?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, might be not used prettier to format for this file.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatted the file with prettier

import { Component, OnInit, Input, forwardRef, SimpleChanges, OnChanges } from '@angular/core';
import { CommonModule } from '@angular/common';
import { FormGroup, FormControl, ReactiveFormsModule } from '@angular/forms';
import { ComponentMapperComponent } from '../../../_bridge/component-mapper/component-mapper.component';
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have library imports at top and local imports at the bottom

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

</div>
</div>
<div class="psdk-inline-list">
<app-region [pConn$]="children[0].getPConnect()"></app-region>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use component mapper to load Region component

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 314 to 321
let payload = {};
if (this.payload) {
payload = this.payload;
} else if (this.filterPayload) {
payload = this.filterPayload;
} else {
payload = {};
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
let payload = {};
if (this.payload) {
payload = this.payload;
} else if (this.filterPayload) {
payload = this.filterPayload;
} else {
payload = {};
}
const payload = this.payload || this.filterPayload || {}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 5 to 6


Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minor: remove extra line break

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 139 to 159
export function getLayoutDataFromRegion(regionData) {
const defaultLayoutConfig = {
width: 'full',
fillAvailable: true,
minWidth: [300, 'px']
};

return regionData.props
?.getPConnect()
?.getChildren()
?.map((item, index) => {
const itemPConnect = item?.getPConnect();

return {
id: itemPConnect?.getComponentName()
? `${itemPConnect.getComponentName()}--${index}`
: `item--${index}`,
content: itemPConnect?.getComponent(),
layoutConfig: {
...defaultLayoutConfig,
...itemPConnect?.getConfigProps().layoutConfig
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this method is not getting used anywhere in the code, please remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

return filterComponents;
};

export const convertDateToGMT = value => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This method is not used anywhere, please remove it

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed

@@ -0,0 +1,29 @@
<div *ngFor="let kid of children">
<div *ngIf="kid.type === 'DateTime'" [formGroup]="formGroup$">
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you change the name of formGroup$ to filtersFormGroup$ which differentiates with case form formGroup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Comment on lines 9 to 12
<app-dashboard-filter [children]="children[1]" [formGroup$]="formGroup$" [ngClass]="{
'psdk-block-style': inlineProps.filterPosition === 'block-start'
}"></app-dashboard-filter>
</div>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatting missing

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Copy link
Collaborator

@tumms2021389 tumms2021389 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Found an issue in the Work Status filter, as @4manasa mentioned it was not related to Inline Dashboard, approving this PR

@4manasa 4manasa merged commit 0c552fc into master Nov 20, 2023
2 checks passed
@tumms2021389 tumms2021389 deleted the mod/tor/US-555765 branch March 20, 2024 07:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants