Coder Social home page Coder Social logo

Comments (9)

jurrejansen avatar jurrejansen commented on July 22, 2024 1

@DonKoko

Next one is kind of an edge case I think. I imported assets with kit and custodian resulting in 20 assets being part of a kit and having In custody status. However, all assets are In custody individually and not because the kit was assigned custody and assets inheriting the status. This can also happen without an import.

from shelf.nu.

DonKoko avatar DonKoko commented on July 22, 2024 1

Next one is kind of an edge case I think. I imported assets with kit and custodian resulting in 20 assets being part of a kit and having In custody status. However, all assets are In custody individually and not because the kit was assigned custody and assets inheriting the status. This can also happen without an import.

Yeah i know of this but tbh quite complex to solve. We ignore it for now. Also this is more related to imports.

@rockingrohit9639 can you address the other points please?

from shelf.nu.

jurrejansen avatar jurrejansen commented on July 22, 2024 1

@DonKoko this was on app.shelf

Bulk selected 2 bookings with Rerserved status
Performed Cancel bulk action
Got error but received automated mail for both booking saying they were cancelled
Refreshed page
Checked out 1 of 2 bookings
Bulk selected both bookings
Performed cancel bulk actions
Both bookings got cancelled and received automated mails saying they were cancelled again

from shelf.nu.

DonKoko avatar DonKoko commented on July 22, 2024 1

@rockingrohit9639 I have implemented a solution for that last point: #1170

from shelf.nu.

DonKoko avatar DonKoko commented on July 22, 2024

Okey so everything is resolved and released except this:

When selecting the 20 assets that are in a kit and that have In custody status, Release custody action is blocked. For some reason when I go to next page (pagination) the action is possible

It is quite important we fix this. As far as I understand this happens because we only have the ids and when you are on page 2 we don't have the remaining data. What I would recommend is to update the data structure. We currently store an array of ids.
We can do it in 2 ways:

  1. Array of objects - just store all the objects. Arrays can get a bit slow when they get huge so i am a bit skeptical about this
  2. Object of objects - Have an object where inside are objects with the key being the item.id and the value being the item. This is a pattern I have seen some frameworks use because its way more performant to access the data via the key, than having to use .find or .filter inside the array. This is my preferred option on how to handle it. The type of the collection will be something like this:
type Item = Asset | Kit | TeamMember | ....
type ItemsCollection = Record<Item['id'], Item>

I am curious to hear your opinion. @rockingrohit9639

from shelf.nu.

DonKoko avatar DonKoko commented on July 22, 2024

@jurrejansen @carlosvirreira this is all implemented and release.
@jurrejansen can you please test the feedback points you gave and if there is any problem please re-open this issue.

from shelf.nu.

jurrejansen avatar jurrejansen commented on July 22, 2024

@DonKoko I was running through these to do quick tests. And I experienced an issue with bulk cancelling bookings. After loading for quite a while...

  • I tried cancelling 2 Reserved bookings which resulted in an error. However I do receive automated emails saying the bookings were cancelled
    Screenshot 2024-07-15 at 11 06 35
    Screenshot 2024-07-15 at 11 08 41

After checking out 1 of the bookings and trying again to bulk cancel it worked
https://github.com/user-attachments/assets/8b7c7856-66f7-4592-b7d1-c389058ec404

from shelf.nu.

DonKoko avatar DonKoko commented on July 22, 2024

@jurrejansen was this in production or on staging? Do I understand correctly that you received the email for both bookings but only the status of 1 of them got changed?

from shelf.nu.

DonKoko avatar DonKoko commented on July 22, 2024

@rockingrohit9639 I also found an issue:
I have filtered by in-custody and I have 2 pages. When I click select all the button is disabled, but that is not correct because actually all assets are in custody

Image

from shelf.nu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.