Skip to content

Commit

Permalink
fix on tetnant of pgr (#1594)
Browse files Browse the repository at this point in the history
* fix

* fix

* fix
  • Loading branch information
aaradhya-egov authored Oct 21, 2024
1 parent 140f4ed commit b47f4bb
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,14 +79,25 @@ const QuickSetupConfigComponent = ({ onSelect, formData, control, formState, ...
id: 1,
type: "faqs",
actions: [
{
question: "SANDBOX_FAQ_QUES_14",
isLabelLink: true,
answer: [
{
label: "SANDBOX_FAQ_ANS_14_LABEL_1",
fulllink:true,
link:"https://egov-digit.gitbook.io/digit-sandbox/specifications/user-manual/walkthrough-videos",
}
]
},
{
question: "SANDBOX_FAQ_QUES_1",
content: "SANDBOX_FAQ_CONTENT_1",
isLabelLink: true,
answer: [
{
label: "SANDBOX_FAQ_ANS_1_LABEL_1",
link:"citizen/all-services",
link:"citizen/login",
description: "SANDBOX_FAQ_ANS_1_DESCRIPTION_1",
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,12 @@ const FaqComponent = (props) => {
type="button"
size={"medium"}
onClick={() => {
const baseURL = `https://${window.location.hostname}/${window?.globalPath}/${tenantId}`;
window.open(`${baseURL}/${action?.link}`, "_blank");
if (action?.fulllink) {
window.open(action?.link, "_blank");
} else {
const baseURL = `https://${window.location.hostname}/${window?.globalPath}/${tenantId}`;
window.open(`${baseURL}/${action?.link}`, "_blank");
}
}}
style={{ padding: "0px" }}
/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const externalConfig = [
heading: "ROLE_LANDING_CITIZEN", // localization key for "Citizen"
description: "ROLE_LANDING_CITIZEN_DESCRIPTION", // localization key for the description
buttonName: "ROLE_LANDING_CITIZEN_BUTTON", // localization key for the button label
action: "/citizen"
action: "/citizen/login"
},
{
type: "card",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const SelectRating = ({ parentRoute }) => {
const dispatch = useDispatch();
const history = useHistory();

let tenantId = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")?.code || Digit.ULBService.getCurrentTenantId();
let tenantId = Digit.Utils.getMultiRootTenant()? Digit.ULBService.getStateId() : Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")?.code || Digit.ULBService.getCurrentTenantId();
const complaintDetails = Digit.Hooks.pgr.useComplaintDetails({ tenantId: tenantId, id: id }).complaintDetails;
const updateComplaint = useCallback((complaintDetails) => dispatch(updateComplaints(complaintDetails)), [dispatch]);
const [submitError, setError] = useState(false)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const ReopenComplaint = ({ match, history, parentRoute }) => {

const allParams = window.location.pathname.split("/")
const id = allParams[allParams.length - 1]
const tenantId = Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")?.code || Digit.ULBService.getCurrentTenantId();
const tenantId = Digit.Utils.getMultiRootTenant()? Digit.ULBService.getStateId() :Digit.SessionStorage.get("CITIZEN.COMMON.HOME.CITY")?.code || Digit.ULBService.getCurrentTenantId();

const complaintDetails = Digit.Hooks.pgr.useComplaintDetails({ tenantId: tenantId, id: id }).complaintDetails;
return (
Expand Down

0 comments on commit b47f4bb

Please sign in to comment.