Skip to content

Commit

Permalink
Merge pull request #1110 from deepa-s-13/Dev-2.0
Browse files Browse the repository at this point in the history
OBPAS Changes
  • Loading branch information
sriranjan-s authored May 28, 2024
2 parents 2055410 + b7eda3e commit 64ab920
Show file tree
Hide file tree
Showing 6 changed files with 95 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,25 @@ export const convertEpochToDate = (dateEpoch) => {
currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate()
);
let reqData = { ...bpaDataDetails, edcrDetail: [{ ...edcrData }] };
console.log("reqData",reqData)
const state = Digit.ULBService.getStateId();

let count=0;
for(let i=0;i<workflowDetails?.data?.processInstances?.length;i++){
if(workflowDetails?.data?.processInstances[i]?.action==="PAY" && count==0 ){
reqData.additionalDetails.submissionDate=workflowDetails?.data?.processInstances[i]?.auditDetails?.createdTime;
count=1;
}
}

if(reqData?.additionalDetails?.approvedColony=="NO"){
reqData.additionalDetails.permitData= "The plot has been officially regularized under No."+reqData?.additionalDetails?.NocNumber +" dated dd/mm/yyyy, registered in the name of <name as per the NOC>. This regularization falls within the jurisdiction of "+ state +".Any form of misrepresentation of the NoC is strictly prohibited. Such misrepresentation renders the building plan null and void, and it will be regarded as an act of impersonation. Criminal proceedings will be initiated against the owner and concerned architect / engineer/ building designer / supervisor involved in such actions"
}
else if(reqData?.additionalDetails?.approvedColony=="YES" ){
reqData.additionalDetails.permitData="The building plan falls under approved colony "+reqData?.additionalDetails?.nameofApprovedcolony
}
else{
reqData.additionalDetails.permitData="The building plan falls under Lal Lakir"
}
let response = await Digit.PaymentService.generatePdf(bpaDataDetails?.tenantId, { Bpa: [reqData] }, order);
const fileStore = await Digit.PaymentService.printReciept(bpaDataDetails?.tenantId, { fileStoreIds: response.filestoreIds[0] });
window.open(fileStore[response?.filestoreIds[0]], "_blank");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ export const SuccessfulPayment = (props) => {
{},
{ enabled: businessService?.includes("BPA") ? true : false }
);

const FSM_EDITOR = Digit.UserService.hasAccess("FSM_EDITOR_EMP") || false;

function onActionSelect(action) {
Expand Down Expand Up @@ -175,7 +176,13 @@ export const SuccessfulPayment = (props) => {
});
}
};


let workflowDetails = Digit.Hooks.useWorkflowDetails({
tenantId: data?.[0]?.tenantId,
id: data?.[0]?.applicationNo,
moduleCode: "OBPS",
});

const getPermitOccupancyOrderSearch = async (order, mode = "download") => {
let queryObj = { applicationNo: data?.[0]?.applicationNo };
let bpaResponse = await Digit.OBPSService.BPASearch(data?.[0]?.tenantId, queryObj);
Expand All @@ -187,6 +194,26 @@ export const SuccessfulPayment = (props) => {
currentDate.getFullYear() + "-" + (currentDate.getMonth() + 1) + "-" + currentDate.getDate()
);
let reqData = { ...bpaData, edcrDetail: [{ ...edcrData }] };
const state = Digit.ULBService.getStateId();

let count=0;
for(let i=0;i<workflowDetails?.data?.processInstances?.length;i++){
if(workflowDetails?.data?.processInstances[i]?.action==="PAY" && count==0 ){
reqData.additionalDetails.submissionDate=workflowDetails?.data?.processInstances[i]?.auditDetails?.createdTime;
count=1;
}
}

if(reqData?.additionalDetails?.approvedColony=="NO"){
reqData.additionalDetails.permitData= "The plot has been officially regularized under No."+reqData?.additionalDetails?.NocNumber +" dated dd/mm/yyyy, registered in the name of <name as per the NOC>. This regularization falls within the jurisdiction of "+ state +".Any form of misrepresentation of the NoC is strictly prohibited. Such misrepresentation renders the building plan null and void, and it will be regarded as an act of impersonation. Criminal proceedings will be initiated against the owner and concerned architect / engineer/ building designer / supervisor involved in such actions"
}
else if(reqData?.additionalDetails?.approvedColony=="YES" ){
reqData.additionalDetails.permitData="The building plan falls under approved colony "+reqData?.additionalDetails?.nameofApprovedcolony
}
else{
reqData.additionalDetails.permitData="The building plan falls under Lal Lakir"
}

let response = await Digit.PaymentService.generatePdf(bpaData?.tenantId, { Bpa: [reqData] }, order);
const fileStore = await Digit.PaymentService.printReciept(bpaData?.tenantId, { fileStoreIds: response.filestoreIds[0] });
window.open(fileStore[response?.filestoreIds[0]], "_blank");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@
name="NocNumber"
value={NocNumber}
onChange={setnocNumber}
//style={{ width: "86%" }}
style={{ width: "86%" }}
ValidationRequired={false}
{...(validation = {
//isRequired: true,
Expand All @@ -315,11 +315,12 @@
title: t("TL_NAME_ERROR_MESSAGE"),
})}
/>
<div style={{ position: "relative", zIndex: "100", right: "20px", marginTop: "-24px", marginRight:Webview?"-20px":"-20px" }} onClick={(e) => onClick( e)}> <SearchIcon /> </div>
<div style={{ position: "relative", zIndex: "100", right: "95px", marginTop: "-24px", marginRight:Webview?"-20px":"-20px" }} onClick={(e) => onClick( e)}> <SearchIcon /> </div>
</div>
<div style={{ position: "relative", fontWeight:"bold", left:"20px"}}>OR</div>
<UploadFile
id={"noc-doc"}
style={{ width: "86%" }}
onUpload={selectfile}
onDelete={() => {
setUploadedFile(null);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,26 @@ const BpaApplicationDetail = () => {
let currentDate = new Date();
data.applicationData.additionalDetails.runDate = convertDateToEpoch(currentDate.getFullYear() + '-' + (currentDate.getMonth() + 1) + '-' + currentDate.getDate());
let requestData = {...data?.applicationData, edcrDetail:[{...data?.edcrDetails}]}
const state = Digit.ULBService.getStateId();

let count=0;

for(let i=0;i<workflowDetails?.data?.processInstances?.length;i++){
if(workflowDetails?.data?.processInstances[i]?.action==="PAY" && count==0 ){
requestData.additionalDetails.submissionDate=workflowDetails?.data?.processInstances[i]?.auditDetails?.createdTime;
count=1;
}
}

if(requestData?.additionalDetails?.approvedColony=="NO"){
requestData.additionalDetails.permitData= "The plot has been officially regularized under No."+requestData?.additionalDetails?.NocNumber +" dated dd/mm/yyyy, registered in the name of <name as per the NOC>. This regularization falls within the jurisdiction of "+ state +".Any form of misrepresentation of the NoC is strictly prohibited. Such misrepresentation renders the building plan null and void, and it will be regarded as an act of impersonation. Criminal proceedings will be initiated against the owner and concerned architect / engineer/ building designer / supervisor involved in such actions"
}
else if(requestData?.additionalDetails?.approvedColony=="YES" ){
requestData.additionalDetails.permitData="The building plan falls under approved colony "+requestData?.additionalDetails?.nameofApprovedcolony
}
else{
requestData.additionalDetails.permitData="The building plan falls under Lal Lakir"
}
let response = await Digit.PaymentService.generatePdf(tenantId, { Bpa: [requestData] }, order);
const fileStore = await Digit.PaymentService.printReciept(tenantId, { fileStoreIds: response.filestoreIds[0] });
window.open(fileStore[response?.filestoreIds[0]], "_blank");
Expand Down Expand Up @@ -690,7 +710,7 @@ const BpaApplicationDetail = () => {
{/* to get Fee values */}
{detail?.additionalDetails?.inspectionReport && detail?.isFeeDetails && <ScruntinyDetails scrutinyDetails={detail?.additionalDetails} paymentsList={[]}/>}
{/*blocking reason*/}
{detail?.additionalDetails?.inspectionReport && detail?.isFeeDetails && (workflowDetails?.data?.actionState?.nextActions[0]?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING"|| workflowDetails?.data?.actionState?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING" || workflowDetails?.data?.actionState?.state=="POST_PAYMENT_INPROGRESS") &&
{detail?.additionalDetails?.inspectionReport && detail?.isFeeDetails && (workflowDetails?.data?.actionState?.nextActions?.[0]?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING"|| workflowDetails?.data?.actionState?.state=="POST_PAYMENT_CITIZEN_APPROVAL_PENDING" || workflowDetails?.data?.actionState?.state=="POST_PAYMENT_INPROGRESS") &&
<div style={ { marginTop: "19px", background: "#FAFAFA", border: "1px solid #D6D5D4", borderRadius: "4px", padding: "8px", lineHeight: "19px", maxWidth: "950px", minWidth: "280px"} }>
<Row className="border-none" label={t(`BLOCKING_REASON`)} labelStyle={{fontSize: "15px"}} text={data?.applicationData.additionalDetails.blockingReason || "NA"}> </Row>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ setWaterCharges(Malbafees/2)
sessionStorage.setItem("otherCharges",value)
}
else{
//alert("Please enter numbers")
alert("Please enter numbers")
}
}
function setDevelopmentVal(value) {
Expand All @@ -384,7 +384,7 @@ setWaterCharges(Malbafees/2)
sessionStorage.setItem("development",value)
}
else{
//alert("Please enter numbers")
alert("Please enter numbers")
}
}
function setLessAdjusmentVal(value) {
Expand All @@ -393,7 +393,7 @@ setWaterCharges(Malbafees/2)
sessionStorage.setItem("lessAdjusment",value)
}
else{
//alert("Please enter numbers")
alert("Please enter numbers")
}
}
function setOtherChargesDis(value) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,27 @@ const BpaApplicationDetail = () => {
let currentDate = new Date();
data.applicationData.additionalDetails.runDate = convertDateToEpoch(currentDate.getFullYear() + '-' + (currentDate.getMonth() + 1) + '-' + currentDate.getDate());
let requestData = {...data?.applicationData, edcrDetail:[{...data?.edcrDetails}]}

const state = Digit.ULBService.getStateId();
let count=0;

for(let i=0;i<workflowDetails?.data?.processInstances?.length;i++){
if(workflowDetails?.data?.processInstances[i]?.action==="PAY" && count==0 ){
requestData.additionalDetails.submissionDate=workflowDetails?.data?.processInstances[i]?.auditDetails?.createdTime;
count=1;
}
}

if(requestData?.additionalDetails?.approvedColony=="NO"){
requestData.additionalDetails.permitData= "The plot has been officially regularized under No."+requestData?.additionalDetails?.NocNumber +" dated dd/mm/yyyy, registered in the name of <name as per the NOC>. This regularization falls within the jurisdiction of "+ state +".Any form of misrepresentation of the NoC is strictly prohibited. Such misrepresentation renders the building plan null and void, and it will be regarded as an act of impersonation. Criminal proceedings will be initiated against the owner and concerned architect / engineer/ building designer / supervisor involved in such actions"
}
else if(requestData?.additionalDetails?.approvedColony=="YES" ){
requestData.additionalDetails.permitData="The building plan falls under approved colony "+requestData?.additionalDetails?.nameofApprovedcolony
}
else{
requestData.additionalDetails.permitData="The building plan falls under Lal Lakir"
}

let response = await Digit.PaymentService.generatePdf(tenantId, { Bpa: [requestData] }, order);
const fileStore = await Digit.PaymentService.printReciept(tenantId, { fileStoreIds: response.filestoreIds[0] });
window.open(fileStore[response?.filestoreIds[0]], "_blank");
Expand Down

0 comments on commit 64ab920

Please sign in to comment.