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

Adding Seats with No Activity in 30 days in Seat Analysis #101

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

kelvin-citation
Copy link

Adding Seats with No Activity in 30 days in Seat Analysis

Adding Seats with No Activity in 30 days
fixing bug related to 30 days
Copy link

@daniel-citation daniel-citation left a comment

Choose a reason for hiding this comment

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

Looks good - does what it needs to do!

@@ -116,27 +128,39 @@ data() {
setup(props) {
let totalSeats = ref<Seat[]>([]);
let NoshowSeats = ref<Seat[]>([]);
const unusedSeats = ref<Seat[]>([]);
const unusedSeatsInSevenDays = ref<Seat[]>([]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

do we need ref of <Seat[]> if only length is used?


NoshowSeats.value = props.seats.filter(seat => seat.last_activity_at == null);

unusedSeats.value = totalSeats.value.filter(seat => {
unusedSeatsInSevenDays.value = totalSeats.value.filter(seat => {
Copy link
Collaborator

Choose a reason for hiding this comment

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

this could be slightly improved if there's just one loop and we check activity date and add to counter, instead of going through all the seats twice

@karpikpl
Copy link
Collaborator

thanks for the PR, let me know if you have time to make suggested changes

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.

3 participants