Skip to content

Btest #446

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

Open
wants to merge 73 commits into
base: main
Choose a base branch
from
Open

Btest #446

Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
6963647
add redux and fix it
Sep 26, 2024
571acbb
chore: update project name and version in package.json
Apr 4, 2025
6673174
feat: implement authentication flow with Redux and improve login UI
Apr 4, 2025
811350f
chore: update index.html metadata and title for TakeIt project
Apr 25, 2025
efc07f5
feat: add react-toastify for error notifications on login failure
Apr 25, 2025
ba5f706
feat: enhance ToastContainer with closeOnClick option for better user…
Apr 25, 2025
4b0f002
chore: comment out AppSidebar and AppHeader in DefaultLayout for clea…
Apr 25, 2025
f11a901
feat: refactor authentication check and replace HashRouter with Brows…
Apr 25, 2025
7c87f9d
fix: update state selector in AppHeader and AppSidebar to use 'data' …
Apr 25, 2025
1ab36e2
feat: add sidebar styles and RTL support
Apr 25, 2025
b8ae8a6
fix: update react-router-dom to version 7.5.2 for improved routing ca…
Apr 25, 2025
03a4aa5
feat: enhance login page UI with CoreUI components and improved layout
Apr 25, 2025
1d4e7bc
feat: implement logout functionality with async actions and update au…
Apr 25, 2025
9c3e4d1
fix: handle login errors and ensure authentication check is awaited
Apr 28, 2025
1f6ac36
feat: implement role-based layout and header components for employees…
Apr 28, 2025
02d1916
feat: add Tickets page and update routing to include it
Apr 28, 2025
c70f83e
feat: improve authentication flow with enhanced error handling and re…
Apr 29, 2025
0de6531
feat: add authentication check to AppHeaderDropdown component
Apr 29, 2025
05ed3a0
feat: implement create ticket modal with open/close functionality
Apr 30, 2025
e35a642
feat: refactor authentication and layout components; add Jira configu…
May 1, 2025
0d90ea2
feat: remove debug log from authentication check function
May 3, 2025
3304b3c
feat: format ToastContainer props for improved readability
May 3, 2025
7bed9f8
feat: set initial sidebarShow state to false
May 3, 2025
8d4882b
feat: add Jira API connection and configuration management features
May 3, 2025
baf7732
feat: update ESLint configuration and dependencies for improved linti…
May 7, 2025
587170b
feat: implement CRUD operations for Jira configuration management and…
May 7, 2025
dca03ff
feat: update ESLint rules to disable console usage and warn on unused…
May 7, 2025
d270dc9
feat: enhance Jira configuration management by adding enable/disable …
May 7, 2025
db8b368
feat: update login actions and reducer to handle user roles on login …
May 7, 2025
0750d3d
feat: add Projet page and update routing to include project list
May 8, 2025
92bdd90
feat: implement ticket management with CRUD operations and modal func…
May 8, 2025
5722ca9
feat: enhance Tickets component to fetch and display ticket data in a…
May 8, 2025
842bc65
feat: add Material-UI core and icons, and jsPDF libraries to dependen…
May 11, 2025
0bfaa61
refactor: optimize AppContent component structure for better readability
May 11, 2025
1233dd8
feat: add MaterialTableIcons component for table icon customization
May 11, 2025
d081d33
feat: implement DetailPanelTableTicket component and integrate with M…
May 11, 2025
f4f238e
refactor: simplify DetailPanelTableTicket layout and improve code rea…
May 11, 2025
c157227
refactor: enhance authentication check logic in App component
May 21, 2025
6a96386
feat: enhance DetailPanelTableTicket component with conditional rende…
May 21, 2025
41eef2b
feat: implement user management actions, reducer, and service for fet…
May 21, 2025
8c93b05
refactor: replace CSpinner with CircularProgress for consistent loadi…
May 21, 2025
8c3796b
feat: add Emotion and MUI dependencies for enhanced styling capabilities
May 21, 2025
3585d4e
feat: create BugIssueForm component and integrate it into ModalCreate…
May 21, 2025
7f7fc8e
feat: add new dependencies for date handling and rich text editing
May 21, 2025
f66465c
feat: wrap ToastContainer with StyledEngineProvider for improved styl…
May 21, 2025
7a070a4
feat: enhance BugIssueForm with rich text editor, priority selection,…
May 21, 2025
07b522f
feat: remove unused Page404, Page500, and Register components
May 22, 2025
c792d9e
feat: remove AppSidebar component and related references for a cleane…
May 22, 2025
20b8706
feat: remove unused Register, Page404, and Page500 components for a c…
May 22, 2025
ccb13cf
feat: integrate Toolpad for enhanced login functionality and add auth…
May 22, 2025
d9d6c8d
feat: add SVG icons for issue types (bug, epic, story, task) and prio…
May 31, 2025
a0df46a
feat: refactor issue forms and add emptyIssue utility for ticket crea…
May 31, 2025
238b578
feat: implement add new ticket functionality with API integration and…
Jun 1, 2025
99e2964
feat: implement project management features including CRUD operations…
Jun 14, 2025
81374ea
feat: add edit project functionality with modal integration and API h…
Jun 15, 2025
2a1be2c
fix: update editProject API endpoint to use correct URL for project u…
Jun 15, 2025
d520593
feat: close edit project modal after successful project update
Jun 15, 2025
4857307
feat: close add new project modal after successfully updating project…
Jun 15, 2025
4274f12
fix: update tickets link to point to the correct tickets list route
Jun 15, 2025
1ab76d5
feat: add exact route for tickets and new route for tickets list
Jun 15, 2025
04975f1
refactor: improve breadcrumb logic and simplify route matching
Jun 15, 2025
a117cca
fix: update footer links and copyright year in AppFooter component
Jun 23, 2025
df83b66
fix: replace CircularProgress with CSpinner for consistent loading in…
Jun 23, 2025
f0599e8
feat: add loading spinner to Projet component for better user experience
Jun 23, 2025
573ec7a
feat: enhance TicketsHome component with loading state and improved l…
Jun 23, 2025
cb15606
feat: integrate toggleCreateTicketModalOpen action in Tickets component
Jul 2, 2025
896a12c
Refactor ticket creation modal and forms to use CoreUI components
Jul 2, 2025
42ad864
feat: add @tinymce/miniature dependency to enhance text editing capab…
Jul 2, 2025
abff6c4
refactor: remove unused Material-UI dependencies and components
Jul 2, 2025
03b0708
feat: enhance ticket creation and viewing experience with improved fo…
Jul 2, 2025
dbba53d
fix: update project description in package.json
Jul 3, 2025
0732734
Merge pull request #2 from aminederouich/tst
aminederouich Jul 3, 2025
5906702
commit test
Jul 3, 2025
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
Prev Previous commit
Next Next commit
feat: enhance ticket creation and viewing experience with improved fo…
…rm handling and navigation
  • Loading branch information
Mohamed Amine DEROUICH committed Jul 2, 2025
commit 03b0708a9800845487e482d40e8deb027dd40e37
36 changes: 31 additions & 5 deletions src/components/Modal/ModalCreateTicket.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,17 @@ import { addNewTicketAPI, toggleCreateTicketModalClose } from '../../actions/tic
import BugIssueForm from './ModalBody/BugIssueForm'
import TaskIssueForm from './ModalBody/TaskIssueForm'
import StoryIssueForm from './ModalBody/StoryIssueForm'
// import EpicIssueForm from './ModalBody/EpicIssueForm' // À créer si nécessaire
import { projects, issueTypes } from '../../utils/TicketsConsts'
import { emptyIssue } from '../../utils/emptyIssue'

const ModalCreateTicket = () => {
const { isCreateTicketModalOpen } = useSelector((state) => state.ticket)
const location = useLocation()
const [project, setProject] = useState(projects[0].value)
const [issueType, setIssueType] = useState(issueTypes[0].value)
const [newIssue, setNewIssue] = useState(emptyIssue)
const [isSubmitting, setIsSubmitting] = useState(false)
const dispatch = useDispatch()

// Extraire le code du projet depuis le pathname
Expand All @@ -52,11 +55,31 @@ const ModalCreateTicket = () => {
}

const handleClose = () => {
// Reset du formulaire lors de la fermeture
setNewIssue(emptyIssue)
setProject(projects[0].value)
setIssueType(issueTypes[0].value)
setIsSubmitting(false)
dispatch(toggleCreateTicketModalClose())
}

const handleSubmitTicket = () => {
dispatch(addNewTicketAPI(newIssue))
const handleSubmitTicket = async () => {
// Validation basique
if (!newIssue.fields?.summary?.trim()) {
alert('Le résumé est obligatoire')
return
}

setIsSubmitting(true)
try {
await dispatch(addNewTicketAPI(newIssue))
handleClose() // Fermer après succès
} catch (error) {
console.error('Erreur lors de la création du ticket:', error)
alert('Erreur lors de la création du ticket')
} finally {
setIsSubmitting(false)
}
}

const generateId = () => {
Expand Down Expand Up @@ -259,13 +282,16 @@ const ModalCreateTicket = () => {
{issueType === 'Bug' && <BugIssueForm newIssue={newIssue} setNewIssue={setNewIssue} />}
{issueType === 'Task' && <TaskIssueForm newIssue={newIssue} setNewIssue={setNewIssue} />}
{issueType === 'Story' && <StoryIssueForm newIssue={newIssue} setNewIssue={setNewIssue} />}
{issueType === 'Epic' && (
<div className="alert alert-info">Formulaire Epic à implémenter (EpicIssueForm)</div>
)}
</CModalBody>
<CModalFooter>
<CButton color="secondary" onClick={handleClose}>
<CButton color="secondary" onClick={handleClose} disabled={isSubmitting}>
Annuler
</CButton>
<CButton color="primary" onClick={handleSubmitTicket}>
Créer
<CButton color="primary" onClick={handleSubmitTicket} disabled={isSubmitting}>
{isSubmitting ? 'Création...' : 'Créer'}
</CButton>
</CModalFooter>
</CModal>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/emptyIssue.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ export const emptyIssue = {
},
},
id: '',
key: 'SCRUM-interne',
key: 'interne',
self: '',
// createdAt: {
// seconds: 1746709762,
Expand Down
Loading