File tree Expand file tree Collapse file tree 5 files changed +11
-2
lines changed
web/core/components/issues Expand file tree Collapse file tree 5 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -151,6 +151,7 @@ export const IssueDetailWidgetModals: FC<Props> = observer((props) => {
151151 data = { createUpdateModalData }
152152 onClose = { handleCreateUpdateModalClose }
153153 onSubmit = { handleCreateUpdateModalOnSubmit }
154+ isProjectSelectionDisabled
154155 />
155156 ) }
156157
@@ -162,7 +163,6 @@ export const IssueDetailWidgetModals: FC<Props> = observer((props) => {
162163 handleClose = { handleExistingIssuesModalClose }
163164 searchParams = { existingIssuesModalSearchParams }
164165 handleOnSubmit = { handleExistingIssuesModalOnSubmit }
165- workspaceLevelToggle
166166 />
167167 ) }
168168
Original file line number Diff line number Diff line change @@ -37,6 +37,7 @@ export const CreateUpdateIssueModalBase: React.FC<IssuesModalProps> = observer((
3737 moveToIssue = false ,
3838 modalTitle,
3939 primaryButtonText,
40+ isProjectSelectionDisabled = false ,
4041 } = props ;
4142 const issueStoreType = useIssueStoreType ( ) ;
4243
@@ -361,6 +362,7 @@ export const CreateUpdateIssueModalBase: React.FC<IssuesModalProps> = observer((
361362 moveToIssue = { moveToIssue }
362363 isDuplicateModalOpen = { isDuplicateModalOpen }
363364 handleDuplicateIssueModal = { handleDuplicateIssueModal }
365+ isProjectSelectionDisabled = { isProjectSelectionDisabled }
364366 />
365367 ) : (
366368 < IssueFormRoot
@@ -383,6 +385,7 @@ export const CreateUpdateIssueModalBase: React.FC<IssuesModalProps> = observer((
383385 primaryButtonText = { primaryButtonText }
384386 isDuplicateModalOpen = { isDuplicateModalOpen }
385387 handleDuplicateIssueModal = { handleDuplicateIssueModal }
388+ isProjectSelectionDisabled = { isProjectSelectionDisabled }
386389 />
387390 ) }
388391 </ ModalCore >
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ export interface DraftIssueProps {
3838 } ;
3939 isDuplicateModalOpen : boolean ;
4040 handleDuplicateIssueModal : ( isOpen : boolean ) => void ;
41+ isProjectSelectionDisabled ?: boolean ;
4142}
4243
4344export const DraftIssueLayout : React . FC < DraftIssueProps > = observer ( ( props ) => {
@@ -58,6 +59,7 @@ export const DraftIssueLayout: React.FC<DraftIssueProps> = observer((props) => {
5859 primaryButtonText,
5960 isDuplicateModalOpen,
6061 handleDuplicateIssueModal,
62+ isProjectSelectionDisabled = false ,
6163 } = props ;
6264 // states
6365 const [ issueDiscardModal , setIssueDiscardModal ] = useState ( false ) ;
@@ -179,6 +181,7 @@ export const DraftIssueLayout: React.FC<DraftIssueProps> = observer((props) => {
179181 primaryButtonText = { primaryButtonText }
180182 isDuplicateModalOpen = { isDuplicateModalOpen }
181183 handleDuplicateIssueModal = { handleDuplicateIssueModal }
184+ isProjectSelectionDisabled = { isProjectSelectionDisabled }
182185 />
183186 </ >
184187 ) ;
Original file line number Diff line number Diff line change @@ -71,6 +71,7 @@ export interface IssueFormProps {
7171 } ;
7272 isDuplicateModalOpen : boolean ;
7373 handleDuplicateIssueModal : ( isOpen : boolean ) => void ;
74+ isProjectSelectionDisabled ?: boolean ;
7475}
7576
7677export const IssueFormRoot : FC < IssueFormProps > = observer ( ( props ) => {
@@ -93,6 +94,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
9394 } ,
9495 isDuplicateModalOpen,
9596 handleDuplicateIssueModal,
97+ isProjectSelectionDisabled = false ,
9698 } = props ;
9799
98100 // states
@@ -336,7 +338,7 @@ export const IssueFormRoot: FC<IssueFormProps> = observer((props) => {
336338 < div className = "flex items-center gap-x-1" >
337339 < IssueProjectSelect
338340 control = { control }
339- disabled = { ! ! data ?. id || ! ! data ?. sourceIssueId }
341+ disabled = { ! ! data ?. id || ! ! data ?. sourceIssueId || isProjectSelectionDisabled }
340342 handleFormChange = { handleFormChange }
341343 />
342344 { projectId && (
Original file line number Diff line number Diff line change @@ -27,6 +27,7 @@ export interface IssuesModalProps {
2727 default : string ;
2828 loading : string ;
2929 } ;
30+ isProjectSelectionDisabled ?: boolean ;
3031}
3132
3233export const CreateUpdateIssueModal : React . FC < IssuesModalProps > = observer (
You can’t perform that action at this time.
0 commit comments