Skip to content

Commit

Permalink
add a visual for the diff in format
Browse files Browse the repository at this point in the history
  • Loading branch information
dakota002 authored and lpsinger committed Mar 11, 2024
1 parent 674d8fb commit 460dd8c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,11 @@ export default function () {
oldString={circular.subject}
newString={correction.subject}
/>
<h3>Format</h3>
<DiffedContent
oldString={circular.format ?? 'text/plain'}
newString={correction.format}
/>
<h3>Body</h3>
<DiffedContent oldString={circular.body} newString={correction.body} />
<Form method="POST">
Expand Down
1 change: 1 addition & 0 deletions app/routes/_gcn.circulars/circulars.lib.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ export interface CircularChangeRequest extends CircularMetadata {
body: string
requestor: string
requestorSub: string
format: CircularFormat
}

type SubjectMatcher = [RegExp, (match: RegExpMatchArray) => string]
Expand Down
1 change: 1 addition & 0 deletions app/routes/_gcn.circulars/circulars.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -481,6 +481,7 @@ export async function approveChangeRequest(
subject: changeRequest.subject,
editedBy: `${formatAuthor(user)} on behalf of ${changeRequest.requestor}`,
editedOn: Date.now(),
format: changeRequest.format,
})

await deleteChangeRequestRaw(circularId, requestorSub)
Expand Down

0 comments on commit 460dd8c

Please sign in to comment.