Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/campaign' into campaign-for-test
Browse files Browse the repository at this point in the history
  • Loading branch information
ashish-egov committed Jul 31, 2024
2 parents 8cef4b2 + 89e8563 commit 8b021fc
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,13 @@ const BoundaryWithDate = ({ project, props, onSelect, dateReducerDispatch, canDe
withoutLabel={true}
type="date"
value={item?.endDate}
nonEditable={item?.endDate?.length > 0 && today >= item?.endDate && today >= cycleDates?.[index + 1]?.startDate ? true : false}
nonEditable={
item?.endDate?.length > 0 &&
today >= item?.endDate &&
(cycleDates?.[index + 1] ? today >= cycleDates?.[index + 1]?.startDate : true)
? true
: false
}
placeholder={t("HCM_END_DATE")}
populators={{
validation: {
Expand Down
8 changes: 4 additions & 4 deletions utilities/project-factory/src/server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,11 @@ const getDBSchemaName = (dbSchema = "") => {
// Configuration object containing various environment variables
const config = {
cacheTime : 300,
enableDynamicTemplateFor: ["MR-DN"],
isCallGenerateWhenDeliveryConditionsDiffer: true,
enableDynamicTemplateFor: process.env.ENABLE_DYNAMIC_TEMPLATE_FOR || "MR-DN",
isCallGenerateWhenDeliveryConditionsDiffer: process.env.IS_CALL_GENERATE_WHEN_DELIVERY_CONDITIONS_DIFFER || false,
prefixForMicroplanCampaigns: "MP",
excludeHierarchyTypeFromBoundaryCodes: false,
excludeBoundaryNameAtLastFromBoundaryCodes: false,
excludeHierarchyTypeFromBoundaryCodes: process.env.EXCLUDE_HIERARCHY_TYPE_FROM_BOUNDARY_CODES || false,
excludeBoundaryNameAtLastFromBoundaryCodes: process.env.EXCLUDE_BOUNDARY_NAME_AT_LAST_FROM_BOUNDARY_CODES || false,
masterNameForSchemaOfColumnHeaders: "adminSchema",
masterNameForSplitBoundariesOn: "hierarchyConfig",
boundary: {
Expand Down
3 changes: 2 additions & 1 deletion utilities/project-factory/src/server/utils/targetUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ async function updateTargetColumnsIfDeliveryConditionsDifferForSMC(request: any)

function isDynamicTargetTemplateForProjectType(projectType: string) {
const projectTypesFromConfig = config?.enableDynamicTemplateFor;
return projectTypesFromConfig?.includes(projectType) ?? false;
const projectTypesArray = projectTypesFromConfig ? projectTypesFromConfig.split(',') : [];
return projectTypesArray.includes(projectType);
}


Expand Down

0 comments on commit 8b021fc

Please sign in to comment.