Merge branch 'add-door-unlock-lock-time-column-in-incidents-table' into 'master'
Add door unlock lock time column in incidents table See merge request saburly/psihologija!65
This commit was merged in pull request #65.
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
export const CONTAINER_WIDTH_PERCENTAGE = 90;
|
||||||
|
|
||||||
export const defaultDateFormat = 'YYYY-MM-DD';
|
export const defaultDateFormat = 'YYYY-MM-DD';
|
||||||
|
|
||||||
export const doorLockRelatedWithReservationIncidentHeaders = [
|
export const doorLockRelatedWithReservationIncidentHeaders = [
|
||||||
@@ -5,6 +7,7 @@ export const doorLockRelatedWithReservationIncidentHeaders = [
|
|||||||
'resourceName',
|
'resourceName',
|
||||||
'memberName',
|
'memberName',
|
||||||
'reservation',
|
'reservation',
|
||||||
|
'doorLockTimestamps',
|
||||||
'incidentType',
|
'incidentType',
|
||||||
'feeDescription',
|
'feeDescription',
|
||||||
'totalChargeFee'
|
'totalChargeFee'
|
||||||
|
|||||||
@@ -4,12 +4,13 @@ import { Container, Message } from 'semantic-ui-react';
|
|||||||
|
|
||||||
import MainMenu from '../../components/MainMenu';
|
import MainMenu from '../../components/MainMenu';
|
||||||
import { mainMenuItems } from '../../constants/menuItems';
|
import { mainMenuItems } from '../../constants/menuItems';
|
||||||
|
import {CONTAINER_WIDTH_PERCENTAGE} from "../../constants/constants";
|
||||||
|
|
||||||
class Home extends Component {
|
class Home extends Component {
|
||||||
|
|
||||||
render () {
|
render () {
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container style={ {width: `${CONTAINER_WIDTH_PERCENTAGE}%`} }>
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>SIMA SPACE </h3>
|
<h3>SIMA SPACE </h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import MemberIncidentsTables from '../../components/MemberIncidentsTables';
|
|||||||
import GenerateFeesInORDButton from '../../components/GenerateFeesInORDButton';
|
import GenerateFeesInORDButton from '../../components/GenerateFeesInORDButton';
|
||||||
|
|
||||||
import { fetchIncidents } from '../../store/actions';
|
import { fetchIncidents } from '../../store/actions';
|
||||||
|
import { CONTAINER_WIDTH_PERCENTAGE } from '../../constants/constants';
|
||||||
|
|
||||||
class IncidentsReport extends Component {
|
class IncidentsReport extends Component {
|
||||||
state = {dateRange: null};
|
state = {dateRange: null};
|
||||||
@@ -33,7 +34,7 @@ class IncidentsReport extends Component {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container style={ {width: `${CONTAINER_WIDTH_PERCENTAGE}%`} }>
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>Incidents Report</h3>
|
<h3>Incidents Report</h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Container, Button, Loader, Input, Message, Grid } from 'semantic-ui-rea
|
|||||||
import MainMenu from '../../components/MainMenu';
|
import MainMenu from '../../components/MainMenu';
|
||||||
|
|
||||||
import { fetchMemberPracticeSummaryReport } from '../../store/actions';
|
import { fetchMemberPracticeSummaryReport } from '../../store/actions';
|
||||||
|
import {CONTAINER_WIDTH_PERCENTAGE} from "../../constants/constants";
|
||||||
|
|
||||||
class MemberPracticeSummaryReport extends Component {
|
class MemberPracticeSummaryReport extends Component {
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ class MemberPracticeSummaryReport extends Component {
|
|||||||
error = fetchReportError ? fetchReportError : error;
|
error = fetchReportError ? fetchReportError : error;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container style={ {width: `${CONTAINER_WIDTH_PERCENTAGE}%`} }>
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>Member Practice Summary Report</h3>
|
<h3>Member Practice Summary Report</h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|||||||
@@ -76,67 +76,71 @@ class SingleMapping extends Component {
|
|||||||
};
|
};
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
const { singleMapping: { officeSlug, resourceSlug } } = this.props;
|
try {
|
||||||
const { officeId, resourceId, officeOptions, allResourceOptions, pendingMappings } = this.props;
|
const {singleMapping: {officeSlug, resourceSlug}} = this.props;
|
||||||
const { showDeletePrompt, newOfficeId, newResourceId } = this.state;
|
const {officeId, resourceId, officeOptions, allResourceOptions, pendingMappings} = this.props;
|
||||||
|
const {showDeletePrompt, newOfficeId, newResourceId} = this.state;
|
||||||
|
|
||||||
const selectedOfficeId = newOfficeId ? newOfficeId : officeId;
|
const selectedOfficeId = newOfficeId ? newOfficeId : officeId;
|
||||||
const selectedResourceId = newResourceId ? newResourceId : resourceId;
|
const selectedResourceId = newResourceId ? newResourceId : resourceId;
|
||||||
|
|
||||||
const resourceOptions = allResourceOptions && officeId ? allResourceOptions[selectedOfficeId].roomOptions : [];
|
const resourceOptions = allResourceOptions && officeId ? allResourceOptions[selectedOfficeId].roomOptions : [];
|
||||||
|
|
||||||
const enableActions = !pendingMappings;
|
const enableActions = !pendingMappings;
|
||||||
const enableSave = enableActions && ((newOfficeId !== null) || (newResourceId !== null));
|
const enableSave = enableActions && ((newOfficeId !== null) || (newResourceId !== null));
|
||||||
const saveIconColor = enableSave ? 'green' : null;
|
const saveIconColor = enableSave ? 'green' : null;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Table.Row>
|
<Table.Row>
|
||||||
<PromptMessage
|
<PromptMessage
|
||||||
onClose={this.onPromptClose}
|
onClose={this.onPromptClose}
|
||||||
onActionNo={this.onPromptClose}
|
onActionNo={this.onPromptClose}
|
||||||
onActionYes={this.onPromptYes}
|
onActionYes={this.onPromptYes}
|
||||||
title={'Delete mapping'}
|
title={'Delete mapping'}
|
||||||
message={'Do you want to delete this mapping ?'}
|
message={'Do you want to delete this mapping ?'}
|
||||||
show={showDeletePrompt}
|
show={showDeletePrompt}
|
||||||
/>
|
|
||||||
<Table.Cell>
|
|
||||||
<Label size={'big'}>{`[${officeSlug}-${resourceSlug}]`}</Label>
|
|
||||||
</Table.Cell>
|
|
||||||
<Table.Cell>
|
|
||||||
<Dropdown
|
|
||||||
options={officeOptions}
|
|
||||||
defaultValue={officeId}
|
|
||||||
onChange={this.onOfficeChange}
|
|
||||||
/>
|
/>
|
||||||
</Table.Cell>
|
<Table.Cell>
|
||||||
<Table.Cell>
|
<Label size={'big'}>{`[${officeSlug}-${resourceSlug}]`}</Label>
|
||||||
<Dropdown
|
</Table.Cell>
|
||||||
options={resourceOptions}
|
<Table.Cell>
|
||||||
value={selectedResourceId}
|
<Dropdown
|
||||||
onChange={this.onResourceChange}
|
options={officeOptions}
|
||||||
/>
|
defaultValue={officeId}
|
||||||
</Table.Cell>
|
onChange={this.onOfficeChange}
|
||||||
<Table.Cell>
|
/>
|
||||||
<Icon
|
</Table.Cell>
|
||||||
circular
|
<Table.Cell>
|
||||||
name={'check'}
|
<Dropdown
|
||||||
size={'large'}
|
options={resourceOptions}
|
||||||
disabled={!enableSave}
|
value={selectedResourceId}
|
||||||
link={enableSave || null}
|
onChange={this.onResourceChange}
|
||||||
color={saveIconColor}
|
/>
|
||||||
onClick={this.onMappingUpdate}
|
</Table.Cell>
|
||||||
/>
|
<Table.Cell>
|
||||||
<Icon
|
<Icon
|
||||||
circular
|
circular
|
||||||
name={'trash'}
|
name={'check'}
|
||||||
size={'large'}
|
size={'large'}
|
||||||
disabled={!enableActions}
|
disabled={!enableSave}
|
||||||
link={enableActions || null}
|
link={enableSave || null}
|
||||||
onClick={this.deleteMapping}
|
color={saveIconColor}
|
||||||
/>
|
onClick={this.onMappingUpdate}
|
||||||
</Table.Cell>
|
/>
|
||||||
</Table.Row>
|
<Icon
|
||||||
);
|
circular
|
||||||
|
name={'trash'}
|
||||||
|
size={'large'}
|
||||||
|
disabled={!enableActions}
|
||||||
|
link={enableActions || null}
|
||||||
|
onClick={this.deleteMapping}
|
||||||
|
/>
|
||||||
|
</Table.Cell>
|
||||||
|
</Table.Row>
|
||||||
|
);
|
||||||
|
}catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -5,6 +5,7 @@ import { Container, Message, Loader, Table } from 'semantic-ui-react';
|
|||||||
import MainMenu from '../../components/MainMenu';
|
import MainMenu from '../../components/MainMenu';
|
||||||
import { fetchMappings } from '../../store/actions';
|
import { fetchMappings } from '../../store/actions';
|
||||||
import SingleMapping from './components/SingleMapping';
|
import SingleMapping from './components/SingleMapping';
|
||||||
|
import {CONTAINER_WIDTH_PERCENTAGE} from "../../constants/constants";
|
||||||
|
|
||||||
class RoomOfficeNameMapping extends Component {
|
class RoomOfficeNameMapping extends Component {
|
||||||
|
|
||||||
@@ -47,7 +48,7 @@ class RoomOfficeNameMapping extends Component {
|
|||||||
});
|
});
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container style={ {width: `${CONTAINER_WIDTH_PERCENTAGE}%`} }>
|
||||||
<Loader active={pendingMappings} />
|
<Loader active={pendingMappings} />
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>Room Office Mapping</h3>
|
<h3>Room Office Mapping</h3>
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import MemberIncidentsTables from '../../components/MemberIncidentsTables';
|
|||||||
import GenerateFeesInORDButton from '../../components/GenerateFeesInORDButton';
|
import GenerateFeesInORDButton from '../../components/GenerateFeesInORDButton';
|
||||||
|
|
||||||
import { fetchMemberIncidents } from '../../store/actions';
|
import { fetchMemberIncidents } from '../../store/actions';
|
||||||
|
import {CONTAINER_WIDTH_PERCENTAGE} from "../../constants/constants";
|
||||||
|
|
||||||
class SpecificMemberIncidentsReport extends Component {
|
class SpecificMemberIncidentsReport extends Component {
|
||||||
constructor(props){
|
constructor(props){
|
||||||
@@ -48,7 +49,7 @@ class SpecificMemberIncidentsReport extends Component {
|
|||||||
const addFeesButtonDisabled = !memberId || !dateRange || loading;
|
const addFeesButtonDisabled = !memberId || !dateRange || loading;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container style={ {width: `${CONTAINER_WIDTH_PERCENTAGE}%`} }>
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>Member Incidents Report</h3>
|
<h3>Member Incidents Report</h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|||||||
@@ -4,10 +4,11 @@ import { Container, Form } from 'semantic-ui-react';
|
|||||||
import MainMenu from '../../components/MainMenu';
|
import MainMenu from '../../components/MainMenu';
|
||||||
import FileUpload from './components/FileUpload';
|
import FileUpload from './components/FileUpload';
|
||||||
import UploadResults from './components/UploadResults';
|
import UploadResults from './components/UploadResults';
|
||||||
|
import {CONTAINER_WIDTH_PERCENTAGE} from "../../constants/constants";
|
||||||
|
|
||||||
function UploadDLockData() {
|
function UploadDLockData() {
|
||||||
return (
|
return (
|
||||||
<Container>
|
<Container style={ {width: `${CONTAINER_WIDTH_PERCENTAGE}%`} }>
|
||||||
<MainMenu/>
|
<MainMenu/>
|
||||||
<h3>DLock Data</h3>
|
<h3>DLock Data</h3>
|
||||||
<hr/>
|
<hr/>
|
||||||
|
|||||||
Reference in New Issue
Block a user