Make some call fields editable after publishing the call
- call form fields are editable (according to the list of keys); - some parts of the form are editable;
This commit is contained in:
@@ -11,7 +11,7 @@ import { Button } from 'primereact/button';
|
||||
import { Tag } from 'primereact/tag';
|
||||
import BuilderElementProperLabel from '../BuilderElementProperLabel';
|
||||
|
||||
const BuilderElement = ({ id, name, label, index }) => {
|
||||
const BuilderElement = ({ id, name, label, index, bandoStatus }) => {
|
||||
const draggingElementId = useStore().main.draggingElementId();
|
||||
const ref = useRef(null);
|
||||
|
||||
@@ -109,28 +109,10 @@ const BuilderElement = ({ id, name, label, index }) => {
|
||||
</div>
|
||||
<div className="actions">
|
||||
<Button icon="pi pi-cog" onClick={() => openSettings(id)} outlined severity="info"/>
|
||||
<Button icon="pi pi-trash" onClick={() => remove(id)} outlined severity="danger"/>
|
||||
<Button icon="pi pi-trash" disabled={bandoStatus === 'PUBLISH'} onClick={() => remove(id)} outlined severity="danger"/>
|
||||
</div>
|
||||
</div>
|
||||
)
|
||||
|
||||
/*return (
|
||||
<div ref={ref} className="formBuilder__element" style={{ opacity }} data-handler-id={handlerId}>
|
||||
{draggingId === id
|
||||
? <div className="formBuilder__elementNew"></div>
|
||||
: <>
|
||||
<div className="meta">
|
||||
<Tag value={name} severity="info"/>
|
||||
<BuilderElementProperLabel id={id} defaultLabel={label}/>
|
||||
</div>
|
||||
<div className="actions">
|
||||
<Button icon="pi pi-cog" onClick={() => openSettings(id)} outlined severity="info"/>
|
||||
<Button icon="pi pi-trash" onClick={() => remove(id)} outlined severity="danger"/>
|
||||
</div>
|
||||
</>
|
||||
}
|
||||
</div>
|
||||
)*/
|
||||
}
|
||||
|
||||
export default BuilderElement;
|
||||
Reference in New Issue
Block a user