Skip to content

Conversation

@rosle
Copy link
Owner

@rosle rosle commented Mar 30, 2020

What happened

✅ Create keyword records from the parsed csv file
✅ Associate the keyword to user
✅ Display the keywords

Insight

From the parse keywords, we insert those keywords into the db associated by the user.

Then list all the user keywords on the dashboard page.

Proof Of Work

Now the user can see the keywords on the dashboard.

Screen Shot 2563-03-31 at 10 40 29

  • If some keywords cannot be create (probably there is an error while inserting 🤔). Display an error message - To simulate this I just try to return {:error, changeset} from the create function.

    Screen Shot 2563-03-31 at 11 13 08

@rosle rosle force-pushed the feature/create-keyword branch from 7f79650 to 594a2e9 Compare March 30, 2020 12:58
@rosle rosle changed the title Create keyword from the parse csv As a user, I can see my keywords Mar 31, 2020
@rosle rosle force-pushed the feature/create-keyword branch from 12d2f3b to a91b0b5 Compare March 31, 2020 03:28
|> Enum.map(&Search.create_keyword(&1, conn.assigns.current_user))
end

defp put_error_flash_for_failed_keywords(create_result, conn) do
Copy link
Owner Author

Choose a reason for hiding this comment

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

I'm displaying some error message when some of the keywords cannot be created but I'm not sure how to test it 🤔💭

@rosle rosle marked this pull request as ready for review April 16, 2020 05:35
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.

2 participants