@plusscommunities/pluss-maintenance-app 1.0.13 → 1.1.4-beta.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/package.json +11 -6
- package/src/apis/generalActions.js +1 -3
- package/src/components/MaintenanceList.js +2 -4
- package/src/components/MaintenanceListItem.js +2 -3
- package/src/components/MaintenanceWidgetItem.js +2 -3
- package/src/components/StatusSelectorPopup.js +1 -3
- package/src/components/WidgetSmall.js +3 -4
- package/src/core.config.js +5 -0
- package/src/feature.config.js +0 -2
- package/src/helper.js +1 -3
- package/src/reducers/JobsReducer.js +3 -3
- package/src/screens/JobTypePicker.js +2 -3
- package/src/screens/MaintenancePage.js +2 -3
- package/src/screens/RequestDetail.js +3 -3
- package/src/screens/RequestNotes.js +2 -3
- package/src/screens/ServiceRequest.js +3 -4
package/package.json
CHANGED
@@ -1,27 +1,32 @@
|
|
1
1
|
{
|
2
2
|
"name": "@plusscommunities/pluss-maintenance-app",
|
3
|
-
"version": "1.0
|
3
|
+
"version": "1.1.4-beta.0",
|
4
4
|
"description": "Extension package to enable maintenance on Pluss Communities Platform",
|
5
5
|
"main": "src/index.js",
|
6
6
|
"scripts": {
|
7
|
+
"precore": "npm i @plusscommunities/pluss-core-app@beta",
|
7
8
|
"core": "npm i @plusscommunities/pluss-core-app@latest",
|
9
|
+
"prepatch": "npm version prepatch --preid=beta",
|
8
10
|
"patch": "npm version patch",
|
11
|
+
"preupload": "npm publish --access public --tag beta && rm -rf node_modules",
|
12
|
+
"preupload:p": "npm run prepatch && npm run preupload",
|
13
|
+
"preupload:cp": "npm run precore && npm run preupload:p",
|
9
14
|
"upload": "npm publish --access public && rm -rf node_modules",
|
10
15
|
"upload:p": "npm run patch && npm run upload",
|
11
|
-
"upload:cp": "npm run core && npm run
|
16
|
+
"upload:cp": "npm run core && npm run upload:p"
|
12
17
|
},
|
13
18
|
"author": "Phillip Suh",
|
14
19
|
"license": "ISC",
|
15
20
|
"dependencies": {
|
16
|
-
"@plusscommunities/pluss-core-app": "1.
|
21
|
+
"@plusscommunities/pluss-core-app": "^1.4.2-beta.0",
|
17
22
|
"axios": "^0.16.2",
|
18
23
|
"lodash": "^4.17.4",
|
19
24
|
"moment": "^2.18.1",
|
20
|
-
"react": "
|
21
|
-
"react-native": "
|
25
|
+
"react": "17.0.1",
|
26
|
+
"react-native": "0.64.3",
|
22
27
|
"react-native-elements": "^0.17.0",
|
23
28
|
"react-native-iphone-x-helper": "^1.3.1",
|
24
|
-
"react-native-webview": "11.
|
29
|
+
"react-native-webview": "11.15.0",
|
25
30
|
"react-redux": "^5.0.5"
|
26
31
|
},
|
27
32
|
"peerDependencies": {
|
@@ -1,9 +1,7 @@
|
|
1
1
|
// import axios from 'axios';
|
2
2
|
// import { getUrl } from './helper';
|
3
3
|
// import { authedFunction } from '../js';
|
4
|
-
import {
|
5
|
-
|
6
|
-
const { Helper, Session } = PlussCore;
|
4
|
+
import { Helper, Session } from '../core.config';
|
7
5
|
|
8
6
|
export const generalActions = {
|
9
7
|
getJob: (site, jobId) => {
|
@@ -7,9 +7,7 @@ import { generalActions } from '../apis';
|
|
7
7
|
import { jobsLoaded } from '../actions';
|
8
8
|
import MaintenanceListItem from '../components/MaintenanceListItem';
|
9
9
|
import StatusSelectorPopup from './StatusSelectorPopup';
|
10
|
-
import {
|
11
|
-
|
12
|
-
const { Components, Colours, Config } = PlussCore;
|
10
|
+
import { Components, Colours, Config } from '../core.config';
|
13
11
|
|
14
12
|
const SHOW_ALL_STATUS = 'Show All';
|
15
13
|
|
@@ -201,4 +199,4 @@ const mapStateToProps = state => {
|
|
201
199
|
};
|
202
200
|
};
|
203
201
|
|
204
|
-
export default connect(mapStateToProps, { jobsLoaded }, null, {
|
202
|
+
export default connect(mapStateToProps, { jobsLoaded }, null, { forwardRef: true })(MaintenanceList);
|
@@ -17,9 +17,8 @@ import moment from 'moment';
|
|
17
17
|
// } from '../../js';
|
18
18
|
// import NavigationService from '../../js/NavigationService';
|
19
19
|
import { getJobStatusProps, jobStatusOptions } from '../helper';
|
20
|
-
import {
|
21
|
-
|
22
|
-
const { Helper, Colours } = PlussCore;
|
20
|
+
import { Services } from '../feature.config';
|
21
|
+
import { Helper, Colours } from '../core.config';
|
23
22
|
|
24
23
|
class MaintenanceListItem extends Component {
|
25
24
|
onPressJob = () => {
|
@@ -5,9 +5,8 @@ import { Icon } from 'react-native-elements';
|
|
5
5
|
import moment from 'moment';
|
6
6
|
import _ from 'lodash';
|
7
7
|
import { getJobStatusProps, jobStatusOptions } from '../helper';
|
8
|
-
import {
|
9
|
-
|
10
|
-
const { Colours, Helper } = PlussCore;
|
8
|
+
import { Services } from '../feature.config';
|
9
|
+
import { Colours, Helper } from '../core.config';
|
11
10
|
|
12
11
|
class MaintenanceWidgetItem extends Component {
|
13
12
|
onPressJob = () => {
|
@@ -2,9 +2,7 @@ import React, { PureComponent } from 'react';
|
|
2
2
|
import { View, StyleSheet, TouchableOpacity, Text } from 'react-native';
|
3
3
|
import { connect } from 'react-redux';
|
4
4
|
import { jobStatusOptions, getJobStatusColour } from '../helper';
|
5
|
-
import {
|
6
|
-
|
7
|
-
const { Components, Colours } = PlussCore;
|
5
|
+
import { Components, Colours } from '../core.config';
|
8
6
|
|
9
7
|
class StatusSelectorPopup extends PureComponent {
|
10
8
|
render() {
|
@@ -5,9 +5,8 @@ import _ from 'lodash';
|
|
5
5
|
import { generalActions } from '../apis';
|
6
6
|
import { jobsLoaded } from '../actions';
|
7
7
|
import MaintenanceWidgetItem from './MaintenanceWidgetItem';
|
8
|
-
import {
|
9
|
-
|
10
|
-
const { Colours, Components, Config } = PlussCore;
|
8
|
+
import { Services } from '../feature.config';
|
9
|
+
import { Colours, Components, Config } from '../core.config';
|
11
10
|
|
12
11
|
const MAX_ITEMS = 10;
|
13
12
|
|
@@ -147,4 +146,4 @@ const mapStateToProps = state => {
|
|
147
146
|
};
|
148
147
|
};
|
149
148
|
|
150
|
-
export default connect(mapStateToProps, { jobsLoaded }, null, {
|
149
|
+
export default connect(mapStateToProps, { jobsLoaded }, null, { forwardRef: true })(WidgetSmall);
|
@@ -0,0 +1,5 @@
|
|
1
|
+
// import * as PlussCore from '../../pluss-core/src';
|
2
|
+
import * as PlussCore from '@plusscommunities/pluss-core-app';
|
3
|
+
|
4
|
+
const { Apis, Fonts, Actions, ActionTypes, Config, Components, Styles, Session, Helper, Constants, Colours } = PlussCore;
|
5
|
+
export { Apis, Fonts, Actions, ActionTypes, Config, Components, Styles, Session, Helper, Constants, Colours };
|
package/src/feature.config.js
CHANGED
package/src/helper.js
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
/* eslint-disable no-param-reassign */
|
2
|
-
import { REHYDRATE } from 'redux-persist
|
2
|
+
import { REHYDRATE } from 'redux-persist';
|
3
3
|
import { JOBS_LOADED, JOB_ADDED } from '../actions/types';
|
4
|
-
import {
|
4
|
+
import { ActionTypes } from '../core.config';
|
5
5
|
|
6
|
-
const { ActionTypes } = PlussCore;
|
7
6
|
const REDUCER_KEY = 'jobs';
|
8
7
|
|
9
8
|
const INITIAL_STATE = {
|
@@ -30,6 +29,7 @@ export default (state = INITIAL_STATE, action) => {
|
|
30
29
|
}
|
31
30
|
return { ...state, jobs: updateJobs };
|
32
31
|
case REHYDRATE:
|
32
|
+
if (!action.payload) return state;
|
33
33
|
if (action.payload[REDUCER_KEY]) {
|
34
34
|
if (action.payload[REDUCER_KEY].jobs == null) {
|
35
35
|
action.payload[REDUCER_KEY].jobs = [];
|
@@ -3,9 +3,8 @@ import _ from 'lodash';
|
|
3
3
|
import { TouchableOpacity, View, ScrollView, Text } from 'react-native';
|
4
4
|
import { connect } from 'react-redux';
|
5
5
|
import { Icon } from 'react-native-elements';
|
6
|
-
import {
|
7
|
-
|
8
|
-
const { Components, Colours } = PlussCore;
|
6
|
+
import { Services } from '../feature.config';
|
7
|
+
import { Components, Colours } from '../core.config';
|
9
8
|
|
10
9
|
class JobTypePicker extends Component {
|
11
10
|
state = {
|
@@ -3,9 +3,8 @@ import { View, StyleSheet } from 'react-native';
|
|
3
3
|
import { connect } from 'react-redux';
|
4
4
|
import _ from 'lodash';
|
5
5
|
import MaintenanceList from '../components/MaintenanceList';
|
6
|
-
import {
|
7
|
-
|
8
|
-
const { Components, Helper, Styles, Config } = PlussCore;
|
6
|
+
import { Services, BaseComponents } from '../feature.config';
|
7
|
+
import { Components, Helper, Styles, Config } from '../core.config';
|
9
8
|
|
10
9
|
class MaintenancePage extends Component {
|
11
10
|
constructor(props) {
|
@@ -9,9 +9,8 @@ import { generalActions } from '../apis';
|
|
9
9
|
import { jobAdded } from '../actions';
|
10
10
|
import StatusSelectorPopup from '../components/StatusSelectorPopup';
|
11
11
|
import { jobStatusOptions, getJobStatusProps } from '../helper';
|
12
|
-
import {
|
13
|
-
|
14
|
-
const { Colours, Helper, Components, Config } = PlussCore;
|
12
|
+
import { Services } from '../feature.config';
|
13
|
+
import { Colours, Helper, Components, Config } from '../core.config';
|
15
14
|
|
16
15
|
class RequestDetail extends Component {
|
17
16
|
constructor(props) {
|
@@ -431,6 +430,7 @@ class RequestDetail extends Component {
|
|
431
430
|
scrollView={this.scrollView}
|
432
431
|
entityType="maintenancerequest"
|
433
432
|
entityId={this.props.job.id}
|
433
|
+
entityName={this.props.job.title}
|
434
434
|
site={this.state.job.site || this.state.job.location}
|
435
435
|
// noScroll={true}
|
436
436
|
// style={{ position: 'absolute', bottom: 0, left: 0, right: 0 }}
|
@@ -7,9 +7,8 @@ import moment from 'moment';
|
|
7
7
|
import { jobAdded } from '../actions';
|
8
8
|
import { generalActions } from '../apis';
|
9
9
|
import { getBottomSpace } from 'react-native-iphone-x-helper';
|
10
|
-
import {
|
11
|
-
|
12
|
-
const { Components, Colours, Helper } = PlussCore;
|
10
|
+
import { Services } from '../feature.config';
|
11
|
+
import { Components, Colours, Helper } from '../core.config';
|
13
12
|
|
14
13
|
class RequestNotes extends Component {
|
15
14
|
constructor(props) {
|
@@ -17,9 +17,8 @@ import { Icon } from 'react-native-elements';
|
|
17
17
|
import { connect } from 'react-redux';
|
18
18
|
import { jobAdded } from '../actions';
|
19
19
|
import { generalActions } from '../apis';
|
20
|
-
import {
|
21
|
-
|
22
|
-
const { Components, Colours, Helper, Config } = PlussCore;
|
20
|
+
import { Services } from '../feature.config';
|
21
|
+
import { Components, Colours, Helper, Config } from '../core.config';
|
23
22
|
|
24
23
|
const PHOTO_SIZE = (Dimensions.get('window').width - 64) / 3;
|
25
24
|
|
@@ -206,7 +205,7 @@ class MaintenanceRequest extends Component {
|
|
206
205
|
if (this.state.uploadingImage || this.state.submitting) {
|
207
206
|
return;
|
208
207
|
}
|
209
|
-
this.imageUploader.
|
208
|
+
this.imageUploader.showUploadMenu();
|
210
209
|
};
|
211
210
|
|
212
211
|
submit = async () => {
|