You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To enable editing the main field of a Kanban, follow these steps:
Locate the Kanban Creation Logic: The main field for Kanban creation is managed in src/components/Kanban/KanbanCreation.js. Identify where the field is set during creation.
Add Field Editing Capability: Modify src/components/Kanban/KanbanEdit.js to include a dropdown or input for selecting a new main field. Ensure it fetches available fields from the backend.
Update State Management: In src/hooks/useKanban.js, add a function to update the main field state. This should handle the logic for changing the field and ensuring the Kanban updates accordingly.
Backend Integration: Ensure the backend API supports updating the main field. Check src/api/kanban.js for the relevant endpoint and update it if necessary.
UI Update: In src/components/Kanban/KanbanView.js, ensure the UI reflects the updated main field after it is changed.
Example code snippet for KanbanEdit.js:
importReact,{useState}from'react';import{updateKanbanField}from'src/api/kanban';constKanbanEdit=({ kanban })=>{const[mainField,setMainField]=useState(kanban.mainField);consthandleFieldChange=(e)=>{setMainField(e.target.value);updateKanbanField(kanban.id,e.target.value);};return(<selectvalue={mainField}onChange={handleFieldChange}>{/* Options fetched from backend */}</select>);};exportdefaultKanbanEdit;
After creating a kanban it's not possible to view the field that was used to create the kanban or to modify it to another type of select field:
Edit: we might as well allow viewing or even changing the view type if we do this...
The text was updated successfully, but these errors were encountered: