Add AST cache files for representation API and ApiIrService
- Created a new JSON file for the representation API documentation, including nodes and edges that describe the API structure and relationships. - Added another JSON file for the ApiIrService class, detailing its methods, imports, and relationships with other components.
This commit is contained in:
@@ -52,11 +52,12 @@ export default function RepresentationProfilePage() {
|
||||
});
|
||||
|
||||
const addIbanMut = useMutation({
|
||||
mutationFn: (v: string) =>
|
||||
api.post<ApiResponse<RepProfile>>('/api/v1/representation/iban', { iban: v }),
|
||||
mutationFn: (payload: { iban: string; birth_date: string }) =>
|
||||
api.post<ApiResponse<RepProfile>>('/api/v1/representation/iban', payload),
|
||||
onSuccess: () => {
|
||||
toast.success('شماره شبا تأیید و اضافه شد');
|
||||
setIban('');
|
||||
setBirthDate('');
|
||||
qc.invalidateQueries({ queryKey: ['representation-me'] });
|
||||
},
|
||||
onError: (e: Error) => toast.error(e.message),
|
||||
@@ -80,7 +81,10 @@ export default function RepresentationProfilePage() {
|
||||
|
||||
const submitIban = () => {
|
||||
if (!iban.trim()) { toast.error('شماره شبا را وارد کنید'); return; }
|
||||
addIbanMut.mutate(iban.trim());
|
||||
if (!/^\d{4}[\/\-.]\d{1,2}[\/\-.]\d{1,2}$/.test(birthDate.trim())) {
|
||||
toast.error('تاریخ تولد را به صورت 1370/01/01 وارد کنید'); return;
|
||||
}
|
||||
addIbanMut.mutate({ iban: iban.trim(), birth_date: birthDate.trim() });
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -167,11 +171,16 @@ export default function RepresentationProfilePage() {
|
||||
onChange={(e) => setIban(e.target.value)}
|
||||
style={{ width: 320, height: 38, padding: '0 12px', borderRadius: 'var(--r-sm)', border: '1px solid var(--border)', background: 'var(--surface)', color: 'var(--text)', fontSize: 13, boxSizing: 'border-box', fontFamily: 'monospace' }}
|
||||
/>
|
||||
<input
|
||||
type="text" dir="ltr" value={birthDate} placeholder="تاریخ تولد ۱۳۷۰/۰۱/۰۱"
|
||||
onChange={(e) => setBirthDate(e.target.value)}
|
||||
style={{ width: 180, height: 38, padding: '0 12px', borderRadius: 'var(--r-sm)', border: '1px solid var(--border)', background: 'var(--surface)', color: 'var(--text)', fontSize: 13, boxSizing: 'border-box', textAlign: 'center' }}
|
||||
/>
|
||||
<button className="btn primary" onClick={submitIban} disabled={addIbanMut.isPending} style={{ display: 'inline-flex', alignItems: 'center', gap: 4 }}>
|
||||
<PlusIcon style={{ width: 16, height: 16 }} />
|
||||
{addIbanMut.isPending ? 'در حال بررسی...' : 'افزودن شبا'}
|
||||
</button>
|
||||
<span className="muted" style={{ fontSize: 12 }}>مالکیت با استعلام بررسی میشود</span>
|
||||
<span className="muted" style={{ fontSize: 12, width: '100%' }}>تاریخ تولد فقط برای استعلام مالکیت شبا استفاده میشود و ذخیره نمیشود.</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user