diff --git a/love/src/components/AuxTel/Camera/Camera.jsx b/love/src/components/AuxTel/Camera/Camera.jsx index 7c36145ca..391ab93c3 100644 --- a/love/src/components/AuxTel/Camera/Camera.jsx +++ b/love/src/components/AuxTel/Camera/Camera.jsx @@ -66,8 +66,10 @@ export default class Camera extends Component { render() { const imageIds = Object.keys(this.props.imageSequence?.images ?? {}); - const orederedImages = imageIds.sort((a, b) => { - return this.props.imageSequence.images[b].timestamp - this.props.imageSequence.images[a].timestamp; + + // Sort images by timestamp + imageIds.sort((a, b) => { + return this.props.imageSequence.images[b].timeStamp - this.props.imageSequence.images[a].timeStamp; }); return ( @@ -111,8 +113,8 @@ export default class Camera extends Component { - {orederedImages && - orederedImages.map((imageName) => { + {imageIds && + imageIds.map((imageName) => { const image = this.props.imageSequence.images[imageName]; const imageKey = `${this.props.imageSequence.name}-${imageName}`; const isIntegrating = image.state === 'INTEGRATING'; diff --git a/love/src/components/Facility/Map/Device.module.css b/love/src/components/Facility/Map/Device.module.css index 5b02ab3c2..926a9fc67 100644 --- a/love/src/components/Facility/Map/Device.module.css +++ b/love/src/components/Facility/Map/Device.module.css @@ -1,5 +1,5 @@ .device { - filter: drop-shadow(0px 0px 1px rgb(0 0 0 / 0.25)); + /* filter: drop-shadow(0px 0px 1px rgb(0 0 0 / 0.25)); */ } .container { diff --git a/love/src/components/Facility/Map/Levels/Level2.jsx b/love/src/components/Facility/Map/Levels/Level2.jsx index 8844dbc1d..88afedcf1 100644 --- a/love/src/components/Facility/Map/Levels/Level2.jsx +++ b/love/src/components/Facility/Map/Levels/Level2.jsx @@ -48,7 +48,6 @@ export default class Level2 extends Component { d3.select(mapId).attr('transform', transformData); d3.select(deviceId).attr('transform', transformData); this.props.savePos(transformData); - console.log(transformData); }; getDevices() { diff --git a/love/src/components/Facility/Map/Levels/Level3.jsx b/love/src/components/Facility/Map/Levels/Level3.jsx index 4f9d560f5..222015ff0 100644 --- a/love/src/components/Facility/Map/Levels/Level3.jsx +++ b/love/src/components/Facility/Map/Levels/Level3.jsx @@ -48,7 +48,6 @@ export default class Level3 extends Component { d3.select(mapId).attr('transform', transformData); d3.select(deviceId).attr('transform', transformData); this.props.savePos(transformData); - console.log(transformData); }; getDevices() { diff --git a/love/src/components/Facility/Map/Levels/Level4.jsx b/love/src/components/Facility/Map/Levels/Level4.jsx index 63f85f223..7ddf3b3f5 100644 --- a/love/src/components/Facility/Map/Levels/Level4.jsx +++ b/love/src/components/Facility/Map/Levels/Level4.jsx @@ -48,7 +48,6 @@ export default class Level4 extends Component { d3.select(mapId).attr('transform', transformData); d3.select(deviceId).attr('transform', transformData); this.props.savePos(transformData); - console.log(transformData); }; getDevices() { diff --git a/love/src/components/Facility/Map/Levels/Level5.jsx b/love/src/components/Facility/Map/Levels/Level5.jsx index 69a95eb6f..1683708de 100644 --- a/love/src/components/Facility/Map/Levels/Level5.jsx +++ b/love/src/components/Facility/Map/Levels/Level5.jsx @@ -48,7 +48,6 @@ export default class Level5 extends Component { d3.select(mapId).attr('transform', transformData); d3.select(deviceId).attr('transform', transformData); this.props.savePos(transformData); - console.log(transformData); }; getDevices() { @@ -58,7 +57,7 @@ export default class Level5 extends Component { manejadoraLower02P05, manejadoraLower03P05, manejadoraLower04P05, - vea01P01, + vea01P05, vea08P05, vea09P05, vea10P05, diff --git a/love/src/components/Facility/Map/Levels/Level6.jsx b/love/src/components/Facility/Map/Levels/Level6.jsx index 0252c6305..7b02dcf84 100644 --- a/love/src/components/Facility/Map/Levels/Level6.jsx +++ b/love/src/components/Facility/Map/Levels/Level6.jsx @@ -48,7 +48,6 @@ export default class Level6 extends Component { d3.select(mapId).attr('transform', transformData); d3.select(deviceId).attr('transform', transformData); this.props.savePos(transformData); - console.log(transformData); }; getDevices() { diff --git a/love/src/components/Facility/Map/Levels/Level7.jsx b/love/src/components/Facility/Map/Levels/Level7.jsx index 3ecc6aa2e..9413ed4b5 100644 --- a/love/src/components/Facility/Map/Levels/Level7.jsx +++ b/love/src/components/Facility/Map/Levels/Level7.jsx @@ -48,7 +48,6 @@ export default class Level7 extends Component { d3.select(mapId).attr('transform', transformData); d3.select(deviceId).attr('transform', transformData); this.props.savePos(transformData); - console.log(transformData); }; getDevices() { diff --git a/love/src/components/Facility/Map/Levels/Level8.jsx b/love/src/components/Facility/Map/Levels/Level8.jsx index 1e6a86c35..85c0bc99f 100644 --- a/love/src/components/Facility/Map/Levels/Level8.jsx +++ b/love/src/components/Facility/Map/Levels/Level8.jsx @@ -48,7 +48,6 @@ export default class Level8 extends Component { d3.select(mapId).attr('transform', transformData); d3.select(deviceId).attr('transform', transformData); this.props.savePos(transformData); - console.log(transformData); }; getDevices() { diff --git a/love/src/components/OLE/Exposure/Exposure.module.css b/love/src/components/OLE/Exposure/Exposure.module.css index 6d7b71603..555bc7d5f 100644 --- a/love/src/components/OLE/Exposure/Exposure.module.css +++ b/love/src/components/OLE/Exposure/Exposure.module.css @@ -310,7 +310,7 @@ margin-right: 0.5em; } -.checkboxText > input:first-of-type{ +.checkboxText > input:first-of-type { width: auto; } @@ -428,9 +428,8 @@ th.tableHead { .spinnerIcon { height: var(--font-size-small); width: var(--font-size-small); - margin-left: var(--small-padding); } .refreshDataBtn { height: 2.4em; -} \ No newline at end of file +} diff --git a/love/src/components/OLE/Exposure/ExposureAdd.jsx b/love/src/components/OLE/Exposure/ExposureAdd.jsx index 02f420e29..bc03871c0 100644 --- a/love/src/components/OLE/Exposure/ExposureAdd.jsx +++ b/love/src/components/OLE/Exposure/ExposureAdd.jsx @@ -78,6 +78,7 @@ export default class ExposureAdd extends Component { selectedTags: [], updatingExposures: false, selectedDayExposure: Moment(), + savingLog: false, }; this.handleSubmit = this.handleSubmit.bind(this); } @@ -108,7 +109,6 @@ export default class ExposureAdd extends Component { } componentDidUpdate(prevProps, prevState) { - // TODO: only when the filter is shown if ( prevState.selectedInstrument !== this.state.selectedInstrument || prevState.selectedDayExposure !== this.state.selectedDayExposure @@ -146,22 +146,27 @@ export default class ExposureAdd extends Component { saveMessage() { const { isLogCreate, isMenu } = this.props; + const payload = { ...this.state.newMessage }; payload['request_type'] = 'exposure'; payload['instrument'] = this.state.selectedInstrument; - if (payload['tags']) { payload['tags'] = payload['tags'].map((tag) => tag.id); } + this.setState({ savingLog: true }); ManagerInterface.createMessageExposureLogs(payload).then((result) => { - this.setState({ confirmationModalShown: false }); if (isLogCreate || isMenu || !this.state.logEdit.obs_id) { this.props.back(); } else { this.props.view(); } this.cleanForm(); + + this.setState({ + confirmationModalShown: false, + savingLog: false, + }); }); } @@ -191,6 +196,7 @@ export default class ExposureAdd extends Component { } renderModalFooter() { + const { savingLog } = this.state; return (
-
); @@ -391,7 +397,6 @@ export default class ExposureAdd extends Component { className={styles.iconBtn} title="Delete" onClick={() => { - console.log('click delete'); this.deleteMessage(); }} status="transparent" diff --git a/love/src/components/OLE/NonExposure/NonExposureEdit.jsx b/love/src/components/OLE/NonExposure/NonExposureEdit.jsx index b07b018d3..0481829d2 100644 --- a/love/src/components/OLE/NonExposure/NonExposureEdit.jsx +++ b/love/src/components/OLE/NonExposure/NonExposureEdit.jsx @@ -4,6 +4,7 @@ import lodash from 'lodash'; import Moment from 'moment'; import DownloadIcon from 'components/icons/DownloadIcon/DownloadIcon'; import CloseIcon from 'components/icons/CloseIcon/CloseIcon'; +import SpinnerIcon from 'components/icons/SpinnerIcon/SpinnerIcon'; import TextArea from 'components/GeneralPurpose/TextArea/TextArea'; import Input from 'components/GeneralPurpose/Input/Input'; import Button from 'components/GeneralPurpose/Button/Button'; @@ -75,6 +76,7 @@ export default class NonExposureEdit extends Component { logEdit, confirmationModalShown: false, confirmationModalText: '', + savingLog: false, }; this.handleSubmit = this.handleSubmit.bind(this); @@ -116,6 +118,7 @@ export default class NonExposureEdit extends Component { } renderModalFooter = () => { + const { savingLog } = this.state; return (
-
); @@ -134,13 +137,12 @@ export default class NonExposureEdit extends Component { updateOrCreateMessageNarrativeLogs() { const payload = { ...this.state.logEdit }; - payload['request_type'] = 'narrative'; + payload['request_type'] = 'narrative'; const beginDateISO = this.state.logEdit.date_begin?.toISOString(); const endDateISO = this.state.logEdit.date_end?.toISOString(); payload['date_begin'] = beginDateISO.substring(0, beginDateISO.length - 1); // remove Zone due to backend standard payload['date_end'] = endDateISO.substring(0, endDateISO.length - 1); // remove Zone due to backend standard - payload['tags'] = [...(payload['systems'] ?? []), ...(payload['subsystems'] ?? []), ...(payload['cscs'] ?? [])]; // Clean null and empty values to avoid API errors @@ -150,15 +152,20 @@ export default class NonExposureEdit extends Component { } }); + this.setState({ savingLog: true }); if (this.state.logEdit.id) { ManagerInterface.updateMessageNarrativeLogs(this.state.logEdit.id, payload).then((response) => { - this.setState({ confirmationModalShown: false }); + this.setState({ + confirmationModalShown: false, + savingLog: false, + }); this.props.save(response); }); } else { ManagerInterface.createMessageNarrativeLogs(payload).then((response) => { this.setState({ confirmationModalShown: false, + savingLog: false, }); this.props.save(response); this.cleanForm(); @@ -526,7 +533,7 @@ export default class NonExposureEdit extends Component { parentSelector={() => document.querySelector(`#${this.id}`)} size={50} > -

{confirmationModalText}

+

{confirmationModalText}

{this.renderModalFooter()} diff --git a/love/src/components/icons/MountainIcon/MountainIcon.jsx b/love/src/components/icons/MountainIcon/MountainIcon.jsx index 9cb1cef45..62fd9bb52 100644 --- a/love/src/components/icons/MountainIcon/MountainIcon.jsx +++ b/love/src/components/icons/MountainIcon/MountainIcon.jsx @@ -11,7 +11,7 @@ export default function MountainIcon(props) { d="m1.15,17.54l1.61-4.14c.23-.59.94-.75,1.38-.32h0s2.11-6.49,2.11-6.49c.18-.55.51-1.04.95-1.4h0c1.38-1.12,3.37-.68,4.21.93l.76,1.47h0c.53-.19,1.1.09,1.32.64l3.59,9.3c.17.44-.13.92-.58.92H1.73c-.45,0-.75-.48-.58-.92Z" />{' '}