Refine Tally upload UI in engagement workspace
This commit is contained in:
@@ -128,9 +128,9 @@
|
||||
<p class="mt-1 text-[11px] text-slate-500">Replacement/version uploads use the existing document container and retain the ERP audit/version history.</p>
|
||||
</div>
|
||||
<div class="grid gap-3 sm:grid-cols-2">
|
||||
<div>
|
||||
<div data-document-type-wrap>
|
||||
<label class="mb-1 block text-xs font-semibold uppercase tracking-wide text-slate-500">Document Type</label>
|
||||
<select name="document_type" class="w-full rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm">
|
||||
<select name="document_type" class="w-full rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm" data-document-type-select>
|
||||
{% for item in ['GENERAL','CLIENT_DOCUMENT','WORKING_PAPER','BANK_STATEMENT','TRIAL_BALANCE','LEDGER','GST_RETURN','INCOME_TAX','ROC','AUDIT_REPORT','SIGNED_OUTPUT','ACKNOWLEDGEMENT'] %}<option value="{{ item }}">{{ item|replace('_',' ')|title }}</option>{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
@@ -148,7 +148,7 @@
|
||||
<input name="remarks" class="w-full rounded-xl border border-slate-300 bg-white px-3 py-2 text-sm" placeholder="Optional">
|
||||
</div>
|
||||
<div data-upload-target-note class="rounded-xl border border-indigo-100 bg-indigo-50 px-3 py-2 text-xs text-indigo-700">Tally Data is stored at engagement level and remains separate from task-category evidence.</div>
|
||||
<button class="w-full rounded-xl bg-brand-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-700">Upload Document</button>
|
||||
<button class="w-full rounded-xl bg-brand-600 px-4 py-2.5 text-sm font-semibold text-white hover:bg-brand-700" data-upload-submit>Upload Tally Data</button>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -166,6 +166,9 @@
|
||||
const uploadTargetField = form.querySelector('[data-upload-target-field]');
|
||||
const tallyYearWrap = form.querySelector('[data-tally-year-wrap]');
|
||||
const tallyYear = form.querySelector('[data-tally-year-select]');
|
||||
const documentTypeWrap = form.querySelector('[data-document-type-wrap]');
|
||||
const documentTypeSelect = form.querySelector('[data-document-type-select]');
|
||||
const uploadSubmit = form.querySelector('[data-upload-submit]');
|
||||
const engagementId = form.getAttribute('data-engagement-id');
|
||||
|
||||
const filterExistingDocuments = function () {
|
||||
@@ -192,11 +195,17 @@
|
||||
form.action = '/documents/tasks/' + taskId + '/upload';
|
||||
uploadTargetField.value = 'category';
|
||||
tallyYearWrap.classList.add('hidden');
|
||||
if (documentTypeWrap) documentTypeWrap.classList.remove('hidden');
|
||||
if (documentTypeSelect) documentTypeSelect.disabled = false;
|
||||
if (uploadSubmit) uploadSubmit.textContent = 'Upload Document';
|
||||
note.textContent = 'This file will be linked to the selected category through its existing engagement task, preserving evidence and AQMM behaviour.';
|
||||
} else {
|
||||
form.action = '/documents/engagements/' + engagementId + '/upload';
|
||||
uploadTargetField.value = 'tally';
|
||||
tallyYearWrap.classList.remove('hidden');
|
||||
if (documentTypeWrap) documentTypeWrap.classList.add('hidden');
|
||||
if (documentTypeSelect) documentTypeSelect.disabled = true;
|
||||
if (uploadSubmit) uploadSubmit.textContent = 'Upload Tally Data';
|
||||
note.textContent = 'Tally Data is stored under the selected financial year. Current-year and previous-year datasets remain separate for opening-balance comparison.';
|
||||
}
|
||||
filterExistingDocuments();
|
||||
|
||||
Reference in New Issue
Block a user