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