Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[241] Implement editing signature signer #265

Merged
merged 3 commits into from
Jan 30, 2025

Conversation

elvincheng3
Copy link
Contributor

@elvincheng3 elvincheng3 commented Jan 23, 2025

Description

Implement service and controller for editing signature signers

Motivation and Context

Allows users to be able to modify who is able to sign for a signature.

Closes [#241]

How has this been tested?

Unit testing.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
mfa-form-automator ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 23, 2025 8:19pm

Copy link
Collaborator

@kaiyangzheng kaiyangzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM just one question

import { CreateSignatureDto } from './create-signature.dto';

export class UpdateSignatureSignerDto extends PartialType(
OmitType(CreateSignatureDto, ['order'] as const),
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any reason we would want to not change the order of a signature?

I know form instances inherit from form templates so messing with the order of signatures messes with the invariant that form instances have the same number + order of signatures as its form template, but do we think that employees would want to change the order in specific edge cases?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can extend the functionality to include updating the order, but we would also have to figure out how that works. How would we determine how to adjust the order? And we would have to adjust the order for every signature on the form as well.

import { UpdateSignatureSignerDto } from './dto/update-signature-signer.dto';
import { SignerType } from '@prisma/client';

let mockSignatureService = {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I finally understand what a mock is (thanks sweng!) so good job on this

@kaiyangzheng kaiyangzheng linked an issue Jan 24, 2025 that may be closed by this pull request
2 tasks
Copy link
Collaborator

@kaiyangzheng kaiyangzheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be good except that one question.

@elvincheng3 elvincheng3 merged commit 9bfc5f7 into main Jan 30, 2025
7 checks passed
@elvincheng3 elvincheng3 deleted the 241-implement-signature-controller-service branch January 30, 2025 23:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE] Implement signature service and controller
2 participants