diff --git a/instances/devhub.near/widget/devhub/entity/proposal/Editor.jsx b/instances/devhub.near/widget/devhub/entity/proposal/Editor.jsx index 31fb566cb..50bc35fc5 100644 --- a/instances/devhub.near/widget/devhub/entity/proposal/Editor.jsx +++ b/instances/devhub.near/widget/devhub/entity/proposal/Editor.jsx @@ -898,7 +898,7 @@ const ConsentComponent = useMemo(() => { src={ "${REPL_DEVHUB}/widget/devhub.entity.proposal.AcceptedTerms" } - props={{ proposalId: proposalId }} + props={{ proposalId: proposalId, portal: "DevHub" }} /> and commit to honoring it > diff --git a/instances/events-committee.near/widget/devhub/components/molecule/Button.jsx b/instances/events-committee.near/widget/devhub/components/molecule/Button.jsx index c7cdfae46..7a580525c 100644 --- a/instances/events-committee.near/widget/devhub/components/molecule/Button.jsx +++ b/instances/events-committee.near/widget/devhub/components/molecule/Button.jsx @@ -145,6 +145,7 @@ const Button = ({ disabled ? "disabled" : "", ].join(" ")} style={{ width: "fit-content" }} + disabled={disabled} {...restProps} data-testid={props.testId ?? "button"} > diff --git a/instances/events-committee.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx b/instances/events-committee.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx index b534383f5..fce79b846 100644 --- a/instances/events-committee.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx +++ b/instances/events-committee.near/widget/devhub/entity/proposal/CommentsAndLogs.jsx @@ -93,6 +93,16 @@ function sortTimelineAndComments() { .slice(1) .map((item, index) => { const startingPoint = snapshotHistory[index]; // Set comparison to the previous item + // we don't show timeline_version in logs + delete startingPoint.timeline.timeline_version; + delete item.timeline.timeline_version; + if ( + startingPoint.timeline.kyc_verified === undefined && + item.timeline.kyc_verified === false + ) { + startingPoint.timeline.kyc_verified = false; + } + return { editorId: item.editor_id, ...getDifferentKeysWithValues(startingPoint, item), @@ -270,8 +280,12 @@ function parseTimelineKeyAndValue(timeline, originalValue, modifiedValue) { ) ); - case "sponsor_requested_review": - return !oldValue && newValue && completed review; + case "sponsor_requested_review": { + if (!oldValue && newValue) { + return completed review; + } else if (oldValue && !newValue) return unmarked review; + return null; + } case "reviewer_completed_attestation": return !oldValue && newValue && completed attestation; case "kyc_verified": diff --git a/instances/events-committee.near/widget/devhub/entity/proposal/Editor.jsx b/instances/events-committee.near/widget/devhub/entity/proposal/Editor.jsx index 6ac9c3a19..e991ac55c 100644 --- a/instances/events-committee.near/widget/devhub/entity/proposal/Editor.jsx +++ b/instances/events-committee.near/widget/devhub/entity/proposal/Editor.jsx @@ -737,9 +737,12 @@ const onSubmit = ({ isDraft, isCancel }) => { status: "CANCELLED", sponsor_requested_review: false, reviewer_completed_attestation: false, + kyc_verified: false, } : isDraft ? { status: "DRAFT" } + : isEditPage + ? editProposalData.snapshot.timeline : { status: "REVIEW", sponsor_requested_review: false, @@ -749,6 +752,10 @@ const onSubmit = ({ isDraft, isCancel }) => { const args = { labels: (labels ?? []).map((i) => i.value), body: body }; if (isEditPage) { args["id"] = editProposalData.id; + } else { + args["accepted_terms_and_conditions_version"] = parseInt( + Near.block().header.height + ); } Near.call([ @@ -890,16 +897,12 @@ const ConsentComponent = useMemo(() => { label: ( <> I’ve agree to{" "} - - Event Committee’s Terms and Conditions - + props={{ proposalId: proposalId, portal: "Events Committee" }} + /> and commit to honoring it > ), @@ -926,7 +929,7 @@ const ConsentComponent = useMemo(() => { target="_blank" rel="noopener noreferrer" > - Event Committee’s Code of Conduct + Events Committee’s Code of Conduct and commit to honoring it > diff --git a/instances/events-committee.near/widget/devhub/entity/proposal/Proposal.jsx b/instances/events-committee.near/widget/devhub/entity/proposal/Proposal.jsx index 3e790cf62..249b31351 100644 --- a/instances/events-committee.near/widget/devhub/entity/proposal/Proposal.jsx +++ b/instances/events-committee.near/widget/devhub/entity/proposal/Proposal.jsx @@ -351,12 +351,14 @@ const proposalStatusOptions = [ status: TIMELINE_STATUS.REVIEW, sponsor_requested_review: false, reviewer_completed_attestation: false, + kyc_verified: false, }, }, { label: "Approved", value: { status: TIMELINE_STATUS.APPROVED, + kyc_verified: true, sponsor_requested_review: true, reviewer_completed_attestation: false, }, @@ -365,6 +367,7 @@ const proposalStatusOptions = [ label: "Approved-Conditionally", value: { status: TIMELINE_STATUS.APPROVED_CONDITIONALLY, + kyc_verified: true, sponsor_requested_review: true, reviewer_completed_attestation: false, }, @@ -375,6 +378,7 @@ const proposalStatusOptions = [ status: TIMELINE_STATUS.REJECTED, sponsor_requested_review: true, reviewer_completed_attestation: false, + kyc_verified: true, }, }, { @@ -383,13 +387,14 @@ const proposalStatusOptions = [ status: TIMELINE_STATUS.CANCELED, sponsor_requested_review: false, reviewer_completed_attestation: false, + kyc_verified: true, }, }, { label: "Payment-processing", value: { status: TIMELINE_STATUS.PAYMENT_PROCESSING, - kyc_verified: false, + kyc_verified: true, test_transaction_sent: false, request_for_trustees_created: false, sponsor_requested_review: true, @@ -438,9 +443,11 @@ const LinkedProposals = () => { }} />