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

Pagination added to microplan search and my microplan #1706

Open
wants to merge 7 commits into
base: console
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const defaultSearchValues = {
showTab: true, // setting true will enable tab screen
TabSearchconfig: [ // all tab config should be added in json array
{
label: "MY_MICROPLANS",
label: "MY_MICROPLANS_HEADER",
type: "search",
apiDetails: {
serviceName: "/plan-service/config/_search",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ export const UICustomizations = {
<p>{t(value)}</p>
</div>
);

abishekTa-egov marked this conversation as resolved.
Show resolved Hide resolved
} else {
return (
<div>
Expand Down Expand Up @@ -256,7 +257,7 @@ export const UICustomizations = {
variation="secondary"
icon={"ArrowForward"}
type="button"
isDisabled={!hasRequiredRole}
isDisabled={!hasRequiredRole && row.status!="RESOURCE_ESTIMATIONS_APPROVED"}
abishekTa-egov marked this conversation as resolved.
Show resolved Hide resolved
className="dm-workbench-download-template-btn dm-hover"
onClick={(e) => onActionSelect("START", row)}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ const SearchSavedPlans = async (body) => {
});
const finalResponse = {
PlanConfiguration: mergePlanAndCampaign(responsePlan?.PlanConfiguration, "campaignDetails", responseCampaign?.CampaignDetails),
TotalCount:responsePlan?.TotalCount || 0
};
return finalResponse;
} catch (error) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,11 @@ const SearchSavedPlansWithCampaign = async (body) => {
});
const finalResponse = {
PlanConfiguration: mergePlanAndCampaign(responsePlan?.PlanConfiguration, "campaignDetails", responseCampaign?.CampaignDetails),
totalCount:responsePlan?.TotalCount || 0
};
return finalResponse;
} catch (error) {

if (error?.response?.data?.Errors) {
throw new Error(error.response.data.Errors[0].message);
}
Expand Down