Skip to content

Commit

Permalink
Merge pull request #1662 from saeloun/feature/time-off-day-view
Browse files Browse the repository at this point in the history
Enable Time-off entry  in "Day" view
  • Loading branch information
JijoBose authored Feb 16, 2024
2 parents b7cb0b4 + 4e7ee89 commit bf8fc89
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ gem "data_migrate", "~> 8.0.0.rc2"
# pagy for Pagination
gem "pagy", "~> 5.10"

gem "nokogiri", ">= 1.13.10"
gem "nokogiri", ">= 1.16.2"

# Manage application specific business logic. https://github.com/AaronLasseigne/active_interaction
gem "active_interaction"
Expand Down
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -664,7 +664,7 @@ DEPENDENCIES
letter_opener_web
money
newrelic_rpm (~> 8.4)
nokogiri (>= 1.13.10)
nokogiri (>= 1.16.2)
omniauth-google-oauth2 (~> 1.0)
omniauth-rails_csrf_protection (~> 1.0)
pagy (~> 5.10)
Expand Down
22 changes: 20 additions & 2 deletions app/javascript/src/components/TimesheetEntries/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -661,7 +661,25 @@ const TimesheetEntries = ({ user, isAdminUser }: Iprops) => {
<div className="pb-14">
{!isDesktop && <Header />}
<div className="mt-0 h-full p-4 lg:mt-6 lg:p-0">
<div className="mb-6 flex items-center justify-between md:flex-row-reverse">
<div className="mb-6 flex items-center justify-between">
{isDesktop && (
<nav className="flex">
{["month", "day"].map((item, index) => (
<button
key={index}
className={`mr-10 tracking-widest
${
item === view
? "border-b-2 border-miru-han-purple-1000 font-bold text-miru-han-purple-1000"
: "font-medium text-miru-han-purple-600"
}`}
onClick={() => setView(item)}
>
{item.toUpperCase()}
</button>
))}
</nav>
)}
{isDesktop && isViewTogglerVisible && (
<ViewToggler view={view} setView={setView} />
)}
Expand Down Expand Up @@ -718,7 +736,7 @@ const TimesheetEntries = ({ user, isAdminUser }: Iprops) => {
+ NEW ENTRY
</button>
)}
{view === "month" &&
{view !== "week" &&
!newEntryView &&
!newTimeoffEntryView &&
isDesktop && (
Expand Down

0 comments on commit bf8fc89

Please sign in to comment.