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

feat: add ability to upload documents #1912

Merged
merged 58 commits into from
Oct 28, 2018
Merged

Conversation

djaiss
Copy link
Member

@djaiss djaiss commented Oct 12, 2018

This PR adds the ability to upload documents to a contact. In this PR, we can't upload a document through the API yet.

2018-10-27-documents

  • Delete a document
  • When resetting an account, delete all documents
  • When deleting an account, delete all documents
  • Increment counter whenever someone downloads the document

Front-end changes

  • Screenshots are included if the PR changes the UI.
  • Front-end tests have been written with Cypress.

Backend/models changes

  • The API has been updated.
  • API's documentation has been added by submitting a pull request in the marketing website repository.
  • Tests have been added for the new code.
  • If you change a model, make sure the FakeContentTableSeeder is updated. We need seeders to develop locally and generate fake data.

If the code changes the SQL schema

  • Make sure exporting account data as SQL is still working.
  • Make sure your changes do not break importing data with vCard and .csv files.
  • Make sure account reset and deletion still work.

Other tasks

  • CHANGELOG entry added, if necessary, under UNRELEASED.
  • If it's relevant and worth mentioning, create a changelog entry for this change. The changelog entry will appear inside the UI for all users to see. To know if your change is worth the creation of a changelog entry, read the documentation.

@djaiss djaiss changed the title feat: add ability to upload documents feat: add ability to upload documents [wip] Oct 12, 2018
Copy link

@sonarqubecloud sonarqubecloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 1

See all issues in SonarCloud

Copy link

@sonarqubecloud sonarqubecloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 1

See all issues in SonarCloud

Copy link

@sonarqubecloud sonarqubecloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 1

See all issues in SonarCloud

Copy link

@sonarqubecloud sonarqubecloud bot left a comment

Choose a reason for hiding this comment

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

SonarQube analysis found issues:
Bug Bugs: 0
Vulnerability Vulnerabilities: 0
Code Smell Code Smells: 1

See all issues in SonarCloud

$contact->has_avatar = true;
$contact->avatar_location = config('filesystems.default');
$contact->avatar_file_name = $request->avatar->storePublicly('avatars', $contact->avatar_location);
// $contact->has_avatar = true;

Choose a reason for hiding this comment

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

Code Smell Code Smell: Remove this commented out code. (php:S125)

See it in SonarCloud

@CLAassistant
Copy link

CLAassistant commented Oct 23, 2018

CLA assistant check
All committers have signed the CLA.

@djaiss
Copy link
Member Author

djaiss commented Oct 27, 2018

@asbiin I need your help.

Deleting a document doesn't work. The error is about WrongIdException - meaning the hashID of the contact is not right when making the call.

But I don't see what I do wrong.

@djaiss djaiss dismissed asbiin’s stale review October 28, 2018 00:22

All changes done

@djaiss djaiss changed the title feat: add ability to upload documents [wip] feat: add ability to upload documents Oct 28, 2018
@djaiss djaiss merged commit fd9b285 into master Oct 28, 2018
@djaiss djaiss deleted the 2018-09-22-add-document-upload branch October 28, 2018 01:14
@github-actions
Copy link

This pull request has been automatically locked since there
has not been any recent activity after it was closed.
Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 30, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants