mirror of
https://github.com/makeplane/plane
synced 2024-06-14 14:31:34 +00:00
fix: webview redirection logs & description rendering (#2433)
* fix: redirection console logs * fix: sub issues overflow * fix: cycle bottom sheet typo * fix: description rendering * fix: formatting
This commit is contained in:
parent
651b252c23
commit
ceb878e72f
@ -235,7 +235,7 @@ const activityDetails: {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
cycle_id: activity.new_identifier ?? activity.old_identifier,
|
cycle_id: activity.new_identifier ?? activity.old_identifier,
|
||||||
project_id: activity.project,
|
project_id: activity.project,
|
||||||
cycle_name: activity.verb === "created" ? activity.new_value : activity.old_value,
|
cycle_name: !activity.new_value || activity.new_value === "" ? activity.old_value : activity.new_value,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ const activityDetails: {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
module_id: activity.new_identifier ?? activity.old_identifier,
|
module_id: activity.new_identifier ?? activity.old_identifier,
|
||||||
project_id: activity.project,
|
project_id: activity.project,
|
||||||
module_name: activity.verb === "created" ? activity.new_value : activity.old_value,
|
module_name: !activity.new_value || activity.new_value === "" ? activity.old_value : activity.new_value,
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -232,6 +232,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
issue_id: relation.issue_detail?.id,
|
issue_id: relation.issue_detail?.id,
|
||||||
project_id: relation.issue_detail?.project_detail.id,
|
project_id: relation.issue_detail?.project_detail.id,
|
||||||
|
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -294,6 +295,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
issue_id: relation.issue_detail?.id,
|
issue_id: relation.issue_detail?.id,
|
||||||
project_id: relation.issue_detail?.project_detail.id,
|
project_id: relation.issue_detail?.project_detail.id,
|
||||||
|
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -356,6 +358,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
issue_id: relation.issue_detail?.id,
|
issue_id: relation.issue_detail?.id,
|
||||||
project_id: relation.issue_detail?.project_detail.id,
|
project_id: relation.issue_detail?.project_detail.id,
|
||||||
|
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
@ -418,6 +421,7 @@ export const IssuePropertiesDetail: React.FC<Props> = (props) => {
|
|||||||
JSON.stringify({
|
JSON.stringify({
|
||||||
issue_id: relation.issue_detail?.id,
|
issue_id: relation.issue_detail?.id,
|
||||||
project_id: relation.issue_detail?.project_detail.id,
|
project_id: relation.issue_detail?.project_detail.id,
|
||||||
|
issue_identifier: `${relation.issue_detail?.project_detail.identifier}-${relation.issue_detail?.sequence_id}`
|
||||||
})
|
})
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
@ -115,8 +115,9 @@ export const IssueWebViewForm: React.FC<Props> = (props) => {
|
|||||||
<Controller
|
<Controller
|
||||||
name="description_html"
|
name="description_html"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { value, onChange } }) => (
|
render={({ field: { value, onChange } }) => {
|
||||||
<RichTextEditor
|
if(value==null)return <></>;
|
||||||
|
return <RichTextEditor
|
||||||
uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}
|
uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}
|
||||||
deleteFile={fileService.deleteImage}
|
deleteFile={fileService.deleteImage}
|
||||||
value={
|
value={
|
||||||
@ -136,7 +137,7 @@ export const IssueWebViewForm: React.FC<Props> = (props) => {
|
|||||||
handleSubmit(handleDescriptionFormSubmit)().finally(() => setIsSubmitting("submitted"));
|
handleSubmit(handleDescriptionFormSubmit)().finally(() => setIsSubmitting("submitted"));
|
||||||
}}
|
}}
|
||||||
/>
|
/>
|
||||||
)}
|
}}
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
className={`absolute right-5 bottom-5 text-xs text-custom-text-200 border border-custom-border-400 rounded-xl w-[6.5rem] py-1 z-10 flex items-center justify-center ${
|
className={`absolute right-5 bottom-5 text-xs text-custom-text-200 border border-custom-border-400 rounded-xl w-[6.5rem] py-1 z-10 flex items-center justify-center ${
|
||||||
|
@ -97,7 +97,11 @@ export const CycleSelect: React.FC<Props> = (props) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<WebViewModal isOpen={isBottomSheetOpen} onClose={() => setIsBottomSheetOpen(false)} modalTitle="Select Module">
|
<WebViewModal
|
||||||
|
isOpen={isBottomSheetOpen}
|
||||||
|
onClose={() => setIsBottomSheetOpen(false)}
|
||||||
|
modalTitle="Select Cycle"
|
||||||
|
>
|
||||||
<WebViewModal.Options
|
<WebViewModal.Options
|
||||||
options={[
|
options={[
|
||||||
...(incompleteCycles ?? []).map((cycle) => ({
|
...(incompleteCycles ?? []).map((cycle) => ({
|
||||||
|
@ -121,11 +121,11 @@ export const SubIssueList: React.FC<Props> = (props) => {
|
|||||||
|
|
||||||
{subIssuesResponse?.sub_issues?.map((subIssue) => (
|
{subIssuesResponse?.sub_issues?.map((subIssue) => (
|
||||||
<div key={subIssue.id} className="flex items-center justify-between gap-2 py-2">
|
<div key={subIssue.id} className="flex items-center justify-between gap-2 py-2">
|
||||||
<div className="flex items-center">
|
<div className="grid grid-flow-col ">
|
||||||
<p className="mr-3 text-sm text-custom-text-300">
|
<p className="mr-3 text-sm text-custom-text-300">
|
||||||
{subIssue.project_detail.identifier}-{subIssue.sequence_id}
|
{subIssue.project_detail.identifier}-{subIssue.sequence_id}
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm font-normal">{subIssue.name}</p>
|
<p className="text-sm font-normal truncate ">{subIssue.name}</p>
|
||||||
</div>
|
</div>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
|
@ -54,26 +54,25 @@ const Editor: NextPage = () => {
|
|||||||
<Controller
|
<Controller
|
||||||
name="data_html"
|
name="data_html"
|
||||||
control={control}
|
control={control}
|
||||||
render={({ field: { value, onChange } }) => (
|
render={({ field: { value, onChange } }) => {
|
||||||
<RichTextEditor
|
if (value == null) return <></>;
|
||||||
uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}
|
return (
|
||||||
deleteFile={fileService.deleteImage}
|
<RichTextEditor
|
||||||
borderOnFocus={false}
|
uploadFile={fileService.getUploadFileFunction(workspaceSlug as string)}
|
||||||
value={
|
deleteFile={fileService.deleteImage}
|
||||||
!value || value === "" || (typeof value === "object" && Object.keys(value).length === 0)
|
borderOnFocus={false}
|
||||||
? watch("data_html")
|
value={!value || value === "" ? "<p></p>" : value}
|
||||||
: value
|
noBorder={true}
|
||||||
}
|
customClassName="h-full shadow-sm overflow-auto"
|
||||||
noBorder={true}
|
editorContentCustomClassNames="pb-9"
|
||||||
customClassName="h-full shadow-sm overflow-auto"
|
onChange={(description: Object, description_html: string) => {
|
||||||
editorContentCustomClassNames="pb-9"
|
onChange(description_html);
|
||||||
onChange={(description: Object, description_html: string) => {
|
setValue("data_html", description_html);
|
||||||
onChange(description_html);
|
setValue("data", JSON.stringify(description));
|
||||||
setValue("data_html", description_html);
|
}}
|
||||||
setValue("data", JSON.stringify(description));
|
/>
|
||||||
}}
|
);
|
||||||
/>
|
}}
|
||||||
)}
|
|
||||||
/>
|
/>
|
||||||
{isEditable && (
|
{isEditable && (
|
||||||
<Button
|
<Button
|
||||||
|
Loading…
Reference in New Issue
Block a user