@plusscommunities/pluss-maintenance-app-forms 6.0.10 → 6.0.11-auth.0
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/module/actions/JobActions.js +44 -1
- package/dist/module/actions/JobActions.js.map +1 -1
- package/dist/module/actions/index.js +1 -1
- package/dist/module/actions/index.js.map +1 -1
- package/dist/module/actions/types.js +4 -1
- package/dist/module/actions/types.js.map +1 -1
- package/dist/module/apis/index.js +4 -1
- package/dist/module/apis/index.js.map +1 -1
- package/dist/module/apis/maintenanceActions.js +61 -38
- package/dist/module/apis/maintenanceActions.js.map +1 -1
- package/dist/module/apis/userActions.js +23 -0
- package/dist/module/apis/userActions.js.map +1 -0
- package/dist/module/components/FilterPopupMenu.js +82 -58
- package/dist/module/components/FilterPopupMenu.js.map +1 -1
- package/dist/module/components/MaintenanceList.js +84 -92
- package/dist/module/components/MaintenanceList.js.map +1 -1
- package/dist/module/components/MaintenanceListItem.js +94 -80
- package/dist/module/components/MaintenanceListItem.js.map +1 -1
- package/dist/module/components/MaintenanceWidgetItem.js +39 -38
- package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
- package/dist/module/components/PrioritySelectorPopup.js +83 -0
- package/dist/module/components/PrioritySelectorPopup.js.map +1 -0
- package/dist/module/components/StatusSelectorPopup.js +23 -27
- package/dist/module/components/StatusSelectorPopup.js.map +1 -1
- package/dist/module/components/WidgetLarge.js +2 -2
- package/dist/module/components/WidgetLarge.js.map +1 -1
- package/dist/module/components/WidgetSmall.js +25 -20
- package/dist/module/components/WidgetSmall.js.map +1 -1
- package/dist/module/core.config.js +2 -3
- package/dist/module/core.config.js.map +1 -1
- package/dist/module/feature.config.js +17 -17
- package/dist/module/feature.config.js.map +1 -1
- package/dist/module/helper.js +41 -26
- package/dist/module/helper.js.map +1 -1
- package/dist/module/index.js +12 -10
- package/dist/module/index.js.map +1 -1
- package/dist/module/reducers/JobsReducer.js +36 -6
- package/dist/module/reducers/JobsReducer.js.map +1 -1
- package/dist/module/screens/JobTypePicker.js +18 -17
- package/dist/module/screens/JobTypePicker.js.map +1 -1
- package/dist/module/screens/MaintenancePage.js +10 -10
- package/dist/module/screens/MaintenancePage.js.map +1 -1
- package/dist/module/screens/MaintenanceUserPicker.js +219 -0
- package/dist/module/screens/MaintenanceUserPicker.js.map +1 -0
- package/dist/module/screens/RequestDetail.js +410 -142
- package/dist/module/screens/RequestDetail.js.map +1 -1
- package/dist/module/screens/RequestNotes.js +462 -52
- package/dist/module/screens/RequestNotes.js.map +1 -1
- package/dist/module/screens/ServiceRequest.js +519 -181
- package/dist/module/screens/ServiceRequest.js.map +1 -1
- package/dist/module/values.config.a.js +30 -23
- package/dist/module/values.config.a.js.map +1 -1
- package/dist/module/values.config.default.js +35 -28
- package/dist/module/values.config.default.js.map +1 -1
- package/dist/module/values.config.enquiry.js +43 -0
- package/dist/module/values.config.enquiry.js.map +1 -0
- package/dist/module/values.config.feedback.js +43 -0
- package/dist/module/values.config.feedback.js.map +1 -0
- package/dist/module/values.config.food.js +43 -0
- package/dist/module/values.config.food.js.map +1 -0
- package/dist/module/values.config.forms.js +35 -28
- package/dist/module/values.config.forms.js.map +1 -1
- package/dist/module/values.config.js +35 -28
- package/dist/module/values.config.js.map +1 -1
- package/package.json +55 -51
- package/src/actions/JobActions.js +75 -16
- package/src/actions/index.js +1 -1
- package/src/actions/types.js +4 -1
- package/src/apis/index.js +6 -1
- package/src/apis/maintenanceActions.js +189 -160
- package/src/apis/userActions.js +21 -0
- package/src/components/FilterPopupMenu.js +316 -230
- package/src/components/MaintenanceList.js +391 -326
- package/src/components/MaintenanceListItem.js +348 -274
- package/src/components/MaintenanceWidgetItem.js +146 -120
- package/src/components/PrioritySelectorPopup.js +93 -0
- package/src/components/StatusSelectorPopup.js +82 -76
- package/src/components/WidgetLarge.js +5 -5
- package/src/components/WidgetSmall.js +154 -131
- package/src/core.config.js +25 -3
- package/src/feature.config.js +62 -62
- package/src/helper.js +67 -30
- package/src/index.js +22 -20
- package/src/reducers/JobsReducer.js +85 -41
- package/src/screens/JobTypePicker.js +116 -92
- package/src/screens/MaintenancePage.js +89 -80
- package/src/screens/MaintenanceUserPicker.js +233 -0
- package/src/screens/RequestDetail.js +1354 -892
- package/src/screens/RequestNotes.js +946 -408
- package/src/screens/ServiceRequest.js +1808 -1222
- package/src/values.config.a.js +33 -26
- package/src/values.config.default.js +39 -32
- package/src/values.config.enquiry.js +43 -0
- package/src/values.config.feedback.js +43 -0
- package/src/values.config.food.js +43 -0
- package/src/values.config.forms.js +39 -32
- package/src/values.config.js +39 -32
- package/dist/module/values.config.b.js +0 -30
- package/dist/module/values.config.b.js.map +0 -1
- package/dist/module/values.config.c.js +0 -30
- package/dist/module/values.config.c.js.map +0 -1
- package/dist/module/values.config.d.js +0 -30
- package/dist/module/values.config.d.js.map +0 -1
- package/src/values.config.b.js +0 -30
- package/src/values.config.c.js +0 -30
- package/src/values.config.d.js +0 -30
package/dist/module/helper.js
CHANGED
|
@@ -1,33 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { Colours } from "./core.config";
|
|
2
|
+
const STATUS_NOT_ACTIONED = "Not Actioned";
|
|
3
|
+
const STATUS_IN_PROGRESS = "In Progress";
|
|
4
|
+
const STATUS_COMPLETED = "Completed";
|
|
3
5
|
const jobStatusOptions = [{
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
color: Colours.LINEGREY
|
|
6
|
+
text: "Open",
|
|
7
|
+
order: 0,
|
|
8
|
+
color: Colours.LINEGREY,
|
|
9
|
+
category: STATUS_NOT_ACTIONED
|
|
7
10
|
}, {
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
color: Colours.COLOUR_TEAL
|
|
11
|
+
text: "In Progress",
|
|
12
|
+
order: 1,
|
|
13
|
+
color: Colours.COLOUR_TEAL,
|
|
14
|
+
category: STATUS_IN_PROGRESS
|
|
11
15
|
}, {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
color: Colours.COLOUR_GREEN_LIGHT
|
|
16
|
+
text: "Completed",
|
|
17
|
+
order: 2,
|
|
18
|
+
color: Colours.COLOUR_GREEN_LIGHT,
|
|
19
|
+
category: STATUS_COMPLETED
|
|
15
20
|
}];
|
|
16
|
-
const
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
21
|
+
const jobPriorityOptions = [{
|
|
22
|
+
label: "Low",
|
|
23
|
+
color: Colours.COLOUR_GREEN,
|
|
24
|
+
default: true
|
|
25
|
+
}, {
|
|
26
|
+
label: "Medium",
|
|
27
|
+
color: Colours.COLOUR_TANGERINE
|
|
28
|
+
}, {
|
|
29
|
+
label: "High",
|
|
30
|
+
color: Colours.COLOUR_RED
|
|
31
|
+
}];
|
|
32
|
+
const getJobStatusOptions = props => {
|
|
33
|
+
var _props$statusTypes;
|
|
34
|
+
return props !== null && props !== void 0 && (_props$statusTypes = props.statusTypes) !== null && _props$statusTypes !== void 0 && _props$statusTypes.length ? props === null || props === void 0 ? void 0 : props.statusTypes : jobStatusOptions;
|
|
23
35
|
};
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
36
|
+
const getDefaultJobStatuses = props => getJobStatusOptions(props).filter(s => s.category === STATUS_NOT_ACTIONED);
|
|
37
|
+
const getIncompleteJobStatuses = props => getJobStatusOptions(props).filter(s => s.category === STATUS_IN_PROGRESS);
|
|
38
|
+
const getJobStatus = (status, props) => {
|
|
39
|
+
const statusOptions = getJobStatusOptions(props);
|
|
40
|
+
// console.log('getJobStatus', JSON.stringify({ status, statusOptions }, null, 2));
|
|
41
|
+
let statusOption = null;
|
|
42
|
+
if (status) statusOption = statusOptions.find(s => s.text === status);
|
|
43
|
+
return statusOption || getDefaultJobStatuses(props)[0];
|
|
31
44
|
};
|
|
32
|
-
|
|
45
|
+
const getDefaultJobPriority = () => jobPriorityOptions.find(p => p.default);
|
|
46
|
+
const getJobPriority = priority => jobPriorityOptions.find(p => p.label === priority) || getDefaultJobPriority();
|
|
47
|
+
export { jobStatusOptions, jobPriorityOptions, getJobStatusOptions, getDefaultJobStatuses, getIncompleteJobStatuses, getJobStatus, getJobPriority, getDefaultJobPriority };
|
|
33
48
|
//# sourceMappingURL=helper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["Colours","STATUS_NOT_ACTIONED","STATUS_IN_PROGRESS","STATUS_COMPLETED","jobStatusOptions","text","order","color","LINEGREY","category","COLOUR_TEAL","COLOUR_GREEN_LIGHT","jobPriorityOptions","label","COLOUR_GREEN","default","COLOUR_TANGERINE","COLOUR_RED","getJobStatusOptions","props","_props$statusTypes","statusTypes","length","getDefaultJobStatuses","filter","s","getIncompleteJobStatuses","getJobStatus","status","statusOptions","statusOption","find","getDefaultJobPriority","p","getJobPriority","priority"],"sources":["helper.js"],"sourcesContent":["import { Colours } from \"./core.config\";\n\nconst STATUS_NOT_ACTIONED = \"Not Actioned\";\nconst STATUS_IN_PROGRESS = \"In Progress\";\nconst STATUS_COMPLETED = \"Completed\";\n\nconst jobStatusOptions = [\n\t{\n\t\ttext: \"Open\",\n\t\torder: 0,\n\t\tcolor: Colours.LINEGREY,\n\t\tcategory: STATUS_NOT_ACTIONED,\n\t},\n\t{\n\t\ttext: \"In Progress\",\n\t\torder: 1,\n\t\tcolor: Colours.COLOUR_TEAL,\n\t\tcategory: STATUS_IN_PROGRESS,\n\t},\n\t{\n\t\ttext: \"Completed\",\n\t\torder: 2,\n\t\tcolor: Colours.COLOUR_GREEN_LIGHT,\n\t\tcategory: STATUS_COMPLETED,\n\t},\n];\n\nconst jobPriorityOptions = [\n\t{\n\t\tlabel: \"Low\",\n\t\tcolor: Colours.COLOUR_GREEN,\n\t\tdefault: true,\n\t},\n\t{\n\t\tlabel: \"Medium\",\n\t\tcolor: Colours.COLOUR_TANGERINE,\n\t},\n\t{\n\t\tlabel: \"High\",\n\t\tcolor: Colours.COLOUR_RED,\n\t},\n];\n\nconst getJobStatusOptions = (props) =>\n\tprops?.statusTypes?.length ? props?.statusTypes : jobStatusOptions;\n\nconst getDefaultJobStatuses = (props) =>\n\tgetJobStatusOptions(props).filter((s) => s.category === STATUS_NOT_ACTIONED);\n\nconst getIncompleteJobStatuses = (props) =>\n\tgetJobStatusOptions(props).filter((s) => s.category === STATUS_IN_PROGRESS);\n\nconst getJobStatus = (status, props) => {\n\tconst statusOptions = getJobStatusOptions(props);\n\t// console.log('getJobStatus', JSON.stringify({ status, statusOptions }, null, 2));\n\tlet statusOption = null;\n\tif (status) statusOption = statusOptions.find((s) => s.text === status);\n\treturn statusOption || getDefaultJobStatuses(props)[0];\n};\n\nconst getDefaultJobPriority = () => jobPriorityOptions.find((p) => p.default);\n\nconst getJobPriority = (priority) =>\n\tjobPriorityOptions.find((p) => p.label === priority) ||\n\tgetDefaultJobPriority();\n\nexport {\n\tjobStatusOptions,\n\tjobPriorityOptions,\n\tgetJobStatusOptions,\n\tgetDefaultJobStatuses,\n\tgetIncompleteJobStatuses,\n\tgetJobStatus,\n\tgetJobPriority,\n\tgetDefaultJobPriority,\n};\n"],"mappings":"AAAA,SAASA,OAAO,QAAQ,eAAe;AAEvC,MAAMC,mBAAmB,GAAG,cAAc;AAC1C,MAAMC,kBAAkB,GAAG,aAAa;AACxC,MAAMC,gBAAgB,GAAG,WAAW;AAEpC,MAAMC,gBAAgB,GAAG,CACxB;EACCC,IAAI,EAAE,MAAM;EACZC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACQ,QAAQ;EACvBC,QAAQ,EAAER;AACX,CAAC,EACD;EACCI,IAAI,EAAE,aAAa;EACnBC,KAAK,EAAE,CAAC;EACRC,KAAK,EAAEP,OAAO,CAACU,WAAW;EAC1BD,QAAQ,EAAEP;AACX,CAAC,EACD;EACCG,IAAI,EAAE,WAAW;EACjBC,KAAK,EAAE,C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AAC;AACvD,CAAC;AAED,MAAMa,qBAAqB,GAAGA,CAAA,KAAMpB,kBAAkB,CAACmB,IAAI,CAAEE,CAAC,IAAKA,CAAC,CAAClB,OAAO,CAAC;AAE7E,MAAMmB,cAAc,GAAIC,QAAQ,IAC/BvB,kBAAkB,CAACmB,IAAI,CAAEE,CAAC,IAAKA,CAAC,CAACpB,KAAK,KAAKsB,QAAQ,CAAC,IACpDH,qBAAqB,CAAC,CAAC;AAExB,SACC5B,gBAAgB,EAChBQ,kBAAkB,EAClBM,mBAAmB,EACnBK,qBAAqB,EACrBG,wBAAwB,EACxBC,YAAY,EACZO,cAAc,EACdF,qBAAqB","ignoreList":[]}
|
package/dist/module/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import MaintenancePage from
|
|
2
|
-
import RequestDetail from
|
|
3
|
-
import ServiceRequest from
|
|
4
|
-
import JobTypePicker from
|
|
5
|
-
import RequestNotes from
|
|
6
|
-
import
|
|
7
|
-
import
|
|
1
|
+
import MaintenancePage from "./screens/MaintenancePage";
|
|
2
|
+
import RequestDetail from "./screens/RequestDetail";
|
|
3
|
+
import ServiceRequest from "./screens/ServiceRequest";
|
|
4
|
+
import JobTypePicker from "./screens/JobTypePicker";
|
|
5
|
+
import RequestNotes from "./screens/RequestNotes";
|
|
6
|
+
import MaintenanceUserPicker from "./screens/MaintenanceUserPicker";
|
|
7
|
+
import JobsReducer from "./reducers/JobsReducer";
|
|
8
|
+
import { values } from "./values.config";
|
|
8
9
|
export const Reducers = (() => {
|
|
9
10
|
const reducers = {};
|
|
10
11
|
reducers[values.reducerKey] = JobsReducer;
|
|
@@ -17,9 +18,10 @@ export const Screens = (() => {
|
|
|
17
18
|
screens[values.screenServiceRequest] = ServiceRequest;
|
|
18
19
|
screens[values.screenJobTypePicker] = JobTypePicker;
|
|
19
20
|
screens[values.screenRequestNotes] = RequestNotes;
|
|
21
|
+
screens[values.screenUserPicker] = MaintenanceUserPicker;
|
|
20
22
|
return screens;
|
|
21
23
|
})();
|
|
22
|
-
export { default as Config } from
|
|
23
|
-
export { default as WidgetSmall } from
|
|
24
|
-
export { default as WidgetLarge } from
|
|
24
|
+
export { default as Config } from "./feature.config";
|
|
25
|
+
export { default as WidgetSmall } from "./components/WidgetSmall";
|
|
26
|
+
export { default as WidgetLarge } from "./components/WidgetLarge";
|
|
25
27
|
//# sourceMappingURL=index.js.map
|
package/dist/module/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["MaintenancePage","RequestDetail","ServiceRequest","JobTypePicker","RequestNotes","JobsReducer","values","Reducers","reducers","reducerKey","Screens","screens","screenMaintenance","screenRequestDetail","screenServiceRequest","screenJobTypePicker","screenRequestNotes","default","Config","WidgetSmall","WidgetLarge"],"sources":["index.js"],"sourcesContent":["import MaintenancePage from
|
|
1
|
+
{"version":3,"names":["MaintenancePage","RequestDetail","ServiceRequest","JobTypePicker","RequestNotes","MaintenanceUserPicker","JobsReducer","values","Reducers","reducers","reducerKey","Screens","screens","screenMaintenance","screenRequestDetail","screenServiceRequest","screenJobTypePicker","screenRequestNotes","screenUserPicker","default","Config","WidgetSmall","WidgetLarge"],"sources":["index.js"],"sourcesContent":["import MaintenancePage from \"./screens/MaintenancePage\";\nimport RequestDetail from \"./screens/RequestDetail\";\nimport ServiceRequest from \"./screens/ServiceRequest\";\nimport JobTypePicker from \"./screens/JobTypePicker\";\nimport RequestNotes from \"./screens/RequestNotes\";\nimport MaintenanceUserPicker from \"./screens/MaintenanceUserPicker\";\nimport JobsReducer from \"./reducers/JobsReducer\";\nimport { values } from \"./values.config\";\n\nexport const Reducers = (() => {\n\tconst reducers = {};\n\treducers[values.reducerKey] = JobsReducer;\n\treturn reducers;\n})();\nexport const Screens = (() => {\n\tconst screens = {};\n\tscreens[values.screenMaintenance] = MaintenancePage;\n\tscreens[values.screenRequestDetail] = RequestDetail;\n\tscreens[values.screenServiceRequest] = ServiceRequest;\n\tscreens[values.screenJobTypePicker] = JobTypePicker;\n\tscreens[values.screenRequestNotes] = RequestNotes;\n\tscreens[values.screenUserPicker] = MaintenanceUserPicker;\n\treturn screens;\n})();\nexport { default as Config } from \"./feature.config\";\nexport { default as WidgetSmall } from \"./components/WidgetSmall\";\nexport { default as WidgetLarge } from \"./components/WidgetLarge\";\n"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2BAA2B;AACvD,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,cAAc,MAAM,0BAA0B;AACrD,OAAOC,aAAa,MAAM,yBAAyB;AACnD,OAAOC,YAAY,MAAM,wBAAwB;AACjD,OAAOC,qBAAqB,MAAM,iCAAiC;AACnE,OAAOC,WAAW,MAAM,wBAAwB;AAChD,SAASC,MAAM,QAAQ,iBAAiB;AAExC,OAAO,MAAMC,QAAQ,GAAG,CAAC,MAAM;EAC9B,MAAMC,QAAQ,GAAG,CAAC,CAAC;EACnBA,QAAQ,CAACF,MAAM,CAACG,UAAU,CAAC,GAAGJ,WAAW;EACzC,OAAOG,QAAQ;AAChB,CAAC,EAAE,CAAC;AACJ,OAAO,MAAME,OAAO,GAAG,CAAC,MAAM;EAC7B,MAAMC,OAAO,GAAG,CAAC,CAAC;EAClBA,OAAO,CAACL,MAAM,CAACM,iBAAiB,CAAC,GAAGb,eAAe;EACnDY,OAAO,CAACL,MAAM,CAACO,mBAAmB,CAAC,GAAGb,aAAa;EACnDW,OAAO,CAACL,MAAM,CAACQ,oBAAoB,CAAC,GAAGb,cAAc;EACrDU,OAAO,CAACL,MAAM,CAACS,mBAAmB,CAAC,GAAGb,aAAa;EACnDS,OAAO,CAACL,MAAM,CAACU,kBAAkB,CAAC,GAAGb,YAAY;EACjDQ,OAAO,CAACL,MAAM,CAACW,gBAAgB,CAAC,GAAGb,qBAAqB;EACxD,OAAOO,OAAO;AACf,CAAC,EAAE,CAAC;AACJ,SAASO,OAAO,IAAIC,MAAM,QAAQ,kBAAkB;AACpD,SAASD,OAAO,IAAIE,WAAW,QAAQ,0BAA0B;AACjE,SAASF,OAAO,IAAIG,WAAW,QAAQ,0BAA0B","ignoreList":[]}
|
|
@@ -1,16 +1,28 @@
|
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
|
2
|
-
import _ from
|
|
3
|
-
import { REHYDRATE } from
|
|
4
|
-
import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED } from
|
|
5
|
-
import { ActionTypes } from
|
|
6
|
-
import { values } from
|
|
2
|
+
import _ from "lodash";
|
|
3
|
+
import { REHYDRATE } from "redux-persist";
|
|
4
|
+
import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED, JOBS_STATUSES_LOADED, JOBS_HIDE_SEEN, JOB_FILTER_LOADED } from "../actions/types";
|
|
5
|
+
import { ActionTypes } from "../core.config";
|
|
6
|
+
import { values } from "../values.config";
|
|
7
7
|
const REDUCER_KEY = values.reducerKey;
|
|
8
8
|
const INITIAL_STATE = {
|
|
9
|
-
jobs: []
|
|
9
|
+
jobs: [],
|
|
10
|
+
jobstatuses: [],
|
|
11
|
+
hideSeen: false,
|
|
12
|
+
jobfilters: {
|
|
13
|
+
status: "",
|
|
14
|
+
statusText: "",
|
|
15
|
+
priority: "",
|
|
16
|
+
priorityText: "",
|
|
17
|
+
type: "",
|
|
18
|
+
assignee: "",
|
|
19
|
+
assigneeName: ""
|
|
20
|
+
}
|
|
10
21
|
};
|
|
11
22
|
export default (state = INITIAL_STATE, action) => {
|
|
12
23
|
let updateJobs = [];
|
|
13
24
|
let index = 0;
|
|
25
|
+
let jobstatuses = [];
|
|
14
26
|
switch (action.type) {
|
|
15
27
|
case ActionTypes.LOGOUT:
|
|
16
28
|
case ActionTypes.CHANGE_ROLE:
|
|
@@ -47,6 +59,24 @@ export default (state = INITIAL_STATE, action) => {
|
|
|
47
59
|
...state,
|
|
48
60
|
jobs: updateJobs
|
|
49
61
|
};
|
|
62
|
+
case JOBS_STATUSES_LOADED:
|
|
63
|
+
jobstatuses = _.orderBy(_.unionWith(action.payload, state.jobstatuses, (v1, v2) => {
|
|
64
|
+
return v1 != null && v2 != null && v1.text === v2.text;
|
|
65
|
+
}), "order", "asc");
|
|
66
|
+
return {
|
|
67
|
+
...state,
|
|
68
|
+
jobstatuses
|
|
69
|
+
};
|
|
70
|
+
case JOBS_HIDE_SEEN:
|
|
71
|
+
return {
|
|
72
|
+
...state,
|
|
73
|
+
hideSeen: action.payload
|
|
74
|
+
};
|
|
75
|
+
case JOB_FILTER_LOADED:
|
|
76
|
+
return {
|
|
77
|
+
...state,
|
|
78
|
+
jobfilters: action.payload || INITIAL_STATE.jobfilters
|
|
79
|
+
};
|
|
50
80
|
case REHYDRATE:
|
|
51
81
|
if (!action.payload) return state;
|
|
52
82
|
if (action.payload[REDUCER_KEY]) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_","REHYDRATE","JOBS_LOADED","JOB_ADDED","JOBS_ADDED","ActionTypes","values","REDUCER_KEY","reducerKey","INITIAL_STATE","jobs","state","action","updateJobs","index","
|
|
1
|
+
{"version":3,"names":["_","REHYDRATE","JOBS_LOADED","JOB_ADDED","JOBS_ADDED","JOBS_STATUSES_LOADED","JOBS_HIDE_SEEN","JOB_FILTER_LOADED","ActionTypes","values","REDUCER_KEY","reducerKey","INITIAL_STATE","jobs","jobstatuses","hideSeen","jobfilters","status","statusText","priority","priorityText","type","assignee","assigneeName","state","action","updateJobs","index","LOGOUT","CHANGE_ROLE","payload","map","job","title","description","unionWith","j1","j2","id","findIndex","item","push","orderBy","v1","v2","text"],"sources":["JobsReducer.js"],"sourcesContent":["/* eslint-disable no-param-reassign */\nimport _ from \"lodash\";\nimport { REHYDRATE } from \"redux-persist\";\nimport {\n\tJOBS_LOADED,\n\tJOB_ADDED,\n\tJOBS_ADDED,\n\tJOBS_STATUSES_LOADED,\n\tJOBS_HIDE_SEEN,\n\tJOB_FILTER_LOADED,\n} from \"../actions/types\";\nimport { ActionTypes } from \"../core.config\";\nimport { values } from \"../values.config\";\n\nconst REDUCER_KEY = values.reducerKey;\n\nconst INITIAL_STATE = {\n\tjobs: [],\n\tjobstatuses: [],\n\thideSeen: false,\n\tjobfilters: {\n\t\tstatus: \"\",\n\t\tstatusText: \"\",\n\t\tpriority: \"\",\n\t\tpriorityText: \"\",\n\t\ttype: \"\",\n\t\tassignee: \"\",\n\t\tassigneeName: \"\",\n\t},\n};\n\nexport default (state = INITIAL_STATE, action) => {\n\tlet updateJobs = [];\n\tlet index = 0;\n\tlet jobstatuses = [];\n\n\tswitch (action.type) {\n\t\tcase ActionTypes.LOGOUT:\n\t\tcase ActionTypes.CHANGE_ROLE:\n\t\t\treturn INITIAL_STATE;\n\t\tcase JOBS_LOADED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tjobs: action.payload.map((job) => ({\n\t\t\t\t\ttitle: job.title || job.description,\n\t\t\t\t\t...job,\n\t\t\t\t})),\n\t\t\t};\n\t\tcase JOBS_ADDED:\n\t\t\tupdateJobs = action.payload.map((job) => ({\n\t\t\t\ttitle: job.title || job.description,\n\t\t\t\t...job,\n\t\t\t}));\n\t\t\tupdateJobs = _.unionWith(updateJobs, state.jobs, (j1, j2) => {\n\t\t\t\treturn j1.id === j2.id;\n\t\t\t});\n\t\t\treturn { ...state, jobs: updateJobs };\n\t\tcase JOB_ADDED:\n\t\t\tupdateJobs = [...state.jobs];\n\t\t\tindex = updateJobs.findIndex((item) => item.id === action.payload.id);\n\t\t\tif (index > -1) {\n\t\t\t\tupdateJobs[index] = action.payload;\n\t\t\t} else {\n\t\t\t\tupdateJobs.push(action.payload);\n\t\t\t}\n\t\t\treturn { ...state, jobs: updateJobs };\n\t\tcase JOBS_STATUSES_LOADED:\n\t\t\tjobstatuses = _.orderBy(\n\t\t\t\t_.unionWith(action.payload, state.jobstatuses, (v1, v2) => {\n\t\t\t\t\treturn v1 != null && v2 != null && v1.text === v2.text;\n\t\t\t\t}),\n\t\t\t\t\"order\",\n\t\t\t\t\"asc\",\n\t\t\t);\n\t\t\treturn { ...state, jobstatuses };\n\t\tcase JOBS_HIDE_SEEN:\n\t\t\treturn { ...state, hideSeen: action.payload };\n\t\tcase JOB_FILTER_LOADED:\n\t\t\treturn {\n\t\t\t\t...state,\n\t\t\t\tjobfilters: action.payload || INITIAL_STATE.jobfilters,\n\t\t\t};\n\t\tcase REHYDRATE:\n\t\t\tif (!action.payload) return state;\n\t\t\tif (action.payload[REDUCER_KEY]) {\n\t\t\t\tif (action.payload[REDUCER_KEY].jobs == null) {\n\t\t\t\t\taction.payload[REDUCER_KEY].jobs = [];\n\t\t\t\t}\n\t\t\t\treturn action.payload[REDUCER_KEY];\n\t\t\t}\n\t\t\treturn state;\n\t\tdefault:\n\t\t\treturn state;\n\t}\n};\n"],"mappings":"AAAA;AACA,OAAOA,CAAC,MAAM,QAAQ;AACtB,SAASC,SAAS,QAAQ,eAAe;AACzC,SACCC,WAAW,EACXC,SAAS,EACTC,UAAU,EACVC,oBAAoB,EACpBC,cAAc,EACdC,iBAAiB,QACX,kBAAkB;AACzB,SAASC,WAAW,QAAQ,gBAAgB;AAC5C,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,MAAMC,WAAW,GAAGD,MAAM,CAACE,UAAU;AAErC,MAAMC,aAAa,GAAG;EACrBC,IAAI,EAAE,EAAE;EACRC,WAAW,EAAE,EAAE;EACfC,QAAQ,EAAE,KAAK;EACfC,UAAU,EAAE;IACXC,MAAM,EAAE,EAAE;IACVC,UAAU,EAAE,EAAE;IACdC,QAAQ,EAAE,EAAE;IACZC,YAAY,EAAE,EAAE;IAChBC,IAAI,EAAE,EAAE;IACRC,QAAQ,EAAE,EAAE;IACZC,YAAY,EAAE;EACf;AACD,CAAC;AAED,eAAe,CAACC,KAAK,GAAGZ,aAAa,EAAEa,MAAM,KAAK;EACjD,IAAIC,UAAU,GAAG,EAAE;EACnB,IAAIC,KAAK,GAAG,CAAC;EACb,IAAIb,WAAW,GAAG,EAAE;EAEpB,QAAQW,MAAM,CAACJ,IAAI;IAClB,KAAKb,WAAW,CAACoB,MAAM;IACv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AC,CAACmC,SAAS,CAACV,MAAM,CAACK,OAAO,EAAEN,KAAK,CAACV,WAAW,EAAE,CAAC6B,EAAE,EAAEC,EAAE,KAAK;QAC1D,OAAOD,EAAE,IAAI,IAAI,IAAIC,EAAE,IAAI,IAAI,IAAID,EAAE,CAACE,IAAI,KAAKD,EAAE,CAACC,IAAI;MACvD,CAAC,CAAC,EACF,OAAO,EACP,KACD,CAAC;MACD,OAAO;QAAE,GAAGrB,KAAK;QAAEV;MAAY,CAAC;IACjC,KAAKR,cAAc;MAClB,OAAO;QAAE,GAAGkB,KAAK;QAAET,QAAQ,EAAEU,MAAM,CAACK;MAAQ,CAAC;IAC9C,KAAKvB,iBAAiB;MACrB,OAAO;QACN,GAAGiB,KAAK;QACRR,UAAU,EAAES,MAAM,CAACK,OAAO,IAAIlB,aAAa,CAACI;MAC7C,CAAC;IACF,KAAKf,SAAS;MACb,IAAI,CAACwB,MAAM,CAACK,OAAO,EAAE,OAAON,KAAK;MACjC,IAAIC,MAAM,CAACK,OAAO,CAACpB,WAAW,CAAC,EAAE;QAChC,IAAIe,MAAM,CAACK,OAAO,CAACpB,WAAW,CAAC,CAACG,IAAI,IAAI,IAAI,EAAE;UAC7CY,MAAM,CAACK,OAAO,CAACpB,WAAW,CAAC,CAACG,IAAI,GAAG,EAAE;QACtC;QACA,OAAOY,MAAM,CAACK,OAAO,CAACpB,WAAW,CAAC;MACnC;MACA,OAAOc,KAAK;IACb;MACC,OAAOA,KAAK;EACd;AACD,CAAC","ignoreList":[]}
|
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
import React, { Component } from
|
|
5
|
-
import _ from
|
|
6
|
-
import { TouchableOpacity, View, ScrollView
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
4
|
+
import React, { Component } from "react";
|
|
5
|
+
import _ from "lodash";
|
|
6
|
+
import { TouchableOpacity, View, ScrollView } from "react-native";
|
|
7
|
+
import { Text } from "@plusscommunities/pluss-core-app/components";
|
|
8
|
+
import { connect } from "react-redux";
|
|
9
|
+
import { Icon } from "@rneui/themed";
|
|
10
|
+
import { Services } from "../feature.config";
|
|
11
|
+
import { Components, Colours } from "../core.config";
|
|
11
12
|
class JobTypePicker extends Component {
|
|
12
13
|
constructor(...args) {
|
|
13
14
|
super(...args);
|
|
@@ -69,7 +70,7 @@ class JobTypePicker extends Component {
|
|
|
69
70
|
,
|
|
70
71
|
type: "font-awesome",
|
|
71
72
|
iconStyle: [{
|
|
72
|
-
color:
|
|
73
|
+
color: "#d5d9e0",
|
|
73
74
|
fontSize: 20
|
|
74
75
|
}, rep.typeName === this.state.currentType && {
|
|
75
76
|
color: Colours.COLOUR_GREEN
|
|
@@ -96,33 +97,33 @@ class JobTypePicker extends Component {
|
|
|
96
97
|
const styles = {
|
|
97
98
|
container: {
|
|
98
99
|
flex: 1,
|
|
99
|
-
position:
|
|
100
|
-
backgroundColor:
|
|
100
|
+
position: "relative",
|
|
101
|
+
backgroundColor: "#f0f0f5"
|
|
101
102
|
},
|
|
102
103
|
row: {
|
|
103
|
-
flexDirection:
|
|
104
|
-
alignItems:
|
|
104
|
+
flexDirection: "row",
|
|
105
|
+
alignItems: "center",
|
|
105
106
|
minHeight: 22
|
|
106
107
|
},
|
|
107
108
|
text: {
|
|
108
109
|
flex: 1,
|
|
109
|
-
fontFamily:
|
|
110
|
+
fontFamily: "sf-regular",
|
|
110
111
|
fontSize: 14,
|
|
111
112
|
color: Colours.TEXT_DARK
|
|
112
113
|
},
|
|
113
114
|
labelContainer: {
|
|
114
|
-
flexDirection:
|
|
115
|
-
justifyContent:
|
|
115
|
+
flexDirection: "row",
|
|
116
|
+
justifyContent: "space-between"
|
|
116
117
|
},
|
|
117
118
|
labelText: {
|
|
118
|
-
fontFamily:
|
|
119
|
+
fontFamily: "sf-medium",
|
|
119
120
|
fontSize: 16,
|
|
120
121
|
color: Colours.TEXT_DARK
|
|
121
122
|
},
|
|
122
123
|
description: {
|
|
123
124
|
marginTop: 5,
|
|
124
125
|
fontSize: 14,
|
|
125
|
-
fontFamily:
|
|
126
|
+
fontFamily: "sf-regular",
|
|
126
127
|
color: Colours.TEXT_DARK
|
|
127
128
|
}
|
|
128
129
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","_","TouchableOpacity","View","ScrollView","Text","connect","Icon","Services","Components","Colours","JobTypePicker","constructor","args","_defineProperty","currentType","UNSAFE_componentWillMount","setState","props","onPressBack","navigation","goBack","onTypePress","type","onSelectType","setTimeout","renderMain","isEmpty","types","createElement","style","marginTop","Spinner","FormCard","renderOptions","map","rep","index","key","onPress","bind","typeName","FormCardSection","label","labelStyle","height","margin","hasUnderline","hasContent","styles","labelContainer","labelText","name","iconStyle","color","fontSize","state","COLOUR_GREEN","description","render","container","Header","leftIcon","onPressLeft","text","flex","position","backgroundColor","row","flexDirection","alignItems","minHeight","fontFamily","TEXT_DARK","justifyContent"],"sources":["JobTypePicker.js"],"sourcesContent":["import React, { Component } from
|
|
1
|
+
{"version":3,"names":["React","Component","_","TouchableOpacity","View","ScrollView","Text","connect","Icon","Services","Components","Colours","JobTypePicker","constructor","args","_defineProperty","currentType","UNSAFE_componentWillMount","setState","props","onPressBack","navigation","goBack","onTypePress","type","onSelectType","setTimeout","renderMain","isEmpty","types","createElement","style","marginTop","Spinner","FormCard","renderOptions","map","rep","index","key","onPress","bind","typeName","FormCardSection","label","labelStyle","height","margin","hasUnderline","hasContent","styles","labelContainer","labelText","name","iconStyle","color","fontSize","state","COLOUR_GREEN","description","render","container","Header","leftIcon","onPressLeft","text","flex","position","backgroundColor","row","flexDirection","alignItems","minHeight","fontFamily","TEXT_DARK","justifyContent"],"sources":["JobTypePicker.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport _ from \"lodash\";\nimport { TouchableOpacity, View, ScrollView } from \"react-native\";\nimport { Text } from \"@plusscommunities/pluss-core-app/components\";\nimport { connect } from \"react-redux\";\nimport { Icon } from \"@rneui/themed\";\nimport { Services } from \"../feature.config\";\nimport { Components, Colours } from \"../core.config\";\n\nclass JobTypePicker extends Component {\n\tstate = {\n\t\tcurrentType: null,\n\t};\n\n\tUNSAFE_componentWillMount() {\n\t\tthis.setState({ currentType: this.props.currentType });\n\t}\n\n\tonPressBack() {\n\t\tServices.navigation.goBack();\n\t}\n\n\tonTypePress(type) {\n\t\tthis.props.onSelectType(type);\n\t\tthis.setState({ currentType: type });\n\t\tsetTimeout(() => {\n\t\t\tthis.onPressBack();\n\t\t}, 200);\n\t}\n\n\trenderMain() {\n\t\tif (_.isEmpty(this.props.types)) {\n\t\t\treturn (\n\t\t\t\t<View style={{ marginTop: 16 }}>\n\t\t\t\t\t<Components.Spinner />\n\t\t\t\t</View>\n\t\t\t);\n\t\t}\n\n\t\treturn (\n\t\t\t<Components.FormCard style={{ marginTop: 16 }}>\n\t\t\t\t{this.renderOptions()}\n\t\t\t</Components.FormCard>\n\t\t);\n\t}\n\n\trenderOptions() {\n\t\treturn this.props.types.map((rep, index) => {\n\t\t\treturn (\n\t\t\t\t<TouchableOpacity\n\t\t\t\t\tkey={index}\n\t\t\t\t\tonPress={this.onTypePress.bind(this, rep.typeName)}\n\t\t\t\t>\n\t\t\t\t\t<Components.FormCardSection\n\t\t\t\t\t\tlabel={rep.typeName}\n\t\t\t\t\t\tlabelStyle={{ height: 0, margin: 0 }}\n\t\t\t\t\t\thasUnderline\n\t\t\t\t\t\thasContent\n\t\t\t\t\t>\n\t\t\t\t\t\t<View style={styles.labelContainer}>\n\t\t\t\t\t\t\t<Text style={styles.labelText}>{rep.typeName}</Text>\n\t\t\t\t\t\t\t<Icon\n\t\t\t\t\t\t\t\tname=\"check-circle\"\n\t\t\t\t\t\t\t\t//style={styles.uploadButtonInner}\n\t\t\t\t\t\t\t\ttype=\"font-awesome\"\n\t\t\t\t\t\t\t\ticonStyle={[\n\t\t\t\t\t\t\t\t\t{ color: \"#d5d9e0\", fontSize: 20 },\n\t\t\t\t\t\t\t\t\trep.typeName === this.state.currentType && {\n\t\t\t\t\t\t\t\t\t\tcolor: Colours.COLOUR_GREEN,\n\t\t\t\t\t\t\t\t\t},\n\t\t\t\t\t\t\t\t]}\n\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t</View>\n\t\t\t\t\t\t{!_.isEmpty(rep.description) && (\n\t\t\t\t\t\t\t<Text style={styles.description}>{rep.description}</Text>\n\t\t\t\t\t\t)}\n\t\t\t\t\t</Components.FormCardSection>\n\t\t\t\t</TouchableOpacity>\n\t\t\t);\n\t\t});\n\t}\n\n\trender() {\n\t\treturn (\n\t\t\t<View style={styles.container}>\n\t\t\t\t<Components.Header\n\t\t\t\t\tleftIcon=\"angle-left\"\n\t\t\t\t\tonPressLeft={this.onPressBack.bind(this)}\n\t\t\t\t\ttext=\"Select type\"\n\t\t\t\t/>\n\t\t\t\t<ScrollView style={{ flex: 1 }}>{this.renderMain()}</ScrollView>\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = {\n\tcontainer: {\n\t\tflex: 1,\n\t\tposition: \"relative\",\n\t\tbackgroundColor: \"#f0f0f5\",\n\t},\n\trow: {\n\t\tflexDirection: \"row\",\n\t\talignItems: \"center\",\n\t\tminHeight: 22,\n\t},\n\ttext: {\n\t\tflex: 1,\n\t\tfontFamily: \"sf-regular\",\n\t\tfontSize: 14,\n\t\tcolor: Colours.TEXT_DARK,\n\t},\n\tlabelContainer: {\n\t\tflexDirection: \"row\",\n\t\tjustifyContent: \"space-between\",\n\t},\n\tlabelText: {\n\t\tfontFamily: \"sf-medium\",\n\t\tfontSize: 16,\n\t\tcolor: Colours.TEXT_DARK,\n\t},\n\tdescription: {\n\t\tmarginTop: 5,\n\t\tfontSize: 14,\n\t\tfontFamily: \"sf-regular\",\n\t\tcolor: Colours.TEXT_DARK,\n\t},\n};\n\nexport default connect(null, {})(JobTypePicker);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,gBAAgB,EAAEC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AACjE,SAASC,IAAI,QAAQ,6CAA6C;AAClE,SAASC,OAAO,QAAQ,aAAa;AACrC,SAASC,IAAI,QAAQ,eAAe;AACpC,SAASC,QAAQ,QAAQ,mBAAmB;AAC5C,SAASC,UAAU,EAAEC,OAAO,QAAQ,gBAAgB;AAEpD,MAAMC,aAAa,SAASX,SAAS,CAAC;EAAAY,YAAA,GAAAC,IAAA;IAAA,SAAAA,IAAA;IAAAC,eAAA,gBAC7B;MACPC,WAAW,EAAE;IACd,CAAC;EAAA;EAEDC,yBAAyBA,CAAA,EAAG;IAC3B,IAAI,CAACC,QAAQ,CAAC;MAAEF,WAAW,EAAE,IAAI,CAACG,KAAK,CAACH;IAAY,CAAC,CAAC;EACvD;EAEAI,WAAWA,CAAA,EAAG;IACbX,QAAQ,CAACY,UAAU,CAACC,MAAM,CAAC,CAAC;EAC7B;EAEAC,WAAWA,CAACC,IAAI,EAAE;IACjB,IAAI,CAACL,KAAK,CAACM,YAAY,CAACD,IAAI,CAAC;IAC7B,IAAI,CAACN,QAAQ,CAAC;MAAEF,WAAW,EAAEQ;IAAK,CAAC,CAAC;IACpCE,UAAU,CAAC,MAAM;MAChB,IAAI,CAACN,WAAW,CAAC,CAAC;IACnB,CAAC,EAAE,GAAG,CAAC;EACR;EAEAO,UAAUA,CAAA,EA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AE5C,OAAO,CAAC+D;EAChB,CAAC;EACDvB,cAAc,EAAE;IACfmB,aAAa,EAAE,KAAK;IACpBK,cAAc,EAAE;EACjB,CAAC;EACDvB,SAAS,EAAE;IACVqB,UAAU,EAAE,WAAW;IACvBjB,QAAQ,EAAE,EAAE;IACZD,KAAK,EAAE5C,OAAO,CAAC+D;EAChB,CAAC;EACDf,WAAW,EAAE;IACZ3B,SAAS,EAAE,CAAC;IACZwB,QAAQ,EAAE,EAAE;IACZiB,UAAU,EAAE,YAAY;IACxBlB,KAAK,EAAE5C,OAAO,CAAC+D;EAChB;AACD,CAAC;AAED,eAAenE,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,CAACK,aAAa,CAAC","ignoreList":[]}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
2
2
|
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
3
3
|
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
4
|
-
import React, { Component } from
|
|
5
|
-
import { View, StyleSheet } from
|
|
6
|
-
import { connect } from
|
|
7
|
-
import _ from
|
|
8
|
-
import MaintenanceList from
|
|
9
|
-
import { Services, BaseComponents } from
|
|
10
|
-
import { Components, Helper, Styles, Config } from
|
|
11
|
-
import { values } from
|
|
4
|
+
import React, { Component } from "react";
|
|
5
|
+
import { View, StyleSheet } from "react-native";
|
|
6
|
+
import { connect } from "react-redux";
|
|
7
|
+
import _ from "lodash";
|
|
8
|
+
import MaintenanceList from "../components/MaintenanceList";
|
|
9
|
+
import { Services, BaseComponents } from "../feature.config";
|
|
10
|
+
import { Components, Helper, Styles, Config } from "../core.config";
|
|
11
|
+
import { values } from "../values.config";
|
|
12
12
|
class MaintenancePage extends Component {
|
|
13
13
|
constructor(props) {
|
|
14
14
|
super(props);
|
|
@@ -36,7 +36,7 @@ class MaintenancePage extends Component {
|
|
|
36
36
|
if (this.state.isHomeTab) {
|
|
37
37
|
return /*#__PURE__*/React.createElement(Components.Header, {
|
|
38
38
|
text: title,
|
|
39
|
-
rightContent: _.includes(this.props.user.hidden,
|
|
39
|
+
rightContent: _.includes(this.props.user.hidden, "notifications") ? null : /*#__PURE__*/React.createElement(View, {
|
|
40
40
|
style: styles.notificationContainer
|
|
41
41
|
}, /*#__PURE__*/React.createElement(BaseComponents.NotificationBell, {
|
|
42
42
|
colourBrandingHeader: this.props.colourBrandingHeader,
|
|
@@ -71,7 +71,7 @@ const styles = StyleSheet.create({
|
|
|
71
71
|
flex: 1
|
|
72
72
|
},
|
|
73
73
|
notificationContainer: {
|
|
74
|
-
position:
|
|
74
|
+
position: "absolute",
|
|
75
75
|
top: 0,
|
|
76
76
|
bottom: 0,
|
|
77
77
|
right: 0,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","Component","View","StyleSheet","connect","_","MaintenanceList","Services","BaseComponents","Components","Helper","Styles","Config","values","MaintenancePage","constructor","props","_defineProperty","navigation","goBack","loading","setState","state","isHomeTab","componentDidMount","getParentRoute","renderHeader","title","strings","featureKey","textFeatureTitle","createElement","Header","text","rightContent","includes","user","hidden","style","styles","notificationContainer","NotificationBell","colourBrandingHeader","containerStyle","notificationBell","leftIcon","onPressLeft","onPressBack","render","container","LoadingIndicator","visible","maintenanceList","onLoadingChanged","enableAdd","options","create","flex","position","top","bottom","right","paddingTop","StatusBarHeight","marginTop","mapStateToProps","_state$strings","config"],"sources":["MaintenancePage.js"],"sourcesContent":["import React, { Component } from
|
|
1
|
+
{"version":3,"names":["React","Component","View","StyleSheet","connect","_","MaintenanceList","Services","BaseComponents","Components","Helper","Styles","Config","values","MaintenancePage","constructor","props","_defineProperty","navigation","goBack","loading","setState","state","isHomeTab","componentDidMount","getParentRoute","renderHeader","title","strings","featureKey","textFeatureTitle","createElement","Header","text","rightContent","includes","user","hidden","style","styles","notificationContainer","NotificationBell","colourBrandingHeader","containerStyle","notificationBell","leftIcon","onPressLeft","onPressBack","render","container","LoadingIndicator","visible","maintenanceList","onLoadingChanged","enableAdd","options","create","flex","position","top","bottom","right","paddingTop","StatusBarHeight","marginTop","mapStateToProps","_state$strings","config"],"sources":["MaintenancePage.js"],"sourcesContent":["import React, { Component } from \"react\";\nimport { View, StyleSheet } from \"react-native\";\nimport { connect } from \"react-redux\";\nimport _ from \"lodash\";\nimport MaintenanceList from \"../components/MaintenanceList\";\nimport { Services, BaseComponents } from \"../feature.config\";\nimport { Components, Helper, Styles, Config } from \"../core.config\";\nimport { values } from \"../values.config\";\n\nclass MaintenancePage extends Component {\n\tconstructor(props) {\n\t\tsuper(props);\n\t\tthis.state = {\n\t\t\tisHomeTab: false,\n\t\t\tloading: false,\n\t\t};\n\t}\n\n\tcomponentDidMount() {\n\t\t// console.log('!Services.navigation.getParentRoute()', !Services.navigation.getParentRoute());\n\t\tthis.setState({ isHomeTab: !Services.navigation.getParentRoute() });\n\t}\n\n\tonPressBack = () => {\n\t\tServices.navigation.goBack();\n\t};\n\n\tonLoadingChanged = (loading) => {\n\t\tthis.setState({ loading });\n\t};\n\n\trenderHeader() {\n\t\tconst title =\n\t\t\tthis.props.title ||\n\t\t\tthis.props.strings[`${values.featureKey}_textFeatureTitle`] ||\n\t\t\tvalues.textFeatureTitle;\n\t\tif (this.state.isHomeTab) {\n\t\t\treturn (\n\t\t\t\t<Components.Header\n\t\t\t\t\ttext={title}\n\t\t\t\t\trightContent={\n\t\t\t\t\t\t_.includes(this.props.user.hidden, \"notifications\") ? null : (\n\t\t\t\t\t\t\t<View style={styles.notificationContainer}>\n\t\t\t\t\t\t\t\t<BaseComponents.NotificationBell\n\t\t\t\t\t\t\t\t\tcolourBrandingHeader={this.props.colourBrandingHeader}\n\t\t\t\t\t\t\t\t\tcontainerStyle={Styles.notificationBell}\n\t\t\t\t\t\t\t\t/>\n\t\t\t\t\t\t\t</View>\n\t\t\t\t\t\t)\n\t\t\t\t\t}\n\t\t\t\t/>\n\t\t\t);\n\t\t}\n\t\treturn (\n\t\t\t<Components.Header\n\t\t\t\tleftIcon=\"angle-left\"\n\t\t\t\tonPressLeft={this.onPressBack}\n\t\t\t\ttext={values.textFeatureTitle}\n\t\t\t/>\n\t\t);\n\t}\n\n\trender() {\n\t\tconst { isHomeTab } = this.state;\n\n\t\treturn (\n\t\t\t<View style={styles.container}>\n\t\t\t\t{this.renderHeader()}\n\t\t\t\t<Components.LoadingIndicator visible={this.state.loading} />\n\t\t\t\t<MaintenanceList\n\t\t\t\t\tstyle={styles.maintenanceList}\n\t\t\t\t\tonLoadingChanged={this.onLoadingChanged}\n\t\t\t\t\tenableAdd={!isHomeTab}\n\t\t\t\t\toptions={this.props.options}\n\t\t\t\t/>\n\t\t\t\t{/* {isHomeTab && <Components.AddContentButton />} */}\n\t\t\t</View>\n\t\t);\n\t}\n}\n\nconst styles = StyleSheet.create({\n\tcontainer: {\n\t\tflex: 1,\n\t},\n\tnotificationContainer: {\n\t\tposition: \"absolute\",\n\t\ttop: 0,\n\t\tbottom: 0,\n\t\tright: 0,\n\t\tpaddingTop: Helper.StatusBarHeight(0),\n\t},\n\tmaintenanceList: {\n\t\tmarginTop: 12,\n\t},\n});\n\nconst mapStateToProps = (state) => {\n\treturn {\n\t\tuser: state.user,\n\t\tstrings: state.strings?.config || {},\n\t};\n};\n\nexport default connect(mapStateToProps, {})(MaintenancePage);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,UAAU,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,aAAa;AACrC,OAAOC,CAAC,MAAM,QAAQ;AACtB,OAAOC,eA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