Compare commits
No commits in common. "23d1a535a0c269c252c3115e3c2bb12fc9735513" and "8bf34fa5e2d873dc7eb25c93cd279e8fe5c43d07" have entirely different histories.
23d1a535a0
...
8bf34fa5e2
@ -5,6 +5,8 @@ import { Card, CardContent } from '@/components/ui/card';
|
|||||||
import { Button } from '@/components/ui/button';
|
import { Button } from '@/components/ui/button';
|
||||||
import { StatusChip } from './StatusChip';
|
import { StatusChip } from './StatusChip';
|
||||||
import { TimelineStep } from './TimelineStep';
|
import { TimelineStep } from './TimelineStep';
|
||||||
|
import { contactAdminForForm16Mismatch } from '@/services/form16Api';
|
||||||
|
import { toast } from 'sonner';
|
||||||
|
|
||||||
export type SubmissionResultStatus = 'success' | 'mismatch' | 'duplicate' | 'error';
|
export type SubmissionResultStatus = 'success' | 'mismatch' | 'duplicate' | 'error';
|
||||||
|
|
||||||
@ -48,6 +50,16 @@ export function RequestSubmissionSuccess({
|
|||||||
return 'Form 16A details do not match with 26AS data.';
|
return 'Form 16A details do not match with 26AS data.';
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
const onContactAdmin = async () => {
|
||||||
|
try {
|
||||||
|
await contactAdminForForm16Mismatch(requestId);
|
||||||
|
toast.success('Administrator notified');
|
||||||
|
} catch (e: any) {
|
||||||
|
const msg = e?.response?.data?.message || e?.message || 'Failed to notify administrator';
|
||||||
|
toast.error(String(msg));
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
const isDuplicate = status === 'duplicate';
|
const isDuplicate = status === 'duplicate';
|
||||||
const isError = status === 'error';
|
const isError = status === 'error';
|
||||||
|
|
||||||
@ -183,9 +195,6 @@ export function RequestSubmissionSuccess({
|
|||||||
<p className="text-sm text-gray-700">
|
<p className="text-sm text-gray-700">
|
||||||
If you have submitted the updated Form 16A but the latest 26AS is not uploaded for this quarter yet, please notify RE so they can upload/update 26AS.
|
If you have submitted the updated Form 16A but the latest 26AS is not uploaded for this quarter yet, please notify RE so they can upload/update 26AS.
|
||||||
</p>
|
</p>
|
||||||
<p className="text-sm text-amber-900 mt-2">
|
|
||||||
contact at - service@royalenfield.com
|
|
||||||
</p>
|
|
||||||
</div>
|
</div>
|
||||||
)}
|
)}
|
||||||
</>
|
</>
|
||||||
@ -281,6 +290,11 @@ export function RequestSubmissionSuccess({
|
|||||||
{isDuplicate ? 'Back to New Submission' : isMismatch ? 'Resubmit Form 16A' : 'Try Again'}
|
{isDuplicate ? 'Back to New Submission' : isMismatch ? 'Resubmit Form 16A' : 'Try Again'}
|
||||||
</Button>
|
</Button>
|
||||||
)}
|
)}
|
||||||
|
{isMissing26AsMismatch && (
|
||||||
|
<Button onClick={onContactAdmin} variant="outline" className="border-amber-300 text-amber-800">
|
||||||
|
Contact admin
|
||||||
|
</Button>
|
||||||
|
)}
|
||||||
<Button onClick={onComplete} variant="outline">
|
<Button onClick={onComplete} variant="outline">
|
||||||
Back to My Requests
|
Back to My Requests
|
||||||
</Button>
|
</Button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user