Skip to content

Comments

[FEATURE] Default filter on Opened Chats only for window "Current Chats" on Livechat#13848

Closed
knrt10 wants to merge 7 commits intoRocketChat:developfrom
knrt10:issue12703
Closed

[FEATURE] Default filter on Opened Chats only for window "Current Chats" on Livechat#13848
knrt10 wants to merge 7 commits intoRocketChat:developfrom
knrt10:issue12703

Conversation

@knrt10
Copy link
Contributor

@knrt10 knrt10 commented Mar 22, 2019

Closes #12703

cc @renatobecker would you please review.

@knrt10 knrt10 changed the title [FEATURE] Default filter on Opened Chats only window "Current Chats" [FEATURE] Default filter on Opened Chats only for window "Current Chats" on Livechat Mar 22, 2019
@marceloschmidt marceloschmidt added this to the 1.1.0 milestone Apr 4, 2019
@marceloschmidt
Copy link
Member

Please save the user's option on localStorage.

@knrt10
Copy link
Contributor Author

knrt10 commented Apr 4, 2019

Ok, let me update

@knrt10 knrt10 force-pushed the issue12703 branch 3 times, most recently from caf49c7 to 9a03e10 Compare April 9, 2019 17:26
@rodrigok rodrigok modified the milestones: 1.1.0, 1.2.0 May 15, 2019
@engelgabriel engelgabriel modified the milestones: 1.2.0, 1.3.0 Jul 10, 2019
@sampaiodiego sampaiodiego modified the milestones: 1.3.0, 1.4.0 Jul 25, 2019
@sampaiodiego sampaiodiego modified the milestones: 2.0.0, 2.1.0 Sep 6, 2019
@renatobecker-zz
Copy link

Hi @knrt10
Can you please fix the conflicts?

Thanks.

@knrt10
Copy link
Contributor Author

knrt10 commented Oct 4, 2019

@renatobecker fixed. Please review

@renatobecker-zz
Copy link

@renatobecker fixed. Please review

Can you please fix the conflicts?

@knrt10
Copy link
Contributor Author

knrt10 commented Oct 13, 2019

@renatobecker fixed.

@engelgabriel engelgabriel modified the milestones: 2.1.0, 2.2.0 Oct 13, 2019
@renatobecker-zz renatobecker-zz self-requested a review October 14, 2019 13:17
return this.servedBy && this.servedBy.username;
},
status() {
if (localStorage.getItem('status')) {
Copy link
Member

Choose a reason for hiding this comment

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

Why are you returning the localstorage value here? It's a helper to translate the status of each room rendered

format: moment.localeData().longDateFormat('L').toLowerCase(),
});

// Set value of select
Copy link
Member

Choose a reason for hiding this comment

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

Should use a helper to return the value to the template instead of set it manually

this.tagFilters = new ReactiveVar([]);
this.departments = new ReactiveVar([]);

if (localStorage.getItem('status')) {
Copy link
Member

Choose a reason for hiding this comment

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

Prevent code duplicationg by moving the getItem from localstorage to a variable.
Use a better name than just status, it's too generic and may be used by another place in the application. Use some thing like livechatCurrentChats.filter.status

@rodrigok rodrigok modified the milestones: 2.2.0, 2.3.0 Oct 19, 2019
@renatobecker-zz renatobecker-zz modified the milestones: 2.3.0, 3.0.0 Dec 6, 2019
@claassistantio
Copy link

claassistantio commented Dec 14, 2019

CLA assistant check
All committers have signed the CLA.

@renatobecker-zz
Copy link

Hey @knrt10, there are new conflicts, sry. for not reviewing it before.
Do you mind fixing it again?

@renatobecker
Copy link
Contributor

@knrt10 we're closing this PR because we fixed the issue here.

Thanks for your help.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Default filter on Opened Chats only instead of All chats in window "Current Chats"

9 participants