@djb25/digit-ui-module-fsm 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/index.modern.js +101 -63
- package/dist/index.modern.js.map +1 -1
- package/package.json +1 -1
package/dist/index.modern.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AddNewIcon, ShippingTruck, EmployeeModuleCard, TickMark, FormStep as FormStep$1, RadioOrSelect, LabelFieldPair, CardLabel as CardLabel$1, Dropdown as Dropdown$2, TextInput as TextInput$1, RadioButtons, Loader, LocationSearchCard, TextArea as TextArea$1, CardLabelError as CardLabelError$1, CitizenInfoLabel, CardText as CardText$1, WrapUnMaskComponent, PitDimension, ImageUploadHandler, KeyNote, BackButton, PrivateRoute, TelePhone, CardSectionHeader, CheckPoint, ConnectingCheckPoints, LinkButton as LinkButton$1, ActionLinks, Rating, SubmitBar as SubmitBar$1, Header, Card as Card$1, CardHeader as CardHeader$1, CardSubHeader, StatusTable, Row, Banner, RatingCard, ULBHomeCard, ViewReportIcon, InboxIcon, Table, CheckBox, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Label, LinkLabel, DatePicker as DatePicker$3, DetailsCard, SearchAction, FilterAction, PopUp, BreadCrumb, ModuleHeader, ArrowLeft, HomeIcon, Modal, FormComposer, UploadPitPhoto, ImageViewer, BreakLine, Toast, Menu, MultiUploadWrapper, AddIcon, ToggleSwitch, InfoIcon, EditIcon, DeleteIcon, VerticalTimeline, CitizenHomeCard, CitizenTruck } from '@djb25/digit-ui-react-components';
|
|
1
|
+
import { AddNewIcon, ShippingTruck, EmployeeModuleCard, TickMark, FormStep as FormStep$1, RadioOrSelect, LabelFieldPair, CardLabel as CardLabel$1, Dropdown as Dropdown$2, TextInput as TextInput$1, RadioButtons, Loader, LocationSearchCard, TextArea as TextArea$1, CardLabelError as CardLabelError$1, CitizenInfoLabel, CardText as CardText$1, WrapUnMaskComponent, PitDimension, ImageUploadHandler, KeyNote, BackButton, PrivateRoute, TelePhone, CardSectionHeader, CheckPoint, ConnectingCheckPoints, LinkButton as LinkButton$1, ActionLinks, Rating, SubmitBar as SubmitBar$1, Header, Card as Card$1, CardHeader as CardHeader$1, CardSubHeader, StatusTable, Row, Banner, RatingCard, ULBHomeCard, ViewReportIcon, InboxIcon, Table, CheckBox, CloseSvg, Localities, RemoveableTag, ActionBar, ApplyFilterBar, Label, LinkLabel, DatePicker as DatePicker$3, DetailsCard, SearchAction, FilterAction, PopUp, BreadCrumb, ModuleHeader, ArrowLeft, LayoutWrapper, HomeIcon, Modal, FormComposer, UploadPitPhoto, ImageViewer, BreakLine, Toast, Menu, MultiUploadWrapper, AddIcon, ToggleSwitch, InfoIcon, EditIcon, DeleteIcon, VerticalTimeline, CitizenHomeCard, CitizenTruck } from '@djb25/digit-ui-react-components';
|
|
2
2
|
import React, { useState, useEffect, Fragment as Fragment$1, forwardRef, useCallback, useMemo, useRef } from 'react';
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useLocation, useParams, Switch, Redirect, Link, useHistory, useRouteMatch, Route } from 'react-router-dom';
|
|
@@ -12749,11 +12749,6 @@ const EmployeeApp = ({
|
|
|
12749
12749
|
t
|
|
12750
12750
|
} = useTranslation();
|
|
12751
12751
|
const location = useLocation();
|
|
12752
|
-
const DSO = Digit.UserService.hasAccess(["FSM_DSO"]);
|
|
12753
|
-
const COLLECTOR = Digit.UserService.hasAccess("FSM_COLLECTOR") || false;
|
|
12754
|
-
const FSM_ADMIN = Digit.UserService.hasAccess("FSM_ADMIN") || false;
|
|
12755
|
-
const FSM_EDITOR = Digit.UserService.hasAccess("FSM_EDITOR_EMP") || false;
|
|
12756
|
-
const FSM_CREATOR = Digit.UserService.hasAccess("FSM_CREATOR_EMP") || false;
|
|
12757
12752
|
useEffect(() => {
|
|
12758
12753
|
var _location$pathname16;
|
|
12759
12754
|
if (!(location !== null && location !== void 0 && (_location$pathname16 = location.pathname) !== null && _location$pathname16 !== void 0 && _location$pathname16.includes("application-details"))) {
|
|
@@ -12775,7 +12770,6 @@ const EmployeeApp = ({
|
|
|
12775
12770
|
const ApplicationAudit = Digit.ComponentRegistryService.getComponent("FSMApplicationAudit");
|
|
12776
12771
|
const RateView = Digit.ComponentRegistryService.getComponent("FSMRateView");
|
|
12777
12772
|
const FSMLinks = Digit.ComponentRegistryService.getComponent("FSMLinks");
|
|
12778
|
-
const FSTPO = Digit.UserService.hasAccess(["FSM_EMP_FSTPO"]);
|
|
12779
12773
|
const FSMRegistry = Digit.ComponentRegistryService.getComponent("FSMRegistry");
|
|
12780
12774
|
const VendorDetails = Digit.ComponentRegistryService.getComponent("VendorDetails");
|
|
12781
12775
|
const AddVendor = Digit.ComponentRegistryService.getComponent("AddVendor");
|
|
@@ -12786,8 +12780,6 @@ const EmployeeApp = ({
|
|
|
12786
12780
|
const DriverDetails = Digit.ComponentRegistryService.getComponent("DriverDetails");
|
|
12787
12781
|
const AddDriver = Digit.ComponentRegistryService.getComponent("AddDriver");
|
|
12788
12782
|
const EditDriver = Digit.ComponentRegistryService.getComponent("EditDriver");
|
|
12789
|
-
const BreadCrumbComp = Digit.ComponentRegistryService.getComponent("FsmBreadCrumb");
|
|
12790
|
-
const locationCheck = window.location.href.includes("/employee/fsm/inbox") || window.location.href.includes("/employee/fsm/registry") || window.location.href.includes("/employee/fsm/application-details/");
|
|
12791
12783
|
const getDynamicBreadcrumbs = () => {
|
|
12792
12784
|
const pathname = location.pathname;
|
|
12793
12785
|
let crumbs = [{
|
|
@@ -12836,7 +12828,6 @@ const EmployeeApp = ({
|
|
|
12836
12828
|
}
|
|
12837
12829
|
return crumbs;
|
|
12838
12830
|
};
|
|
12839
|
-
const desludgingApplicationCheck = window.location.href.includes("/employee/fsm/new-application") || window.location.href.includes("/employee/fsm/modify-application");
|
|
12840
12831
|
return /*#__PURE__*/React.createElement(Switch, null, /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement("div", {
|
|
12841
12832
|
className: "ground-container employee-app-container form-container"
|
|
12842
12833
|
}, /*#__PURE__*/React.createElement(ModuleHeader, {
|
|
@@ -12848,142 +12839,189 @@ const EmployeeApp = ({
|
|
|
12848
12839
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12849
12840
|
exact: true,
|
|
12850
12841
|
path: `${path}/`,
|
|
12851
|
-
component:
|
|
12842
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12843
|
+
layoutClass: "normal"
|
|
12844
|
+
}, /*#__PURE__*/React.createElement(FSMLinks, Object.assign({}, props, {
|
|
12852
12845
|
matchPath: path,
|
|
12853
12846
|
userType: userType
|
|
12854
|
-
})
|
|
12847
|
+
})))
|
|
12855
12848
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12856
12849
|
path: `${path}/inbox`,
|
|
12857
|
-
component:
|
|
12850
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12851
|
+
layoutClass: "normal"
|
|
12852
|
+
}, /*#__PURE__*/React.createElement(Inbox, Object.assign({}, props, {
|
|
12858
12853
|
parentRoute: path,
|
|
12859
12854
|
isInbox: true
|
|
12860
|
-
}))
|
|
12855
|
+
})))
|
|
12861
12856
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12862
12857
|
path: `${path}/fstp-inbox`,
|
|
12863
|
-
component:
|
|
12858
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12859
|
+
layoutClass: "normal"
|
|
12860
|
+
}, /*#__PURE__*/React.createElement(FstpInbox, Object.assign({}, props, {
|
|
12864
12861
|
parentRoute: path
|
|
12865
|
-
}))
|
|
12862
|
+
})))
|
|
12866
12863
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12867
12864
|
path: `${path}/new-application`,
|
|
12868
|
-
component:
|
|
12865
|
+
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12866
|
+
layoutClass: "normal"
|
|
12867
|
+
}, /*#__PURE__*/React.createElement(NewApplication, {
|
|
12869
12868
|
parentUrl: url
|
|
12870
|
-
})
|
|
12869
|
+
}))
|
|
12871
12870
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12872
12871
|
path: `${path}/modify-application/:id`,
|
|
12873
|
-
component:
|
|
12872
|
+
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12873
|
+
layoutClass: "normal"
|
|
12874
|
+
}, /*#__PURE__*/React.createElement(EditApplication, null))
|
|
12874
12875
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12875
12876
|
path: `${path}/application-details/:id`,
|
|
12876
|
-
component:
|
|
12877
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12878
|
+
layoutClass: "normal"
|
|
12879
|
+
}, /*#__PURE__*/React.createElement(EmployeeApplicationDetails, Object.assign({}, props, {
|
|
12877
12880
|
parentRoute: path,
|
|
12878
12881
|
userType: "EMPLOYEE"
|
|
12879
|
-
}))
|
|
12882
|
+
})))
|
|
12880
12883
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12881
12884
|
path: `${path}/fstp-operator-details/:id`,
|
|
12882
|
-
component:
|
|
12885
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12886
|
+
layoutClass: "normal"
|
|
12887
|
+
}, /*#__PURE__*/React.createElement(FstpOperatorDetails, props))
|
|
12883
12888
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12884
12889
|
path: `${path}/response`,
|
|
12885
|
-
component:
|
|
12890
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12891
|
+
layoutClass: "normal"
|
|
12892
|
+
}, /*#__PURE__*/React.createElement(Response, Object.assign({}, props, {
|
|
12886
12893
|
parentRoute: path
|
|
12887
|
-
}))
|
|
12894
|
+
})))
|
|
12888
12895
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12889
12896
|
path: `${path}/application-audit/:id`,
|
|
12890
|
-
component:
|
|
12897
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12898
|
+
layoutClass: "normal"
|
|
12899
|
+
}, /*#__PURE__*/React.createElement(ApplicationAudit, Object.assign({}, props, {
|
|
12891
12900
|
parentRoute: path
|
|
12892
|
-
}))
|
|
12901
|
+
})))
|
|
12893
12902
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12894
12903
|
path: `${path}/search`,
|
|
12895
|
-
component:
|
|
12904
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12905
|
+
layoutClass: "normal"
|
|
12906
|
+
}, /*#__PURE__*/React.createElement(Inbox, Object.assign({}, props, {
|
|
12896
12907
|
parentRoute: path,
|
|
12897
12908
|
isSearch: true
|
|
12898
|
-
}))
|
|
12909
|
+
})))
|
|
12899
12910
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12900
12911
|
path: `${path}/rate-view/:id`,
|
|
12901
|
-
component:
|
|
12912
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12913
|
+
layoutClass: "normal"
|
|
12914
|
+
}, /*#__PURE__*/React.createElement(RateView, Object.assign({}, props, {
|
|
12902
12915
|
parentRoute: path
|
|
12903
|
-
}))
|
|
12916
|
+
})))
|
|
12904
12917
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12905
12918
|
path: `${path}/mark-for-disposal`,
|
|
12906
|
-
component:
|
|
12919
|
+
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12920
|
+
layoutClass: "normal"
|
|
12921
|
+
}, /*#__PURE__*/React.createElement("div", null))
|
|
12907
12922
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12908
12923
|
exact: true,
|
|
12909
12924
|
path: `${path}/registry`,
|
|
12910
|
-
|
|
12925
|
+
ccomponent: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12926
|
+
layoutClass: "normal"
|
|
12927
|
+
}, /*#__PURE__*/React.createElement(FSMRegistry, Object.assign({}, props, {
|
|
12911
12928
|
parentRoute: path
|
|
12912
|
-
}))
|
|
12929
|
+
})))
|
|
12913
12930
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12914
12931
|
path: `${path}/registry/vendor-details/:id`,
|
|
12915
|
-
component:
|
|
12932
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12933
|
+
layoutClass: "normal"
|
|
12934
|
+
}, /*#__PURE__*/React.createElement(VendorDetails, Object.assign({}, props, {
|
|
12916
12935
|
parentRoute: path
|
|
12917
|
-
}))
|
|
12936
|
+
})))
|
|
12918
12937
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12919
12938
|
path: `${path}/registry/new-vendor`,
|
|
12920
|
-
component:
|
|
12939
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12940
|
+
layoutClass: "normal"
|
|
12941
|
+
}, /*#__PURE__*/React.createElement(AddVendor, Object.assign({}, props, {
|
|
12921
12942
|
parentRoute: path
|
|
12922
|
-
}))
|
|
12943
|
+
})))
|
|
12923
12944
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12924
12945
|
path: `${path}/registry/modify-vendor/:id`,
|
|
12925
|
-
component:
|
|
12946
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12947
|
+
layoutClass: "action"
|
|
12948
|
+
}, /*#__PURE__*/React.createElement(EditVendor, Object.assign({}, props, {
|
|
12926
12949
|
parentRoute: path
|
|
12927
|
-
}))
|
|
12950
|
+
})))
|
|
12928
12951
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12929
12952
|
path: `${path}/registry/vehicle-details/:id`,
|
|
12930
|
-
component:
|
|
12953
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12954
|
+
layoutClass: "normal"
|
|
12955
|
+
}, /*#__PURE__*/React.createElement(VehicleDetails, Object.assign({}, props, {
|
|
12931
12956
|
parentRoute: path
|
|
12932
|
-
}))
|
|
12957
|
+
})))
|
|
12933
12958
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12934
12959
|
path: `${path}/registry/new-vehicle`,
|
|
12935
|
-
component:
|
|
12960
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12961
|
+
layoutClass: "normal"
|
|
12962
|
+
}, /*#__PURE__*/React.createElement(AddVehicle, Object.assign({}, props, {
|
|
12936
12963
|
parentRoute: path
|
|
12937
|
-
}))
|
|
12964
|
+
})))
|
|
12938
12965
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12939
12966
|
path: `${path}/registry/modify-vehicle/:id`,
|
|
12940
|
-
component:
|
|
12967
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12968
|
+
layoutClass: "action"
|
|
12969
|
+
}, /*#__PURE__*/React.createElement(EditVehicle, Object.assign({}, props, {
|
|
12941
12970
|
parentRoute: path
|
|
12942
|
-
}))
|
|
12971
|
+
})))
|
|
12943
12972
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12944
12973
|
path: `${path}/registry/driver-details/:id`,
|
|
12945
|
-
component:
|
|
12974
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12975
|
+
layoutClass: "normal"
|
|
12976
|
+
}, /*#__PURE__*/React.createElement(DriverDetails, Object.assign({}, props, {
|
|
12946
12977
|
parentRoute: path
|
|
12947
|
-
}))
|
|
12978
|
+
})))
|
|
12948
12979
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12949
12980
|
path: `${path}/registry/new-driver`,
|
|
12950
|
-
component:
|
|
12981
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12982
|
+
layoutClass: "normal"
|
|
12983
|
+
}, /*#__PURE__*/React.createElement(AddDriver, Object.assign({}, props, {
|
|
12951
12984
|
parentRoute: path
|
|
12952
|
-
}))
|
|
12985
|
+
})))
|
|
12953
12986
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12954
12987
|
path: `${path}/registry/modify-driver/:id`,
|
|
12955
|
-
component:
|
|
12988
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12989
|
+
layoutClass: "action"
|
|
12990
|
+
}, /*#__PURE__*/React.createElement(EditDriver, Object.assign({}, props, {
|
|
12956
12991
|
parentRoute: path
|
|
12957
|
-
}))
|
|
12992
|
+
})))
|
|
12958
12993
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12959
12994
|
exact: true,
|
|
12960
12995
|
path: `${path}/fstp-operations`,
|
|
12961
|
-
component:
|
|
12996
|
+
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
12997
|
+
layoutClass: "normal"
|
|
12998
|
+
}, /*#__PURE__*/React.createElement(FstpOperations, null))
|
|
12962
12999
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12963
13000
|
exact: true,
|
|
12964
13001
|
path: `${path}/fstp-add-vehicle`,
|
|
12965
|
-
component:
|
|
13002
|
+
component: () => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
13003
|
+
layoutClass: "normal"
|
|
13004
|
+
}, /*#__PURE__*/React.createElement(FstpAddVehicle, null))
|
|
12966
13005
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12967
13006
|
exact: true,
|
|
12968
13007
|
path: `${path}/fstp-fsm-request/:id`,
|
|
12969
|
-
component:
|
|
13008
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
13009
|
+
layoutClass: "normal"
|
|
13010
|
+
}, /*#__PURE__*/React.createElement(FstpServiceRequest, props))
|
|
12970
13011
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12971
13012
|
exact: true,
|
|
12972
13013
|
path: `${path}/fstp/new-vehicle-entry`,
|
|
12973
|
-
component:
|
|
13014
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
13015
|
+
layoutClass: "normal"
|
|
13016
|
+
}, /*#__PURE__*/React.createElement(FstpOperatorDetails, props))
|
|
12974
13017
|
}), /*#__PURE__*/React.createElement(PrivateRoute, {
|
|
12975
13018
|
exact: true,
|
|
12976
13019
|
path: `${path}/fstp/new-vehicle-entry/:id`,
|
|
12977
|
-
component:
|
|
13020
|
+
component: props => /*#__PURE__*/React.createElement(LayoutWrapper, {
|
|
13021
|
+
layoutClass: "normal"
|
|
13022
|
+
}, /*#__PURE__*/React.createElement(FstpOperatorDetails, props))
|
|
12978
13023
|
}))));
|
|
12979
13024
|
};
|
|
12980
|
-
const renderWithLayout = (Component, layoutClass) => routeProps => /*#__PURE__*/React.createElement("div", {
|
|
12981
|
-
className: layoutClass
|
|
12982
|
-
}, /*#__PURE__*/React.createElement(Component, routeProps));
|
|
12983
|
-
const layouts = {
|
|
12984
|
-
normal: "employee-form",
|
|
12985
|
-
action: "employee-form employee-form-content-with-action-bar"
|
|
12986
|
-
};
|
|
12987
13025
|
|
|
12988
13026
|
const ApplicationAudit = ({
|
|
12989
13027
|
parentRoute
|