* Feature 🚀 : Ability to delete messages in chat channels - Sending message ID to frontend - Deleting Message - Use pusher to delete message realtime * Minor Bug 🐞: Show message action only for current user - User can delete or edit their own messages * Test cases added * Bug 🐞: Update message id for receiver Message id was not sent to receiver by pusher * Refactoring🛠: Message controller refactoring * Test Cases📝 : Specs for Delete message added * Feature 🚀 : Ability to edit messages * Test Cases📝 : Specs for Edit message added * 🐞 Channel List bug in mobile view * changes in joining request responses * 🛠 Request Managers Frontend ready * changes in routes for adding and removing remembership * 🚀 New routes implemented for request manager * fix issues * changes in api for remove membership * Merge conflict resolved * 🐞 Channel List bug in mobile view * changes in joining request responses * 🛠 Request Managers Frontend ready * changes in routes for adding and removing remembership * 🚀 New routes implemented for request manager * fix issues * changes in api for remove membership * 🛠Optimizing for CodeClimate * 🛠Optimizing again for CodeClimate * 🛠Optimizing again 2 for CodeClimate * 🛠 Added more test cases * 🛠 Optimizing code * 🚀 Action to open setting page added * 🛠 Dummy page added for chat setting * add JSON routes for chat channel settings * Integrate chat channel settings API with UI * 🐞 Channel List bug in mobile view * 🛠 Request Managers Frontend ready * changes in routes for adding and removing remembership * 🚀 New routes implemented for request manager * fix issues * 🐞 Channel List bug in mobile view * 🛠 Request Managers Frontend ready * changes in routes for adding and removing remembership * 🚀 New routes implemented for request manager * fix issues * 🛠Optimizing again for CodeClimate * 🚀 Action to open setting page added * 🛠 Dummy page added for chat setting * add JSON routes for chat channel settings * Integrate chat channel settings API with UI * Fix PR requested changes * Add JSDoc documentation to exported functions * fix/add rspec test cases * refactor channelSettinngs render part * add test cases for chat channel settings component * fix code-climate * add rest component tests * add more test coverage * fix code-climate bugs * add API function test Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com> Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
47 lines
1.2 KiB
JavaScript
47 lines
1.2 KiB
JavaScript
import { h } from 'preact';
|
|
import PropTypes from 'prop-types';
|
|
|
|
const InviteForm = ({
|
|
handleChatChannelInvitations,
|
|
invitationUsernames,
|
|
handleInvitationUsernames
|
|
}) => {
|
|
return (
|
|
<div className="crayons-card p-4 grid gap-2 mb-4">
|
|
<div className="crayons-field">
|
|
<label
|
|
className="crayons-field__label invitation_form_title"
|
|
htmlFor="chat_channel_membership_Usernames to Invite"
|
|
>
|
|
Usernames to invite
|
|
</label>
|
|
<input
|
|
placeholder="Comma separated"
|
|
className="crayons-textfield"
|
|
type="text"
|
|
value={invitationUsernames}
|
|
name="chat_channel_membership[invitation_usernames]"
|
|
id="chat_channel_membership_invitation_usernames"
|
|
onChange={handleInvitationUsernames}
|
|
/>
|
|
</div>
|
|
<div>
|
|
<button
|
|
className="crayons-btn"
|
|
type="submit"
|
|
onClick={handleChatChannelInvitations}
|
|
>
|
|
Submit
|
|
</button>
|
|
</div>
|
|
</div>
|
|
)
|
|
}
|
|
|
|
InviteForm.propTypes = {
|
|
handleInvitationUsernames: PropTypes.func.isRequired,
|
|
handleChatChannelInvitations: PropTypes.func.isRequired,
|
|
invitationUsernames: PropTypes.func.isRequired
|
|
}
|
|
|
|
export default InviteForm;
|