Skip to content

Commit

Permalink
Merge pull request #659 from odisha-muktasoft/UNIFIED-FIX-UI
Browse files Browse the repository at this point in the history
[UCEM-287,UCEM-250] : updated the tool tip style and session clearing…
  • Loading branch information
Tulika-eGov authored Sep 10, 2024
2 parents 9d0a7c7 + 1329301 commit b31d9d4
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"@egovernments/digit-ui-module-measurement":"0.2.0",
"@egovernments/digit-ui-module-estimate": "0.4.5",
"@egovernments/digit-ui-module-masters": "0.4.5",
"@egovernments/digit-ui-module-project": "0.4.1",
"@egovernments/digit-ui-module-project": "0.4.2",
"@egovernments/digit-ui-module-expenditure": "0.4.2",
"@egovernments/digit-ui-customisation-mukta": "0.2.1",
"@egovernments/digit-ui-module-rate-analysis": "0.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ const { isRatesLoading, data : RatesData} = Digit.Hooks.useCustomAPIHook(request
if ((isEdit || isEditRevisionEstimate) && (estimateNumber || revisionNumber)) {
await EstimateUpdateMutation(payload, {
onError: async (error, variables) => {
sessionStorage.removeItem("Digit.NEW_ESTIMATE_CREATE");
setIsButtonDisabled(false);
setShowToast({ warning: true, label: error?.response?.data?.Errors?.[0].message ? error?.response?.data?.Errors?.[0].message : error });
setTimeout(() => {
Expand All @@ -498,6 +499,7 @@ const { isRatesLoading, data : RatesData} = Digit.Hooks.useCustomAPIHook(request
}
},
onSuccess: async (responseData, variables) => {
sessionStorage.removeItem("Digit.NEW_ESTIMATE_CREATE");
clearSessionFormData();
const state = {
header: isCreateRevisionEstimate || isEditRevisionEstimate ? t("WORKS_REVISION_ESTIMATE_RESPONSE_UPDATED_HEADER") : t("WORKS_ESTIMATE_RESPONSE_UPDATED_HEADER"),
Expand Down Expand Up @@ -530,13 +532,15 @@ const { isRatesLoading, data : RatesData} = Digit.Hooks.useCustomAPIHook(request
} else {
await EstimateMutation(payload, {
onError: async (error, variables) => {
sessionStorage.removeItem("Digit.NEW_ESTIMATE_CREATE");
setIsButtonDisabled(false);
setShowToast({ warning: true, label: error?.response?.data?.Errors?.[0].message ? error?.response?.data?.Errors?.[0].message : error });
setTimeout(() => {
setShowToast(false);
}, 5000);
},
onSuccess: async (responseData, variables) => {
sessionStorage.removeItem("Digit.NEW_ESTIMATE_CREATE");
clearSessionFormData();
const state = {
header: isCreateRevisionEstimate || isEditRevisionEstimate ? t("WORKS_REVISION_ESTIMATE_RESPONSE_CREATED_HEADER") :t("WORKS_ESTIMATE_RESPONSE_CREATED_HEADER"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const ViewDetailedEstimate = () => {
const [isStateChanged, setStateChanged] = useState(``);
const [toast, setToast] = useState({ show: false, label: "", error: false });
const menuRef = useRef();
sessionStorage.getItem("Digit.NEW_ESTIMATE_CREATE") ? sessionStorage.removeItem("Digit.NEW_ESTIMATE_CREATE") : "";

const loggedInUserRoles = Digit.Utils.getLoggedInUserDetails("roles");

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,10 @@ const MeasureTable = (props) => {
{row.description?.length > 128 ? `${row.description.substring(0,128)}...` : row?.description}
{row.description?.length > 128 &&<span className="tooltiptext" style={{
whiteSpace: "nowrap",
fontSize: "medium"
fontSize: "medium",
bottom : "100%",
overflow : "auto",

}}>
{row.description}
</span>}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-module-project",
"version": "0.4.1",
"version": "0.4.2",
"description": "Project Module UI",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ const ProjectDetails = () => {

const handleActionBar = (option) => {
if(option?.name === "CREATE_ESTIMATE"){
sessionStorage.getItem("Digit.NEW_ESTIMATE_CREATE") ? sessionStorage.removeItem("Digit.NEW_ESTIMATE_CREATE") : "";
history.push(`/${window.contextPath}/employee/estimate/create-detailed-estimate?tenantId=${searchParams?.Projects?.[0]?.tenantId}&projectNumber=${searchParams?.Projects?.[0]?.projectNumber}`);
}
if(option?.name === "VIEW_ESTIMATE"){
Expand Down
2 changes: 1 addition & 1 deletion frontend/micro-ui/web/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"@egovernments/digit-ui-module-measurement":"0.2.0",
"@egovernments/digit-ui-module-estimate": "0.4.5",
"@egovernments/digit-ui-module-masters": "0.4.5",
"@egovernments/digit-ui-module-project": "0.4.1",
"@egovernments/digit-ui-module-project": "0.4.2",
"@egovernments/digit-ui-module-expenditure": "0.4.2",
"@egovernments/digit-ui-customisation-mukta": "0.2.1",
"@egovernments/digit-ui-module-rate-analysis": "0.4.0",
Expand Down

0 comments on commit b31d9d4

Please sign in to comment.