Notify transfer owners when files enter grace period.
Deploy Ladill Transfer / deploy (push) Successful in 1m0s
Deploy Ladill Transfer / deploy (push) Successful in 1m0s
Send grace-entered and countdown emails to owners alongside recipient grace milestones so unpaid transfers get clear wallet top-up reminders before deletion. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
@extends('mail.notifications.layout')
|
||||
|
||||
@section('content')
|
||||
@php
|
||||
$graceEnds = $transfer->grace_ends_at;
|
||||
$monthlyCost = number_format($transfer->monthlyCostGhs(), 2);
|
||||
@endphp
|
||||
|
||||
@if($milestone === 'grace_entered')
|
||||
<div class="highlight-box highlight-box-warning">
|
||||
<p class="highlight-box-text">Payment required</p>
|
||||
<p class="highlight-box-subtext">{{ $transfer->title }}</p>
|
||||
</div>
|
||||
|
||||
<h1 class="email-title">Your transfer entered the grace period</h1>
|
||||
<p class="email-text">
|
||||
We could not renew storage for <strong>{{ $transfer->title }}</strong> because your Ladill wallet balance was too low.
|
||||
Your files are still available for now, but they will be deleted unless payment is received.
|
||||
</p>
|
||||
@else
|
||||
<div class="highlight-box highlight-box-warning">
|
||||
<p class="highlight-box-text">Deletion reminder</p>
|
||||
<p class="highlight-box-subtext">
|
||||
@if($daysRemaining === 1)
|
||||
Files deleted tomorrow
|
||||
@else
|
||||
{{ $daysRemaining }} days remaining
|
||||
@endif
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<h1 class="email-title">
|
||||
@if($daysRemaining === 1)
|
||||
Your files will be deleted tomorrow
|
||||
@else
|
||||
{{ $daysRemaining }} days left to save your transfer
|
||||
@endif
|
||||
</h1>
|
||||
<p class="email-text">
|
||||
<strong>{{ $transfer->title }}</strong> is still in the grace period.
|
||||
Top up your wallet so we can renew storage before the files are removed.
|
||||
</p>
|
||||
@endif
|
||||
|
||||
<div class="email-details">
|
||||
<p class="email-details-title">Transfer details</p>
|
||||
<div class="email-details-row">
|
||||
<p class="email-details-label">Monthly storage cost</p>
|
||||
<p class="email-details-value">GHS {{ $monthlyCost }}</p>
|
||||
</div>
|
||||
@if($graceEnds)
|
||||
<div class="email-details-row">
|
||||
<p class="email-details-label">Files kept until</p>
|
||||
<p class="email-details-value">{{ $graceEnds->format('F j, Y') }}</p>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<table role="presentation" cellspacing="0" cellpadding="0" border="0" width="100%" style="margin:24px 0;">
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="{{ $walletUrl }}" class="email-button">Top up wallet</a>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<p class="email-text" style="font-size:13px;color:#6b7280;text-align:center;">
|
||||
Or <a href="{{ $transferUrl }}" style="color:#4f46e5;">view this transfer</a> in Ladill Transfer.
|
||||
</p>
|
||||
@endsection
|
||||
@@ -23,6 +23,11 @@
|
||||
@endif
|
||||
</p>
|
||||
@elseif($milestone === 'grace')
|
||||
<div class="highlight-box highlight-box-warning" style="margin-top:0;">
|
||||
<p class="highlight-box-text">Grace period</p>
|
||||
<p class="highlight-box-subtext">Download soon</p>
|
||||
</div>
|
||||
|
||||
<h1 class="email-title">Download before these files are removed</h1>
|
||||
<p class="email-text">
|
||||
The transfer <strong>{{ $transfer->title }}</strong> is in a grace period.
|
||||
|
||||
Reference in New Issue
Block a user