Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MI-3317]: Added validations to forms and enhancements #12

Merged
merged 39 commits into from
Aug 31, 2023
Merged
Show file tree
Hide file tree
Changes from 32 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1ce9f4a
[MI-3317]: Added validations to forms
Kshitij-Katiyar Jul 20, 2023
4863977
[MI-3317]: added EOD to style.css
Kshitij-Katiyar Jul 20, 2023
5bb79e7
[MI-3316]: Fixed some css
Kshitij-Katiyar Jul 20, 2023
18b4687
[MI-3317]: Fixed grammar of validation messages
Kshitij-Katiyar Jul 20, 2023
69cbdfb
[MI-3317]: Fixed grammar of validation message in action modal
Kshitij-Katiyar Jul 20, 2023
f6e5e55
[MI-3317]: added classname to each modal
Kshitij-Katiyar Jul 20, 2023
69b6197
[MI-3316]: added css to make modals stationary
Kshitij-Katiyar Jul 20, 2023
69f6a5b
[MI-3316]: Removed some extra files
Kshitij-Katiyar Jul 20, 2023
2681d40
[MI-3317]: removed some extra files
Kshitij-Katiyar Jul 21, 2023
ee94147
[MI-3317]: reduced the icon size of svg icons
Kshitij-Katiyar Jul 21, 2023
8ffd40a
Merge branch 'MI-3316' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Jul 21, 2023
2fdc9c5
[MI-3317]: Fixed grammar in actionModal message
Kshitij-Katiyar Jul 21, 2023
04fadf3
[MI-3317]: removed an extra comment
Kshitij-Katiyar Jul 21, 2023
ae8b281
[MI-3317]: Improved grammar of statements in config modal
Kshitij-Katiyar Jul 24, 2023
10c42bb
[MI-3317]: Fixed grammar of message
Kshitij-Katiyar Aug 1, 2023
e1920f3
Merge branch 'MI-3275' into MI-3317
Kshitij-Katiyar Aug 2, 2023
6f89061
[MI-3317]: Fixed import order
Kshitij-Katiyar Aug 2, 2023
6a6b8fc
Merge branch 'MI-3275' into MI-3317
Kshitij-Katiyar Aug 2, 2023
38970b1
[MI-3317]: Fixed redundant if conditions and removed extra empty lines
Kshitij-Katiyar Aug 10, 2023
58bbec3
Merge branch 'MI-3317' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 10, 2023
467e951
Merge branch 'MI-3275' into MI-3317
Kshitij-Katiyar Aug 10, 2023
3363f06
Merge branch 'MI-3275' into MI-3317
Kshitij-Katiyar Aug 11, 2023
ac5325d
[MI-3317]: Used fat-arrow function instead of normal function
Kshitij-Katiyar Aug 11, 2023
fcc6eaa
Merge branch 'MI-3317' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 11, 2023
2a7c203
[MI-3317]: Removed camelcase from css
Kshitij-Katiyar Aug 17, 2023
20fd338
Merge branch 'MI-3275' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 17, 2023
fd3672f
Merge branch 'MI-3275' into MI-3317
Kshitij-Katiyar Aug 17, 2023
739dffc
[MI-3317]: Resolved conflicts and fixed CI
Kshitij-Katiyar Aug 18, 2023
d03d04e
Merge branch 'MI-3317' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 18, 2023
e66290a
Merge branch 'MI-3275' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 18, 2023
75fd819
Merge branch 'MI-3275' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 18, 2023
0a6120a
[MI-3317]: Fixed indentation errors
Kshitij-Katiyar Aug 18, 2023
a8fc50d
[MI-3317]: Improved the name of variables
Kshitij-Katiyar Aug 18, 2023
763c84c
[MI-3317]: Removed else and used return with if
Kshitij-Katiyar Aug 22, 2023
fe3dd57
Merge branch 'MI-3275' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 22, 2023
0f694b8
[MI-3317]: Fixed the variable name in table
Kshitij-Katiyar Aug 22, 2023
8619432
[MI-3317]: Fixed CSS according to abhishek's review
Kshitij-Katiyar Aug 24, 2023
dee85c0
Merge branch 'MI-3275' of github.com:Brightscout/mattermost-plugin-we…
Kshitij-Katiyar Aug 25, 2023
34052dc
[MI-3355]: Added dropdown to choose teams and channels (#14)
Kshitij-Katiyar Aug 31, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions webapp/src/containers/components/modals/actionModal.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, {useEffect} from 'react';
import React, {useEffect, useState} from 'react';

import Button from 'react-bootstrap/Button';
import Modal from 'react-bootstrap/Modal';
Expand All @@ -16,11 +16,11 @@ type Props = {
configIndex: number;
}

function ActionModal({visible, setVisible, config, configIndex}: Props) {
const ActionModal = ({visible, setVisible, config, configIndex}: Props) => {
const actionsLength = config[configIndex]?.actions?.length ?? 0;
const attachmentMessageLength = config[configIndex]?.attachmentMessage?.length ?? 0;

const [show, setShow] = useState(visible);
const [show, setShow] = useState(false);

useEffect(() => {
setVisible(visible);
Expand All @@ -31,7 +31,8 @@ function ActionModal({visible, setVisible, config, configIndex}: Props) {
};
return (
<Modal
show={visible}
className='actionModal'
show={show}
onHide={handleClose}
>
<Modal.Header closeButton={false}>
Expand Down Expand Up @@ -64,7 +65,7 @@ function ActionModal({visible, setVisible, config, configIndex}: Props) {
</Form>
<Table
striped={true}
className='listTable'
className='list-table'
>
<thead>
<tr>
Expand Down Expand Up @@ -94,7 +95,7 @@ function ActionModal({visible, setVisible, config, configIndex}: Props) {
</div>
) : (<p>{'No Action configured'}</p>)
}
</>) : (<p>{'No Attachment message or Action configured'}</p>)}
</>) : (<p>{'No Attachment message or action configured'}</p>)}
</Modal.Body>

<Modal.Footer>
Expand All @@ -105,6 +106,6 @@ function ActionModal({visible, setVisible, config, configIndex}: Props) {
</Modal.Footer>
</Modal>
);
}
};

export default ActionModal;
Loading