chat-widget icon indicating copy to clipboard operation
chat-widget copied to clipboard

Add option to hide widget outside working hours

Open reichert621 opened this issue 3 years ago • 6 comments

Let's add a new prop: hideOutsideWorkingHours.

If this is true, we'll check the widget settings settings.account?.is_outside_working_hours and completely hide the widget if this value is true.

reichert621 avatar Mar 10 '21 15:03 reichert621

@reichert621, I like to work on this

tharun208 avatar Mar 22 '21 15:03 tharun208

sure @tharun208! let me know if you need any help getting set up :+1:

reichert621 avatar Mar 22 '21 16:03 reichert621

@reichert621, The test account added in the repo is removed I think so

tharun208 avatar Mar 22 '21 16:03 tharun208

@tharun208 the easiest way to test for you would probably be to do the following:

  • sign up for a free papercups account at https://app.papercups.io/register
  • get your account ID and update this account ID to match yours: https://github.com/papercups-io/chat-widget/blob/master/example/src/App.tsx#L6
  • remove/comment out these two lines (so they point at our hosted app by default): https://github.com/papercups-io/chat-widget/blob/master/example/src/App.tsx#L73-L74

reichert621 avatar Mar 22 '21 16:03 reichert621

@reichert621, should we need to show the chat widget icon or we need to show nothing to the user if this prop is set ?

tharun208 avatar Mar 22 '21 17:03 tharun208

show nothing if this prop is set :+1:

reichert621 avatar Mar 22 '21 17:03 reichert621