Skip to content

Commit

Permalink
Merge branch 'release/1.5.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
apoorv1316 committed Apr 17, 2024
2 parents cc19dd5 + 9c219fc commit c3146c8
Show file tree
Hide file tree
Showing 29 changed files with 333 additions and 557 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@ def update

def destroy
timesheet_entries = policy_scope(TimesheetEntry)
if timesheet_entries.where(id: ids_params).destroy_all
timesheet_entries_discarded = timesheet_entries.where(id: ids_params).discard_all
if timesheet_entries_discarded
render json: { notice: I18n.t("timesheet_entry.destroy.message") }
else
render json: { notice: "Some of the timesheet entries were failed to delete" }
end
end

Expand Down
4 changes: 2 additions & 2 deletions app/controllers/internal_api/v1/timesheet_entry_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def update

def destroy
authorize current_timesheet_entry
render json: { notice: I18n.t("timesheet_entry.destroy.message") } if current_timesheet_entry.destroy
render json: { notice: I18n.t("timesheet_entry.destroy.message") } if current_timesheet_entry.discard!
end

private
Expand All @@ -44,7 +44,7 @@ def current_project
end

def current_timesheet_entry
@_current_timesheet_entry ||= current_company.timesheet_entries.find(params[:id])
@_current_timesheet_entry ||= current_company.timesheet_entries.kept.find(params[:id])
end

def timesheet_entry_params
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,11 @@ const SendInvoice = ({
<XIcon size={16} weight="bold" />
</button>
</div>
{!invoiceEmail?.recipients?.length && (
<div className="mb-6 w-full items-center justify-center rounded bg-miru-alert-pink-400 p-2 text-center font-manrope text-xs tracking-xs-widest text-miru-alert-red-1000">
<p>Please add email from client settings page</p>
</div>
)}
<form className="space-y-4">
<fieldset className="field_with_errors flex flex-col">
<label className="form__label mb-2" htmlFor="to">
Expand Down

This file was deleted.

This file was deleted.

48 changes: 0 additions & 48 deletions app/javascript/src/components/Profile/LeaveBalance/TileContent.tsx

This file was deleted.

206 changes: 0 additions & 206 deletions app/javascript/src/components/Profile/LeaveBalance/index.tsx

This file was deleted.

Loading

0 comments on commit c3146c8

Please sign in to comment.