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

Display saved date for gifts #5080

Closed
mgrhm opened this issue Apr 19, 2021 · 6 comments
Closed

Display saved date for gifts #5080

mgrhm opened this issue Apr 19, 2021 · 6 comments

Comments

@mgrhm
Copy link

mgrhm commented Apr 19, 2021

The ability to add a date to a gift was added by @sktlmarat in #4909, and works. Monica correctly saves and stores the date of the gift. Unfortunately, it doesn't by default display this date in a useful fashion -- it's hidden and only visible when switching into 'Edit' mode.

This information is too useful to hide by default. I tried to add this myself by editing Gifts.vue, but I don't know any Javascript and couldn't make head nor tails of it. I wasn't able to add it in myself.

I've made a mockup of where I think would be a good place for it, and attached it to this issue. (It's on the right hand side of the gift's title bar.)

Screenshot 2021-04-19 at 17 29 03

@sktlmarat
Copy link

Hi @mgrhm ,

Can you make a PR with the ready markup? I will then make a few corrections to your code. I guess it won't require too much code.

@mgrhm
Copy link
Author

mgrhm commented Apr 20, 2021

Hi @sktlmarat. I really have absolutely no idea where to start with this -- I know a bit of HTML, a bit of CSS, but no PHP or Javascript at all.

I've looked at the code in resources/js/components/people/gifts/Gifts.vue. I have no idea at all how to add this. From what I can work out, I think the code would need to be added somewhere between lines 57 and 61:

  <div v-for="gift in filteredGifts" :key="gift.id" v-cy-name="'gift-item-' + gift.id" class="ba b--gray-monica mb3 br2">
    <gift v-if="!gift.edit"
          :gift="gift"
          @update="($event) => { updateList($event) }"
    >

I’m really not sure if this is right, though, and I'm grateful for any input you have.

@sktlmarat
Copy link

@mgrhm, I need css/html of this.
115271912-beb7fe80-a135-11eb-9199-63bcdec713d2

@mgrhm
Copy link
Author

mgrhm commented Apr 20, 2021

Sorry -- I don't actually have CSS or HTML for that. It's just an image that I edited using Paintbrush to add the date onto a screenshot.

I've spent some time this afternoon trying to work out which CSS classes would apply, but I have genuinely no idea -- I can't make heads nor tails of either the generated output or the .vue input files. I'm sorry I can't be of more help. This is just beyond my very limited skills.

@asbiin
Copy link
Member

asbiin commented Apr 29, 2021

Fixed by #5081

@asbiin asbiin closed this as completed Apr 29, 2021
@github-actions
Copy link

This issue 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 Apr 30, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants