@plusscommunities/pluss-maintenance-app 6.1.2-beta.0 → 7.0.0-beta.1

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.
Files changed (78) hide show
  1. package/dist/module/actions/JobActions.js +44 -1
  2. package/dist/module/actions/JobActions.js.map +1 -1
  3. package/dist/module/actions/types.js +3 -0
  4. package/dist/module/actions/types.js.map +1 -1
  5. package/dist/module/apis/index.js +3 -1
  6. package/dist/module/apis/index.js.map +1 -1
  7. package/dist/module/apis/{generalActions.js → maintenanceActions.js} +44 -45
  8. package/dist/module/apis/maintenanceActions.js.map +1 -0
  9. package/dist/module/components/FilterPopupMenu.js +78 -26
  10. package/dist/module/components/FilterPopupMenu.js.map +1 -1
  11. package/dist/module/components/MaintenanceList.js +70 -45
  12. package/dist/module/components/MaintenanceList.js.map +1 -1
  13. package/dist/module/components/MaintenanceListItem.js +54 -42
  14. package/dist/module/components/MaintenanceListItem.js.map +1 -1
  15. package/dist/module/components/MaintenanceWidgetItem.js +16 -20
  16. package/dist/module/components/MaintenanceWidgetItem.js.map +1 -1
  17. package/dist/module/components/PrioritySelectorPopup.js +82 -0
  18. package/dist/module/components/PrioritySelectorPopup.js.map +1 -0
  19. package/dist/module/components/StatusSelectorPopup.js +9 -13
  20. package/dist/module/components/StatusSelectorPopup.js.map +1 -1
  21. package/dist/module/components/WidgetSmall.js +13 -9
  22. package/dist/module/components/WidgetSmall.js.map +1 -1
  23. package/dist/module/feature.config.js +3 -3
  24. package/dist/module/feature.config.js.map +1 -1
  25. package/dist/module/helper.js +39 -17
  26. package/dist/module/helper.js.map +1 -1
  27. package/dist/module/reducers/JobsReducer.js +33 -3
  28. package/dist/module/reducers/JobsReducer.js.map +1 -1
  29. package/dist/module/screens/JobTypePicker.js +3 -3
  30. package/dist/module/screens/JobTypePicker.js.map +1 -1
  31. package/dist/module/screens/MaintenancePage.js +2 -2
  32. package/dist/module/screens/RequestDetail.js +340 -88
  33. package/dist/module/screens/RequestDetail.js.map +1 -1
  34. package/dist/module/screens/RequestNotes.js +437 -26
  35. package/dist/module/screens/RequestNotes.js.map +1 -1
  36. package/dist/module/screens/ServiceRequest.js +596 -93
  37. package/dist/module/screens/ServiceRequest.js.map +1 -1
  38. package/dist/module/values.config.a.js +9 -1
  39. package/dist/module/values.config.a.js.map +1 -1
  40. package/dist/module/values.config.default.js +15 -1
  41. package/dist/module/values.config.default.js.map +1 -1
  42. package/dist/module/values.config.forms.js +42 -0
  43. package/dist/module/values.config.forms.js.map +1 -0
  44. package/dist/module/values.config.js +34 -20
  45. package/dist/module/values.config.js.map +1 -1
  46. package/package.json +11 -11
  47. package/src/actions/JobActions.js +53 -1
  48. package/src/actions/types.js +4 -0
  49. package/src/apis/index.js +5 -1
  50. package/src/apis/{generalActions.js → maintenanceActions.js} +51 -43
  51. package/src/components/FilterPopupMenu.js +75 -24
  52. package/src/components/MaintenanceList.js +64 -33
  53. package/src/components/MaintenanceListItem.js +53 -31
  54. package/src/components/MaintenanceWidgetItem.js +18 -14
  55. package/src/components/PrioritySelectorPopup.js +79 -0
  56. package/src/components/StatusSelectorPopup.js +8 -13
  57. package/src/components/WidgetSmall.js +9 -7
  58. package/src/feature.config.js +15 -13
  59. package/src/helper.js +51 -13
  60. package/src/reducers/JobsReducer.js +27 -2
  61. package/src/screens/JobTypePicker.js +1 -1
  62. package/src/screens/RequestDetail.js +324 -75
  63. package/src/screens/RequestNotes.js +434 -33
  64. package/src/screens/ServiceRequest.js +642 -157
  65. package/src/values.config.a.js +8 -0
  66. package/src/values.config.default.js +14 -0
  67. package/src/values.config.forms.js +42 -0
  68. package/src/values.config.js +34 -20
  69. package/dist/module/apis/generalActions.js.map +0 -1
  70. package/dist/module/values.config.b.js +0 -28
  71. package/dist/module/values.config.b.js.map +0 -1
  72. package/dist/module/values.config.c.js +0 -28
  73. package/dist/module/values.config.c.js.map +0 -1
  74. package/dist/module/values.config.d.js +0 -28
  75. package/dist/module/values.config.d.js.map +0 -1
  76. package/src/values.config.b.js +0 -28
  77. package/src/values.config.c.js +0 -28
  78. package/src/values.config.d.js +0 -28
@@ -1,4 +1,7 @@
1
- import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED } from './types';
1
+ import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED, JOBS_STATUSES_LOADED, JOBS_HIDE_SEEN, JOB_FILTER_LOADED } from './types';
2
+ import { stringActions } from '../apis';
3
+ import { values } from '../values.config';
4
+ import { jobStatusOptions } from '../helper';
2
5
  export const jobsLoaded = jobs => {
3
6
  return {
4
7
  type: JOBS_LOADED,
@@ -17,4 +20,44 @@ export const jobsAdded = jobs => {
17
20
  payload: jobs
18
21
  };
19
22
  };
23
+ export const jobStatusesUpdate = (site, callback = null) => {
24
+ return dispatch => {
25
+ stringActions.getString(site, values.stringConfigJobStatus).then(res => {
26
+ dispatch({
27
+ type: JOBS_STATUSES_LOADED,
28
+ payload: res.data
29
+ });
30
+ if (callback) callback(res.data);
31
+ }).catch(() => {
32
+ dispatch({
33
+ type: JOBS_STATUSES_LOADED,
34
+ payload: jobStatusOptions
35
+ });
36
+ if (callback) callback(jobStatusOptions);
37
+ });
38
+ };
39
+ };
40
+ export const jobHideSeenUpdate = (site, callback = null) => {
41
+ return dispatch => {
42
+ stringActions.getString(site, values.stringConfigHideSeen).then(res => {
43
+ dispatch({
44
+ type: JOBS_HIDE_SEEN,
45
+ payload: res.data
46
+ });
47
+ if (callback) callback(res.data);
48
+ }).catch(_error => {
49
+ dispatch({
50
+ type: JOBS_HIDE_SEEN,
51
+ payload: false
52
+ });
53
+ if (callback) callback(false);
54
+ });
55
+ };
56
+ };
57
+ export const jobsFilterLoaded = filters => {
58
+ return {
59
+ type: JOB_FILTER_LOADED,
60
+ payload: filters
61
+ };
62
+ };
20
63
  //# sourceMappingURL=JobActions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["JOBS_LOADED","JOB_ADDED","JOBS_ADDED","jobsLoaded","jobs","type","payload","jobAdded","job","jobsAdded"],"sources":["JobActions.js"],"sourcesContent":["import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED } from './types';\n\nexport const jobsLoaded = jobs => {\n return {\n type: JOBS_LOADED,\n payload: jobs,\n };\n};\n\nexport const jobAdded = job => {\n return {\n type: JOB_ADDED,\n payload: job,\n };\n};\n\nexport const jobsAdded = jobs => {\n return {\n type: JOBS_ADDED,\n payload: jobs,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,UAAU,QAAQ,SAAS;AAE5D,OAAO,MAAMC,UAAU,GAAGC,IAAI,IAAI;EAChC,OAAO;IACLC,IAAI,EAAEL,WAAW;IACjBM,OAAO,EAAEF;EACX,CAAC;AACH,CAAC;AAED,OAAO,MAAMG,QAAQ,GAAGC,GAAG,IAAI;EAC7B,OAAO;IACLH,IAAI,EAAEJ,SAAS;IACfK,OAAO,EAAEE;EACX,CAAC;AACH,CAAC;AAED,OAAO,MAAMC,SAAS,GAAGL,IAAI,IAAI;EAC/B,OAAO;IACLC,IAAI,EAAEH,UAAU;IAChBI,OAAO,EAAEF;EACX,CAAC;AACH,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["JOBS_LOADED","JOB_ADDED","JOBS_ADDED","JOBS_STATUSES_LOADED","JOBS_HIDE_SEEN","JOB_FILTER_LOADED","stringActions","values","jobStatusOptions","jobsLoaded","jobs","type","payload","jobAdded","job","jobsAdded","jobStatusesUpdate","site","callback","dispatch","getString","stringConfigJobStatus","then","res","data","catch","jobHideSeenUpdate","stringConfigHideSeen","_error","jobsFilterLoaded","filters"],"sources":["JobActions.js"],"sourcesContent":["import { JOBS_LOADED, JOB_ADDED, JOBS_ADDED, JOBS_STATUSES_LOADED, JOBS_HIDE_SEEN, JOB_FILTER_LOADED } from './types';\nimport { stringActions } from '../apis';\nimport { values } from '../values.config';\nimport { jobStatusOptions } from '../helper';\n\nexport const jobsLoaded = jobs => {\n return {\n type: JOBS_LOADED,\n payload: jobs,\n };\n};\n\nexport const jobAdded = job => {\n return {\n type: JOB_ADDED,\n payload: job,\n };\n};\n\nexport const jobsAdded = jobs => {\n return {\n type: JOBS_ADDED,\n payload: jobs,\n };\n};\n\nexport const jobStatusesUpdate = (site, callback = null) => {\n return dispatch => {\n stringActions\n .getString(site, values.stringConfigJobStatus)\n .then(res => {\n dispatch({\n type: JOBS_STATUSES_LOADED,\n payload: res.data,\n });\n if (callback) callback(res.data);\n })\n .catch(() => {\n dispatch({\n type: JOBS_STATUSES_LOADED,\n payload: jobStatusOptions,\n });\n if (callback) callback(jobStatusOptions);\n });\n };\n};\n\nexport const jobHideSeenUpdate = (site, callback = null) => {\n return (dispatch) => {\n stringActions\n .getString(site, values.stringConfigHideSeen)\n .then((res) => {\n dispatch({\n type: JOBS_HIDE_SEEN,\n payload: res.data,\n });\n if (callback) callback(res.data);\n })\n .catch((_error) => {\n dispatch({\n type: JOBS_HIDE_SEEN,\n payload: false,\n });\n if (callback) callback(false);\n });\n };\n};\n\nexport const jobsFilterLoaded = filters => {\n return {\n type: JOB_FILTER_LOADED,\n payload: filters,\n };\n};\n"],"mappings":"AAAA,SAASA,WAAW,EAAEC,SAAS,EAAEC,UAAU,EAAEC,oBAAoB,EAAEC,cAAc,EAAEC,iBAAiB,QAAQ,SAAS;AACrH,SAASC,aAAa,QAAQ,SAAS;AACvC,SAASC,MAAM,QAAQ,kBAAkB;AACzC,SAASC,gBAAgB,QAAQ,WAAW;AAE5C,OAAO,MAAMC,UAAU,GAAGC,IAAI,IAAI;EAChC,OAAO;IACLC,IAAI,EAAEX,WAAW;IACjBY,OAAO,EAAEF;EACX,CAAC;AACH,CAAC;AAED,OAAO,MAAMG,QAAQ,GAAGC,GAAG,IAAI;EAC7B,OAAO;IACLH,IAAI,EAAEV,SAAS;IACfW,OAAO,EAAEE;EACX,CAAC;AACH,CAAC;AAED,OAAO,MAAMC,SAAS,GAAGL,IAAI,IAAI;EAC/B,OAAO;IACLC,IAAI,EAAET,UAAU;IAChBU,OAAO,EAAE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,gBAAgB,GAAGC,OAAO,IAAI;EACzC,OAAO;IACLnB,IAAI,EAAEN,iBAAiB;IACvBO,OAAO,EAAEkB;EACX,CAAC;AACH,CAAC","ignoreList":[]}
@@ -2,4 +2,7 @@ import { values } from '../values.config';
2
2
  export const JOBS_LOADED = values.actionJobsLoaded;
3
3
  export const JOB_ADDED = values.actionJobAdded;
4
4
  export const JOBS_ADDED = values.actionJobsAdded;
5
+ export const JOBS_STATUSES_LOADED = values.actionJobsStatusesLoaded;
6
+ export const JOBS_HIDE_SEEN = values.actionJobsHideSeen;
7
+ export const JOB_FILTER_LOADED = values.actionJobFilterLoaded;
5
8
  //# sourceMappingURL=types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["values","JOBS_LOADED","actionJobsLoaded","JOB_ADDED","actionJobAdded","JOBS_ADDED","actionJobsAdded"],"sources":["types.js"],"sourcesContent":["import { values } from '../values.config';\n\nexport const JOBS_LOADED = values.actionJobsLoaded;\nexport const JOB_ADDED = values.actionJobAdded;\nexport const JOBS_ADDED = values.actionJobsAdded;\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,kBAAkB;AAEzC,OAAO,MAAMC,WAAW,GAAGD,MAAM,CAACE,gBAAgB;AAClD,OAAO,MAAMC,SAAS,GAAGH,MAAM,CAACI,cAAc;AAC9C,OAAO,MAAMC,UAAU,GAAGL,MAAM,CAACM,eAAe","ignoreList":[]}
1
+ {"version":3,"names":["values","JOBS_LOADED","actionJobsLoaded","JOB_ADDED","actionJobAdded","JOBS_ADDED","actionJobsAdded","JOBS_STATUSES_LOADED","actionJobsStatusesLoaded","JOBS_HIDE_SEEN","actionJobsHideSeen","JOB_FILTER_LOADED","actionJobFilterLoaded"],"sources":["types.js"],"sourcesContent":["import { values } from '../values.config';\n\nexport const JOBS_LOADED = values.actionJobsLoaded;\nexport const JOB_ADDED = values.actionJobAdded;\nexport const JOBS_ADDED = values.actionJobsAdded;\nexport const JOBS_STATUSES_LOADED = values.actionJobsStatusesLoaded;\nexport const JOBS_HIDE_SEEN = values.actionJobsHideSeen;\nexport const JOB_FILTER_LOADED = values.actionJobFilterLoaded;\n\n"],"mappings":"AAAA,SAASA,MAAM,QAAQ,kBAAkB;AAEzC,OAAO,MAAMC,WAAW,GAAGD,MAAM,CAACE,gBAAgB;AAClD,OAAO,MAAMC,SAAS,GAAGH,MAAM,CAACI,cAAc;AAC9C,OAAO,MAAMC,UAAU,GAAGL,MAAM,CAACM,eAAe;AAChD,OAAO,MAAMC,oBAAoB,GAAGP,MAAM,CAACQ,wBAAwB;AACnE,OAAO,MAAMC,cAAc,GAAGT,MAAM,CAACU,kBAAkB;AACvD,OAAO,MAAMC,iBAAiB,GAAGX,MAAM,CAACY,qBAAqB","ignoreList":[]}
@@ -1,2 +1,4 @@
1
- export * from './generalActions';
1
+ import { Apis } from '../core.config';
2
+ export const stringActions = Apis.stringActions;
3
+ export * from './maintenanceActions';
2
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["index.js"],"sourcesContent":["export * from './generalActions';\n"],"mappings":"AAAA,cAAc,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["Apis","stringActions"],"sources":["index.js"],"sourcesContent":["import { Apis } from '../core.config';\n\nexport const stringActions = Apis.stringActions;\n\nexport * from './maintenanceActions';\n"],"mappings":"AAAA,SAASA,IAAI,QAAQ,gBAAgB;AAErC,OAAO,MAAMC,aAAa,GAAGD,IAAI,CAACC,aAAa;AAE/C,cAAc,sBAAsB","ignoreList":[]}
@@ -1,9 +1,6 @@
1
- // import axios from 'axios';
2
- // import { getUrl } from './helper';
3
- // import { authedFunction } from '../js';
4
1
  import { Helper, Session } from '../core.config';
5
2
  import { values } from '../values.config';
6
- export const generalActions = {
3
+ export const maintenanceActions = {
7
4
  getJob: (site, id) => {
8
5
  return Session.authedFunction({
9
6
  method: 'POST',
@@ -35,13 +32,16 @@ export const generalActions = {
35
32
  }
36
33
  });
37
34
  },
38
- getJobs2: (site, status, type, lastKey) => {
35
+ getJobs2: (site, status, priority, type, lastKey) => {
39
36
  const query = {
40
37
  site
41
38
  };
42
39
  if (status) {
43
40
  query.status = status;
44
41
  }
42
+ if (priority) {
43
+ query.priority = priority;
44
+ }
45
45
  if (type) {
46
46
  query.type = type;
47
47
  }
@@ -53,18 +53,18 @@ export const generalActions = {
53
53
  url: Helper.getUrl(values.serviceKey, 'get/requests', query)
54
54
  });
55
55
  },
56
- getJobsRecursive: (site, status, type, lastKey, jobs = []) => {
56
+ getJobsRecursive: (site, status, priority, type, lastKey, jobs = []) => {
57
57
  return new Promise(resolve => {
58
- generalActions.getJobs2(site, status, type, lastKey).then(jobRes => {
58
+ maintenanceActions.getJobs2(site, status, priority, type, lastKey).then(jobRes => {
59
59
  const newJobs = [...jobs, ...jobRes.data.Items];
60
60
  if (!jobRes.data.LastKey) {
61
61
  return resolve(newJobs);
62
62
  }
63
- return resolve(generalActions.getJobsRecursive(site, status, type, jobRes.data.LastKey, newJobs));
63
+ return resolve(maintenanceActions.getJobsRecursive(site, status, priority, type, jobRes.data.LastKey, newJobs));
64
64
  });
65
65
  });
66
66
  },
67
- sendMaintenanceRequest: (userID, userName, phone, room, title, description, date, type, images, location, isHome, homeText) => {
67
+ sendMaintenanceRequest: (userID, userName, phone, room, title, description, date, type, images, location, isHome, homeText, customFields) => {
68
68
  const request = {
69
69
  method: 'POST',
70
70
  url: Helper.getUrl(values.serviceKey, 'sendMaintenance'),
@@ -80,7 +80,8 @@ export const generalActions = {
80
80
  images,
81
81
  location,
82
82
  isHome,
83
- homeText
83
+ homeText,
84
+ customFields
84
85
  }
85
86
  };
86
87
  return Session.authedFunction(request);
@@ -105,7 +106,35 @@ export const generalActions = {
105
106
  }
106
107
  });
107
108
  },
108
- addNote: (jobId, note, attachments) => {
109
+ editJobPriority: (id, priority) => {
110
+ return Session.authedFunction({
111
+ method: 'POST',
112
+ url: Helper.getUrl(values.serviceKey, 'update/priority'),
113
+ data: {
114
+ id,
115
+ priority
116
+ }
117
+ });
118
+ },
119
+ assignJob: (jobId, userId) => {
120
+ return Session.authedFunction({
121
+ method: 'POST',
122
+ url: Helper.getUrl(values.serviceKey, 'update/assign'),
123
+ data: {
124
+ id: jobId,
125
+ userId
126
+ }
127
+ });
128
+ },
129
+ getAssignees: site => {
130
+ return Session.authedFunction({
131
+ method: 'GET',
132
+ url: Helper.getUrl(values.serviceKey, 'get/assignees', {
133
+ site
134
+ })
135
+ });
136
+ },
137
+ addNote: (jobId, note, attachments, images) => {
109
138
  return Session.authedFunction({
110
139
  method: 'POST',
111
140
  url: Helper.getUrl(values.serviceKey, 'requests/note'),
@@ -113,11 +142,12 @@ export const generalActions = {
113
142
  id: jobId,
114
143
  note,
115
144
  attachments,
145
+ images,
116
146
  action: 'AddNote'
117
147
  }
118
148
  });
119
149
  },
120
- editNote: (jobId, noteId, note, attachments) => {
150
+ editNote: (jobId, noteId, note, attachments, images) => {
121
151
  return Session.authedFunction({
122
152
  method: 'POST',
123
153
  url: Helper.getUrl(values.serviceKey, 'requests/note'),
@@ -125,6 +155,7 @@ export const generalActions = {
125
155
  id: jobId,
126
156
  note,
127
157
  attachments,
158
+ images,
128
159
  noteId,
129
160
  action: 'EditNote'
130
161
  }
@@ -141,10 +172,6 @@ export const generalActions = {
141
172
  }
142
173
  });
143
174
  },
144
- // getWeeklyMenu: async time => {
145
- // //deprecated
146
- // return null;
147
- // },
148
175
  getJobTypes: async site => {
149
176
  const url = Helper.getUrl(values.serviceKey, 'getjobtypes');
150
177
  return Session.authedFunction({
@@ -155,33 +182,5 @@ export const generalActions = {
155
182
  }
156
183
  });
157
184
  }
158
- // sendBookingRequest: async bookingInfo => {
159
- // return authedFunction({
160
- // method: 'POST',
161
- // data: {
162
- // bookingInfo,
163
- // },
164
- // url: getUrl('utility', 'sendBookingRequest'),
165
- // });
166
- // },
167
- // getString: async (site, id, useDefault) => {
168
- // return axios({
169
- // method: 'GET',
170
- // url: getUrl('strings', `get/${site}_${id}`, useDefault ? { useDefault } : undefined),
171
- // }).catch(error => {
172
- // console.log('getString error', error);
173
- // throw error;
174
- // });
175
- // },
176
- // getGeneralTerms: async () => {
177
- // return axios({
178
- // method: 'GET',
179
- // url: 'https://pluss.plussapp.com.au/strings-prd/get/plussSpace_termsofuse',
180
- // });
181
- // },
182
- // declineTerms: async (site, userID) => {
183
- // //deprecated
184
- // return null;
185
- // },
186
185
  };
187
- //# sourceMappingURL=generalActions.js.map
186
+ //# sourceMappingURL=maintenanceActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["Helper","Session","values","maintenanceActions","getJob","site","id","authedFunction","method","url","getUrl","serviceKey","data","getJobByJobId","jobId","getJobs","status","type","getJobs2","priority","lastKey","query","JSON","stringify","getJobsRecursive","jobs","Promise","resolve","then","jobRes","newJobs","Items","LastKey","sendMaintenanceRequest","userID","userName","phone","room","title","description","date","images","location","isHome","homeText","customFields","request","editJob","job","editJobStatus","editJobPriority","assignJob","userId","getAssignees","addNote","note","attachments","action","editNote","noteId","deleteNote","getJobTypes"],"sources":["maintenanceActions.js"],"sourcesContent":["import { Helper, Session } from '../core.config';\nimport { values } from '../values.config';\n\nexport const maintenanceActions = {\n getJob: (site, id) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'getJob'),\n data: { site, id },\n });\n },\n getJobByJobId: (site, jobId) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'getJob'),\n data: { site, jobId },\n });\n },\n getJobs: (site, status = '', type = '') => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'getJobs'),\n data: { site, status, type },\n });\n },\n getJobs2: (site, status, priority, type, lastKey) => {\n const query = { site };\n if (status) {\n query.status = status;\n }\n if (priority) {\n query.priority = priority;\n }\n if (type) {\n query.type = type;\n }\n if (lastKey) {\n query.lastKey = JSON.stringify(lastKey);\n }\n return Session.authedFunction({\n method: 'GET',\n url: Helper.getUrl(values.serviceKey, 'get/requests', query),\n });\n },\n getJobsRecursive: (site, status, priority, type, lastKey, jobs = []) => {\n return new Promise(resolve => {\n maintenanceActions.getJobs2(site, status, priority, type, lastKey).then(jobRes => {\n const newJobs = [...jobs, ...jobRes.data.Items];\n if (!jobRes.data.LastKey) {\n return resolve(newJobs);\n }\n return resolve(maintenanceActions.getJobsRecursive(site, status, priority, type, jobRes.data.LastKey, newJobs));\n });\n });\n },\n sendMaintenanceRequest: (\n userID,\n userName,\n phone,\n room,\n title,\n description,\n date,\n type,\n images,\n location,\n isHome,\n homeText,\n customFields,\n ) => {\n const request = {\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'sendMaintenance'),\n data: {\n userID,\n userName,\n phone,\n room,\n title,\n description,\n date,\n type,\n images,\n location,\n isHome,\n homeText,\n customFields,\n },\n };\n return Session.authedFunction(request);\n },\n editJob: (job, site) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'editJob'),\n data: { job, site },\n });\n },\n editJobStatus: (id, status) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'editJobStatus'),\n data: { id, status },\n });\n },\n editJobPriority: (id, priority) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'update/priority'),\n data: { id, priority },\n });\n },\n assignJob: (jobId, userId) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'update/assign'),\n data: {\n id: jobId,\n userId,\n },\n });\n },\n getAssignees: site => {\n return Session.authedFunction({\n method: 'GET',\n url: Helper.getUrl(values.serviceKey, 'get/assignees', { site }),\n });\n },\n addNote: (jobId, note, attachments, images) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'requests/note'),\n data: {\n id: jobId,\n note,\n attachments,\n images,\n action: 'AddNote',\n },\n });\n },\n editNote: (jobId, noteId, note, attachments, images) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'requests/note'),\n data: {\n id: jobId,\n note,\n attachments,\n images,\n noteId,\n action: 'EditNote',\n },\n });\n },\n deleteNote: (jobId, noteId) => {\n return Session.authedFunction({\n method: 'POST',\n url: Helper.getUrl(values.serviceKey, 'requests/note'),\n data: {\n id: jobId,\n noteId,\n action: 'DeleteNote',\n },\n });\n },\n getJobTypes: async site => {\n const url = Helper.getUrl(values.serviceKey, 'getjobtypes');\n return Session.authedFunction({\n method: 'POST',\n url,\n data: { site },\n });\n },\n};\n"],"mappings":"AAAA,SAASA,MAAM,EAAEC,OAAO,QAAQ,gBAAgB;AAChD,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,OAAO,MAAMC,kBAAkB,GAAG;EAChCC,MAAM,EAAEA,CAACC,IAAI,EAAEC,EAAE,KAAK;IACpB,OAAOL,OAAO,CAACM,cAAc,CAAC;MAC5BC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAACU,MAAM,CAACR,MAAM,CAACS,UAAU,EAAE,QAAQ,CAAC;MAC/CC,IAAI,EAAE;QAAEP,IAAI;QAAEC;MAAG;IACnB,CAAC,CAAC;EACJ,CAAC;EACDO,aAAa,EAAEA,CAACR,IAAI,EAAES,KAAK,KAAK;IAC9B,OAAOb,OAAO,CAACM,cAAc,CAAC;MAC5BC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAACU,MAAM,CAACR,MAAM,CAACS,UAAU,EAAE,QAAQ,CAAC;MAC/CC,IAAI,EAAE;QAAEP,IAAI;QAAES;MAAM;IACtB,CAAC,CAAC;EACJ,CAAC;EACDC,OAAO,EAAEA,CAACV,IAAI,EAAEW,MAAM,GAAG,EAAE,EAAEC,IAAI,GAAG,EAAE,KAAK;IACzC,OAAOhB,OAAO,CAACM,cAAc,CAAC;MAC5BC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAACU,MAAM,CAACR,MAAM,CAACS,UAAU,EAAE,SAAS,CAAC;MAChDC,IAAI,EAAE;QAAEP,IAAI;QAA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EAAE6C,MAAM,EAAEJ,IAAI,EAAEC,WAAW,EAAEf,MAAM,KAAK;IACtD,OAAOxC,OAAO,CAACM,cAAc,CAAC;MAC5BC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAACU,MAAM,CAACR,MAAM,CAACS,UAAU,EAAE,eAAe,CAAC;MACtDC,IAAI,EAAE;QACJN,EAAE,EAAEQ,KAAK;QACTyC,IAAI;QACJC,WAAW;QACXf,MAAM;QACNkB,MAAM;QACNF,MAAM,EAAE;MACV;IACF,CAAC,CAAC;EACJ,CAAC;EACDG,UAAU,EAAEA,CAAC9C,KAAK,EAAE6C,MAAM,KAAK;IAC7B,OAAO1D,OAAO,CAACM,cAAc,CAAC;MAC5BC,MAAM,EAAE,MAAM;MACdC,GAAG,EAAET,MAAM,CAACU,MAAM,CAACR,MAAM,CAACS,UAAU,EAAE,eAAe,CAAC;MACtDC,IAAI,EAAE;QACJN,EAAE,EAAEQ,KAAK;QACT6C,MAAM;QACNF,MAAM,EAAE;MACV;IACF,CAAC,CAAC;EACJ,CAAC;EACDI,WAAW,EAAE,MAAMxD,IAAI,IAAI;IACzB,MAAMI,GAAG,GAAGT,MAAM,CAACU,MAAM,CAACR,MAAM,CAACS,UAAU,EAAE,aAAa,CAAC;IAC3D,OAAOV,OAAO,CAACM,cAAc,CAAC;MAC5BC,MAAM,EAAE,MAAM;MACdC,GAAG;MACHG,IAAI,EAAE;QAAEP;MAAK;IACf,CAAC,CAAC;EACJ;AACF,CAAC","ignoreList":[]}
@@ -1,19 +1,63 @@
1
- function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
2
- function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : String(i); }
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
+ 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
4
  import React, { Component } from 'react';
5
- import { View, Text, TouchableOpacity, Modal } from 'react-native';
5
+ import { View, Text, TouchableOpacity, Modal, ScrollView, Dimensions } from 'react-native';
6
6
  import { connect } from 'react-redux';
7
7
  import _ from 'lodash';
8
- import { generalActions } from '../apis';
8
+ import { maintenanceActions } from '../apis';
9
9
  import { Colours, Helper } from '../core.config';
10
+ import { getJobStatusOptions, getIncompleteJobStatuses, jobPriorityOptions } from '../helper';
11
+ import { values } from '../values.config';
12
+ const SCREEN_HEIGHT = Dimensions.get('window').height;
10
13
  class FilterPopupMenu extends Component {
11
14
  constructor(props) {
12
15
  super(props);
16
+ _defineProperty(this, "getStatusOptions", () => {
17
+ const statusOptions = getJobStatusOptions(this.props);
18
+ const options = [{
19
+ label: 'All',
20
+ value: ''
21
+ }, {
22
+ label: 'Incomplete',
23
+ value: `Unassigned|${getIncompleteJobStatuses(this.props).map(s => s.text).join('|')}`
24
+ }, ...statusOptions.map(s => ({
25
+ label: s.text,
26
+ value: s.text
27
+ }))];
28
+ // console.log('getStatusOptions', options);
29
+ return options;
30
+ });
31
+ _defineProperty(this, "getAssignees", async () => {
32
+ try {
33
+ const res = await maintenanceActions.getAssignees(this.props.site);
34
+ let assignees = res.data.Users.map(t => {
35
+ return {
36
+ label: t.displayName,
37
+ value: t.id
38
+ };
39
+ });
40
+ assignees = _.orderBy(assignees, 'label');
41
+ assignees.splice(0, 0, {
42
+ label: 'All',
43
+ value: ''
44
+ });
45
+ const newState = {
46
+ assignees
47
+ };
48
+ if (!assignees.some(a => a.value === this.state.selectedAssignee)) {
49
+ newState.selectedAssignee = '';
50
+ }
51
+ // console.log('refreshassignees', assignees);
52
+ this.setState(newState);
53
+ } catch (error) {
54
+ console.error('getAssignees', error);
55
+ }
56
+ });
13
57
  _defineProperty(this, "refreshTypes", async () => {
14
58
  const {
15
59
  data
16
- } = await generalActions.getJobTypes(Helper.getSite(this.props.site));
60
+ } = await maintenanceActions.getJobTypes(Helper.getSite(this.props.site));
17
61
  const types = data.map(t => {
18
62
  return {
19
63
  label: t.typeName,
@@ -35,41 +79,43 @@ class FilterPopupMenu extends Component {
35
79
  this.setState(newState);
36
80
  });
37
81
  _defineProperty(this, "onDone", () => {
82
+ var _this$getStatusOption, _this$state$assignees;
38
83
  const {
39
84
  onClose
40
85
  } = this.props;
41
86
  const {
42
87
  selectedStatus,
43
- selectedType
88
+ selectedPriority,
89
+ selectedType,
90
+ selectedAssignee
44
91
  } = this.state;
45
92
  if (onClose) onClose({
46
93
  status: selectedStatus,
47
- type: selectedType
94
+ statusText: (_this$getStatusOption = this.getStatusOptions().find(o => o.value === selectedStatus)) === null || _this$getStatusOption === void 0 ? void 0 : _this$getStatusOption.label,
95
+ priority: selectedPriority,
96
+ type: selectedType,
97
+ assignee: selectedAssignee,
98
+ assigneeName: (_this$state$assignees = this.state.assignees.find(a => a.value === selectedAssignee)) === null || _this$state$assignees === void 0 ? void 0 : _this$state$assignees.label
48
99
  });
49
100
  });
50
101
  this.state = {
51
102
  types: props.types || [],
52
103
  selectedStatus: props.status || '',
53
- selectedType: props.type || ''
104
+ selectedPriority: props.priority || '',
105
+ selectedType: props.type || '',
106
+ selectedAssignee: props.assignee || '',
107
+ assignees: []
54
108
  };
55
- this.statusOptions = [{
109
+ this.priorityOptions = [{
56
110
  label: 'All',
57
111
  value: ''
58
- }, {
59
- label: 'Incomplete',
60
- value: 'Unassigned|In Progress'
61
- }, {
62
- label: 'Unassigned',
63
- value: 'Unassigned'
64
- }, {
65
- label: 'In Progress',
66
- value: 'In Progress'
67
- }, {
68
- label: 'Completed',
69
- value: 'Completed'
70
- }];
112
+ }, ...jobPriorityOptions.map(p => ({
113
+ label: p.label,
114
+ value: p.label
115
+ }))];
71
116
  }
72
117
  componentDidMount() {
118
+ this.getAssignees();
73
119
  if (_.isEmpty(this.state.types)) this.refreshTypes();
74
120
  }
75
121
  componentDidUpdate(prevProps) {
@@ -132,6 +178,9 @@ class FilterPopupMenu extends Component {
132
178
  })));
133
179
  }
134
180
  render() {
181
+ // console.log('FilterPopupMenu', JSON.stringify({ category: this.props.user.category, permissions: this.props.user.permissions }, null, 2))
182
+ const isStaff = this.props.user.category === 'staff';
183
+ const canFilterAssignee = !_.includes(this.props.user.permissions, values.permissionMaintenanceAssignment);
135
184
  return /*#__PURE__*/React.createElement(Modal, {
136
185
  visible: true,
137
186
  transparent: true,
@@ -141,9 +190,9 @@ class FilterPopupMenu extends Component {
141
190
  style: styles.container
142
191
  }, /*#__PURE__*/React.createElement(View, {
143
192
  style: styles.menu
144
- }, this.renderTitle(), /*#__PURE__*/React.createElement(View, {
193
+ }, this.renderTitle(), /*#__PURE__*/React.createElement(ScrollView, {
145
194
  style: styles.optionContent
146
- }, this.renderOptions('Status', this.statusOptions, 'selectedStatus'), this.renderOptions('Type', this.state.types, 'selectedType')), this.renderCancel())));
195
+ }, this.renderOptions('Status', this.getStatusOptions(), 'selectedStatus'), isStaff ? this.renderOptions('Priority', this.priorityOptions, 'selectedPriority') : null, this.renderOptions('Type', this.state.types, 'selectedType'), canFilterAssignee ? this.renderOptions('Assigned To', this.state.assignees, 'selectedAssignee') : null), this.renderCancel())));
147
196
  }
148
197
  }
149
198
  const styles = {
@@ -163,7 +212,8 @@ const styles = {
163
212
  right: 0,
164
213
  backgroundColor: '#fff',
165
214
  borderTopLeftRadius: 12,
166
- borderTopRightRadius: 12
215
+ borderTopRightRadius: 12,
216
+ maxHeight: SCREEN_HEIGHT * 0.8
167
217
  },
168
218
  cancelContainer: {
169
219
  paddingVertical: 16,
@@ -227,8 +277,10 @@ const mapStateToProps = state => {
227
277
  user
228
278
  } = state;
229
279
  return {
280
+ user,
230
281
  site: user.site,
231
- colourBrandingMain: Colours.getMainBrandingColourFromState(state)
282
+ colourBrandingMain: Colours.getMainBrandingColourFromState(state),
283
+ statusTypes: state[values.reducerKey].jobstatuses
232
284
  };
233
285
  };
234
286
  export default connect(mapStateToProps, {})(FilterPopupMenu);
@@ -1 +1 @@
1
- {"version":3,"names":["React","Component","View","Text","TouchableOpacity","Modal","connect","_","generalActions","Colours","Helper","FilterPopupMenu","constructor","props","_defineProperty","data","getJobTypes","getSite","site","types","map","t","label","typeName","value","splice","setState","key","newState","onClose","selectedStatus","selectedType","state","status","type","statusOptions","componentDidMount","isEmpty","refreshTypes","componentDidUpdate","prevProps","renderTitle","title","createElement","style","styles","titleContainer","titleText","renderCancel","colourBrandingMain","cancelText","onPress","onDone","cancelContainer","color","renderOptions","options","selectedKey","optionsContainer","optionsTitle","o","selected","backgroundColor","onSelectOption","optionContainer","borderColor","optionText","render","visible","transparent","animationType","onRequestClose","container","menu","optionContent","position","bottom","left","right","top","zIndex","borderTopLeftRadius","borderTopRightRadius","paddingVertical","LINEGREY","borderTopWidth","paddingHorizontal","fontFamily","fontSize","textAlign","TEXT_DARK","padding","borderBottomWidth","marginHorizontal","marginBottom","flex","flexDirection","flexWrap","alignItems","justifyContent","minWidth","height","borderRadius","borderWidth","marginRight","mapStateToProps","user","getMainBrandingColourFromState"],"sources":["FilterPopupMenu.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { View, Text, TouchableOpacity, Modal } from 'react-native';\nimport { connect } from 'react-redux';\nimport _ from 'lodash';\nimport { generalActions } from '../apis';\nimport { Colours, Helper } from '../core.config';\n\nclass FilterPopupMenu extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n types: props.types || [],\n selectedStatus: props.status || '',\n selectedType: props.type || '',\n };\n this.statusOptions = [\n {\n label: 'All',\n value: '',\n },\n {\n label: 'Incomplete',\n value: 'Unassigned|In Progress',\n },\n {\n label: 'Unassigned',\n value: 'Unassigned',\n },\n {\n label: 'In Progress',\n value: 'In Progress',\n },\n {\n label: 'Completed',\n value: 'Completed',\n },\n ];\n }\n\n componentDidMount() {\n if (_.isEmpty(this.state.types)) this.refreshTypes();\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.site !== this.props.site) {\n this.refreshTypes();\n }\n }\n\n refreshTypes = async () => {\n const { data } = await generalActions.getJobTypes(Helper.getSite(this.props.site));\n const types = data.map(t => {\n return { label: t.typeName, value: t.typeName };\n });\n types.splice(0, 0, { label: 'All', value: '' });\n // console.log('refreshTypes', types);\n this.setState({ types });\n };\n\n onSelectOption = (key, value) => {\n const newState = {};\n newState[key] = value;\n this.setState(newState);\n };\n\n onDone = () => {\n const { onClose } = this.props;\n const { selectedStatus, selectedType } = this.state;\n if (onClose)\n onClose({\n status: selectedStatus,\n type: selectedType,\n });\n };\n\n renderTitle() {\n const { title } = this.props;\n return (\n <View style={styles.titleContainer}>\n <Text style={styles.titleText}>{title || 'Filter By'}</Text>\n </View>\n );\n }\n\n renderCancel() {\n const { colourBrandingMain, cancelText } = this.props;\n return (\n <TouchableOpacity onPress={this.onDone}>\n <View style={styles.cancelContainer}>\n <Text style={[styles.cancelText, { color: colourBrandingMain }]}>{cancelText || 'Done'}</Text>\n </View>\n </TouchableOpacity>\n );\n }\n\n renderOptions(title, options, selectedKey) {\n const { colourBrandingMain } = this.props;\n return (\n <View style={styles.optionsContainer}>\n <Text style={styles.optionsTitle}>{title}</Text>\n <View style={styles.options}>\n {options.map(o => {\n const selected = this.state[selectedKey];\n const backgroundColor = o.value === selected ? colourBrandingMain : '#fff';\n const color = o.value === selected ? '#fff' : colourBrandingMain;\n return (\n <TouchableOpacity key={o.label} onPress={() => this.onSelectOption(selectedKey, o.value)}>\n <View style={[styles.optionContainer, { backgroundColor, borderColor: colourBrandingMain }]}>\n <Text style={[styles.optionText, { color }]}>{o.label}</Text>\n </View>\n </TouchableOpacity>\n );\n })}\n </View>\n </View>\n );\n }\n\n render() {\n return (\n <Modal visible transparent animationType=\"slide\" onRequestClose={this.onDone}>\n <View style={styles.container}>\n <View style={styles.menu}>\n {this.renderTitle()}\n <View style={styles.optionContent}>\n {this.renderOptions('Status', this.statusOptions, 'selectedStatus')}\n {this.renderOptions('Type', this.state.types, 'selectedType')}\n </View>\n {this.renderCancel()}\n </View>\n </View>\n </Modal>\n );\n }\n}\n\nconst styles = {\n container: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n backgroundColor: 'rgba(0,0,0,0.5)',\n zIndex: 1000,\n },\n menu: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n backgroundColor: '#fff',\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n },\n cancelContainer: {\n paddingVertical: 16,\n borderColor: Colours.LINEGREY,\n borderTopWidth: 1,\n paddingHorizontal: 16,\n },\n cancelText: {\n fontFamily: 'sf-medium',\n fontSize: 16,\n textAlign: 'center',\n color: Colours.TEXT_DARK,\n },\n titleContainer: {\n padding: 16,\n borderColor: Colours.LINEGREY,\n borderBottomWidth: 1,\n },\n titleText: {\n fontFamily: 'sf-semibold',\n fontSize: 16,\n textAlign: 'center',\n color: Colours.TEXT_DARK,\n },\n optionContent: {\n paddingVertical: 10,\n },\n optionsContainer: {\n marginHorizontal: 14,\n },\n optionsTitle: {\n fontFamily: 'sf-semibold',\n marginBottom: 4,\n },\n options: {\n flex: 1,\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n optionContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n minWidth: 50,\n height: 30,\n paddingHorizontal: 8,\n borderRadius: 4,\n borderWidth: 1,\n marginRight: 8,\n marginBottom: 8,\n },\n optionText: {\n color: '#fff',\n textAlign: 'center',\n fontFamily: 'sf-semibold',\n fontSize: 13,\n },\n};\n\nconst mapStateToProps = state => {\n const { user } = state;\n\n return {\n site: user.site,\n colourBrandingMain: Colours.getMainBrandingColourFromState(state),\n };\n};\n\nexport default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QAAQ,EAAE;EACZ,CAAC;EACDjC,eAAe,EAAE;IACfgC,aAAa,EAAE,KAAK;IACpBE,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE,QAAQ;IACxBC,QAAQ,EAAE,EAAE;IACZC,MAAM,EAAE,EAAE;IACVf,iBAAiB,EAAE,CAAC;IACpBgB,YAAY,EAAE,CAAC;IACfC,WAAW,EAAE,CAAC;IACdC,WAAW,EAAE,CAAC;IACdV,YAAY,EAAE;EAChB,CAAC;EACD5B,UAAU,EAAE;IACVZ,KAAK,EAAE,MAAM;IACbmC,SAAS,EAAE,QAAQ;IACnBF,UAAU,EAAE,aAAa;IACzBC,QAAQ,EAAE;EACZ;AACF,CAAC;AAED,MAAMiB,eAAe,GAAGzE,KAAK,IAAI;EAC/B,MAAM;IAAE0E;EAAK,CAAC,GAAG1E,KAAK;EAEtB,OAAO;IACLd,IAAI,EAAEwF,IAAI,CAACxF,IAAI;IACf+B,kBAAkB,EAAExC,OAAO,CAACkG,8BAA8B,CAAC3E,KAAK;EAClE,CAAC;AACH,CAAC;AAED,eAAe1B,OAAO,CAACmG,eAAe,EAAE,CAAC,CAAC,CAAC,CAAC9F,eAAe,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","Component","View","Text","TouchableOpacity","Modal","ScrollView","Dimensions","connect","_","maintenanceActions","Colours","Helper","getJobStatusOptions","getIncompleteJobStatuses","jobPriorityOptions","values","SCREEN_HEIGHT","get","height","FilterPopupMenu","constructor","props","_defineProperty","statusOptions","options","label","value","map","s","text","join","res","getAssignees","site","assignees","data","Users","t","displayName","id","orderBy","splice","newState","some","a","state","selectedAssignee","setState","error","console","getJobTypes","getSite","types","typeName","key","_this$getStatusOption","_this$state$assignees","onClose","selectedStatus","selectedPriority","selectedType","status","statusText","getStatusOptions","find","o","priority","type","assignee","assigneeName","priorityOptions","p","componentDidMount","isEmpty","refreshTypes","componentDidUpdate","prevProps","renderTitle","title","createElement","style","styles","titleContainer","titleText","renderCancel","colourBrandingMain","cancelText","onPress","onDone","cancelContainer","color","renderOptions","selectedKey","optionsContainer","optionsTitle","selected","backgroundColor","onSelectOption","optionContainer","borderColor","optionText","render","isStaff","user","category","canFilterAssignee","includes","permissions","permissionMaintenanceAssignment","visible","transparent","animationType","onRequestClose","container","menu","optionContent","position","bottom","left","right","top","zIndex","borderTopLeftRadius","borderTopRightRadius","maxHeight","paddingVertical","LINEGREY","borderTopWidth","paddingHorizontal","fontFamily","fontSize","textAlign","TEXT_DARK","padding","borderBottomWidth","marginHorizontal","marginBottom","flex","flexDirection","flexWrap","alignItems","justifyContent","minWidth","borderRadius","borderWidth","marginRight","mapStateToProps","getMainBrandingColourFromState","statusTypes","reducerKey","jobstatuses"],"sources":["FilterPopupMenu.js"],"sourcesContent":["import React, { Component } from 'react';\nimport { View, Text, TouchableOpacity, Modal, ScrollView, Dimensions } from 'react-native';\nimport { connect } from 'react-redux';\nimport _ from 'lodash';\nimport { maintenanceActions } from '../apis';\nimport { Colours, Helper } from '../core.config';\nimport { getJobStatusOptions, getIncompleteJobStatuses, jobPriorityOptions } from '../helper';\nimport { values } from '../values.config';\n\nconst SCREEN_HEIGHT = Dimensions.get('window').height;\n\nclass FilterPopupMenu extends Component {\n constructor(props) {\n super(props);\n\n this.state = {\n types: props.types || [],\n selectedStatus: props.status || '',\n selectedPriority: props.priority || '',\n selectedType: props.type || '',\n selectedAssignee: props.assignee || '',\n assignees: [],\n };\n this.priorityOptions = [\n {\n label: 'All',\n value: '',\n },\n ...jobPriorityOptions.map(p => ({\n label: p.label,\n value: p.label,\n }))\n ];\n }\n\n componentDidMount() {\n this.getAssignees();\n if (_.isEmpty(this.state.types)) this.refreshTypes();\n }\n\n componentDidUpdate(prevProps) {\n if (prevProps.site !== this.props.site) {\n this.refreshTypes();\n }\n }\n\n getStatusOptions = () => {\n const statusOptions = getJobStatusOptions(this.props);\n const options = [\n {\n label: 'All',\n value: '',\n },\n {\n label: 'Incomplete',\n value: `Unassigned|${getIncompleteJobStatuses(this.props).map(s => s.text).join('|')}`,\n },\n ...statusOptions.map(s => ({\n label: s.text,\n value: s.text,\n })),\n ];\n // console.log('getStatusOptions', options);\n return options;\n }\n\n getAssignees = async () => {\n try {\n const res = await maintenanceActions.getAssignees(this.props.site);\n let assignees = res.data.Users.map(t => {\n return { label: t.displayName, value: t.id };\n });\n assignees = _.orderBy(assignees, 'label');\n\n assignees.splice(0, 0, { label: 'All', value: '' });\n\n const newState = { assignees };\n\n if (!assignees.some(a => a.value === this.state.selectedAssignee)) {\n newState.selectedAssignee = '';\n }\n // console.log('refreshassignees', assignees);\n this.setState(newState);\n } catch (error) {\n console.error('getAssignees', error);\n }\n };\n\n refreshTypes = async () => {\n const { data } = await maintenanceActions.getJobTypes(Helper.getSite(this.props.site));\n const types = data.map(t => {\n return { label: t.typeName, value: t.typeName };\n });\n types.splice(0, 0, { label: 'All', value: '' });\n // console.log('refreshTypes', types);\n this.setState({ types });\n };\n\n onSelectOption = (key, value) => {\n const newState = {};\n newState[key] = value;\n this.setState(newState);\n };\n\n onDone = () => {\n const { onClose } = this.props;\n const { selectedStatus, selectedPriority, selectedType, selectedAssignee } = this.state;\n if (onClose)\n onClose({\n status: selectedStatus,\n statusText: this.getStatusOptions().find(o => o.value === selectedStatus)?.label,\n priority: selectedPriority,\n type: selectedType,\n assignee: selectedAssignee,\n assigneeName: this.state.assignees.find(a => a.value === selectedAssignee)?.label,\n });\n };\n\n renderTitle() {\n const { title } = this.props;\n return (\n <View style={styles.titleContainer}>\n <Text style={styles.titleText}>{title || 'Filter By'}</Text>\n </View>\n );\n }\n\n renderCancel() {\n const { colourBrandingMain, cancelText } = this.props;\n return (\n <TouchableOpacity onPress={this.onDone}>\n <View style={styles.cancelContainer}>\n <Text style={[styles.cancelText, { color: colourBrandingMain }]}>{cancelText || 'Done'}</Text>\n </View>\n </TouchableOpacity>\n );\n }\n\n renderOptions(title, options, selectedKey) {\n const { colourBrandingMain } = this.props;\n return (\n <View style={styles.optionsContainer}>\n <Text style={styles.optionsTitle}>{title}</Text>\n <View style={styles.options}>\n {options.map(o => {\n const selected = this.state[selectedKey];\n const backgroundColor = o.value === selected ? colourBrandingMain : '#fff';\n const color = o.value === selected ? '#fff' : colourBrandingMain;\n return (\n <TouchableOpacity key={o.label} onPress={() => this.onSelectOption(selectedKey, o.value)}>\n <View style={[styles.optionContainer, { backgroundColor, borderColor: colourBrandingMain }]}>\n <Text style={[styles.optionText, { color }]}>{o.label}</Text>\n </View>\n </TouchableOpacity>\n );\n })}\n </View>\n </View>\n );\n }\n\n render() {\n // console.log('FilterPopupMenu', JSON.stringify({ category: this.props.user.category, permissions: this.props.user.permissions }, null, 2))\n const isStaff = this.props.user.category === 'staff'\n const canFilterAssignee = !_.includes(this.props.user.permissions, values.permissionMaintenanceAssignment);\n\n return (\n <Modal visible transparent animationType=\"slide\" onRequestClose={this.onDone}>\n <View style={styles.container}>\n <View style={styles.menu}>\n {this.renderTitle()}\n <ScrollView style={styles.optionContent}>\n {this.renderOptions('Status', this.getStatusOptions(), 'selectedStatus')}\n {isStaff ? this.renderOptions('Priority', this.priorityOptions, 'selectedPriority') : null}\n {this.renderOptions('Type', this.state.types, 'selectedType')}\n {canFilterAssignee ? this.renderOptions('Assigned To', this.state.assignees, 'selectedAssignee') : null}\n </ScrollView>\n {this.renderCancel()}\n </View>\n </View>\n </Modal>\n );\n }\n}\n\nconst styles = {\n container: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n top: 0,\n backgroundColor: 'rgba(0,0,0,0.5)',\n zIndex: 1000,\n },\n menu: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n backgroundColor: '#fff',\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n maxHeight: SCREEN_HEIGHT * 0.8,\n },\n cancelContainer: {\n paddingVertical: 16,\n borderColor: Colours.LINEGREY,\n borderTopWidth: 1,\n paddingHorizontal: 16,\n },\n cancelText: {\n fontFamily: 'sf-medium',\n fontSize: 16,\n textAlign: 'center',\n color: Colours.TEXT_DARK,\n },\n titleContainer: {\n padding: 16,\n borderColor: Colours.LINEGREY,\n borderBottomWidth: 1,\n },\n titleText: {\n fontFamily: 'sf-semibold',\n fontSize: 16,\n textAlign: 'center',\n color: Colours.TEXT_DARK,\n },\n optionContent: {\n paddingVertical: 10,\n },\n optionsContainer: {\n marginHorizontal: 14,\n },\n optionsTitle: {\n fontFamily: 'sf-semibold',\n marginBottom: 4,\n },\n options: {\n flex: 1,\n flexDirection: 'row',\n flexWrap: 'wrap',\n },\n optionContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n minWidth: 50,\n height: 30,\n paddingHorizontal: 8,\n borderRadius: 4,\n borderWidth: 1,\n marginRight: 8,\n marginBottom: 8,\n },\n optionText: {\n color: '#fff',\n textAlign: 'center',\n fontFamily: 'sf-semibold',\n fontSize: 13,\n },\n};\n\nconst mapStateToProps = state => {\n const { user } = state;\n\n return {\n user,\n site: user.site,\n colourBrandingMain: Colours.getMainBrandingColourFromState(state),\n statusTypes: state[values.reducerKey].jobstatuses,\n };\n};\n\nexport default connect(mapStateToProps, {})(FilterPopupMenu);\n"],"mappings":";;;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,IAAI,EAAEC,IAAI,EAAEC,gBAAgB,EAAEC,KAAK,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAC1F,SAASC,OAAO,QAAQ,aAAa;AACrC,OAAOC,CAAC,MAAM,QAAQ;AACtB,SAASC,kBAAkB,QAAQ,SAAS;AAC5C,SAASC,OAAO,EAAEC,MAAM,QAAQ,gBAAgB;AAChD,SAASC,mBAAmB,EAAEC,wBAAwB,EAAEC,kBAAkB,QAAQ,WAAW;AAC7F,SAASC,MAAM,QAAQ,kBAAkB;AAEzC,MAAMC,aAAa,GAAGV,UAAU,CAACW,GAAG,CAAC,QAAQ,CAAC,CAACC,MAAM;AAErD,MAAMC,eAAe,SAASnB,SAAS,CAAC;EACtCoB,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