Console: "Otwórz sprawę" works again, plus what the review of this branch found
- JSON.stringify inside onclick="..." cut the handler short at its first quote, so "Otwórz sprawę" died on a syntax error and no matter could be opened from the console. Older than this branch. All six sites now go through jsArg. - The default rate is checked before saving: "1.500,00" parsed as 1,50 zł. - A pending check is never cut off GET /conflicts: the new badge points at it. - A second matter no longer takes an enquiry off its first. - A rejected 401 opens the sign-in screen, and a quick tab switch cannot replace the page with an error. - Copy that said something untrue: the art. 115 k.c. note, "do przypisania" on a form that also files outgoing post, "w rejestrze" on the AML prompt. - "kierownik" stays in the role's label, Polish plurals on the list counts. - Two operator notes still named Administracja. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
54cceff499
commit
1a70d1b30c
+1
-1
@@ -207,7 +207,7 @@ OTEL_EXPORTER_OTLP_ENDPOINT=http://otel-collector:4317
|
||||
# Port 587 with STARTTLS is the usual shape; for implicit TLS on 465 set
|
||||
# SMTP_STARTTLS=false and SMTP_SSL=true.
|
||||
#
|
||||
# What the message SAYS is set in the console (Administracja → Powiadomienia), not here:
|
||||
# What the message SAYS is set in the console (Ustawienia Sygny → Poczta, integracje i kopie), not here:
|
||||
# it defaults to naming no client, matter or deadline, because mail leaves the firm.
|
||||
SMTP_HOST=
|
||||
SMTP_PORT=587
|
||||
|
||||
@@ -234,11 +234,16 @@ def decide(db: DbSession, check: ConflictCheck, user: AppUser, *,
|
||||
|
||||
|
||||
def recent(db: DbSession, limit: int = 50) -> list[ConflictCheck]:
|
||||
return list(
|
||||
db.scalars(
|
||||
select(ConflictCheck).order_by(ConflictCheck.created_at.desc()).limit(limit)
|
||||
).all()
|
||||
)
|
||||
"""The newest checks, plus every one still pending however old: a pending check blocks a matter
|
||||
and is counted on the dashboard, so it must never fall off the only list it can be decided from."""
|
||||
newest = db.scalars(
|
||||
select(ConflictCheck).order_by(ConflictCheck.created_at.desc()).limit(limit)
|
||||
).all()
|
||||
pending = db.scalars(
|
||||
select(ConflictCheck).where(ConflictCheck.outcome == ConflictOutcome.pending)
|
||||
).all()
|
||||
merged = {c.id: c for c in [*newest, *pending]}
|
||||
return sorted(merged.values(), key=lambda c: c.created_at, reverse=True)
|
||||
|
||||
|
||||
def pending_count(db: DbSession) -> int:
|
||||
|
||||
@@ -64,7 +64,8 @@ def checks_for(db: DbSession, lead: Lead) -> list[ConflictCheck]:
|
||||
|
||||
def mark_won(db: DbSession, lead: Lead, matter_id: uuid.UUID) -> Lead:
|
||||
lead.stage = LeadStage.won
|
||||
lead.matter_id = matter_id
|
||||
if lead.matter_id is None:
|
||||
lead.matter_id = matter_id
|
||||
db.flush()
|
||||
return lead
|
||||
|
||||
|
||||
@@ -93,3 +93,16 @@ def test_a_service_date_is_never_prefilled(console):
|
||||
assert not re.search(r'id="(?:sdDate|dlService)"[^>]*value=', console)
|
||||
assert "if (!$('sdDate').value)" in console
|
||||
assert "if (derived && !$('dlService').value)" in console
|
||||
|
||||
|
||||
def test_no_handler_is_cut_short_by_json_quotes(console):
|
||||
"""JSON.stringify's double quotes end an onclick="..." early, and the click dies on a syntax error.
|
||||
That is how "Otwórz sprawę" came to do nothing: every value goes through jsArg instead."""
|
||||
assert not re.search(r"onclick=[\"'][^`\n]*\$\{JSON\.stringify", console)
|
||||
assert "jsArg(c.subject)" in console
|
||||
|
||||
|
||||
def test_a_typed_rate_is_checked_before_it_is_saved(console):
|
||||
"""Free text must not quietly become a rate: "1.500,00" once parsed as 1,50 zł."""
|
||||
save = _block(console, "async function saveSettings()", "\n}\n")
|
||||
assert save.index("toast('Wpisz stawkę") < save.index("api('PUT', '/admin/settings'")
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
"""Two small rules of the intake path, with no database. The queries themselves run in the integration suite."""
|
||||
from __future__ import annotations
|
||||
|
||||
import datetime as dt
|
||||
import types
|
||||
import uuid
|
||||
|
||||
from app.enums import LeadStage
|
||||
from app.services import conflicts, leads
|
||||
|
||||
|
||||
class _Db:
|
||||
def __init__(self, *results):
|
||||
self._results = list(results)
|
||||
|
||||
def scalars(self, _stmt):
|
||||
rows = self._results.pop(0)
|
||||
return types.SimpleNamespace(all=lambda: rows)
|
||||
|
||||
def flush(self):
|
||||
pass
|
||||
|
||||
|
||||
def _check(hours_ago: int):
|
||||
return types.SimpleNamespace(id=uuid.uuid4(), created_at=dt.datetime(2026, 11, 9) - dt.timedelta(hours=hours_ago))
|
||||
|
||||
|
||||
def test_a_pending_check_older_than_the_newest_stays_on_the_list():
|
||||
fresh, old_pending = _check(1), _check(900)
|
||||
assert conflicts.recent(_Db([fresh], [old_pending])) == [fresh, old_pending]
|
||||
|
||||
|
||||
def test_a_check_in_both_lists_appears_once():
|
||||
both = _check(1)
|
||||
assert conflicts.recent(_Db([both], [both])) == [both]
|
||||
|
||||
|
||||
def test_winning_again_does_not_take_the_enquiry_off_its_first_matter():
|
||||
first, second = uuid.uuid4(), uuid.uuid4()
|
||||
lead = types.SimpleNamespace(stage=None, matter_id=None)
|
||||
leads.mark_won(_Db(), lead, first)
|
||||
leads.mark_won(_Db(), lead, second)
|
||||
assert lead.matter_id == first and lead.stage == LeadStage.won
|
||||
@@ -54,7 +54,7 @@ services:
|
||||
DB_MAX_OVERFLOW: ${DB_MAX_OVERFLOW:-10}
|
||||
# The long-running backend holds no migrator credentials: this empty value overrides the
|
||||
# MIGRATION_DATABASE_URL that env_file loads from .env (migrate keeps it). The console's
|
||||
# restore (Administracja -> Kopie zapasowe) is then refused with a clear message; restore
|
||||
# restore (Ustawienia Sygny -> Poczta, integracje i kopie) is then refused with a clear message; restore
|
||||
# with the one-shot instead:
|
||||
# docker compose -f docker-compose.yml -f docker-compose.managed-db.yml stop backend
|
||||
# docker compose -f docker-compose.yml -f docker-compose.managed-db.yml run --rm migrate \
|
||||
|
||||
+43
-24
@@ -18,6 +18,17 @@ const $ = (id) => document.getElementById(id);
|
||||
const esc = (v) => String(v ?? '').replace(/[&<>"']/g, (c) =>
|
||||
({ '&': '&', '<': '<', '>': '>', '"': '"', "'": ''' }[c]));
|
||||
|
||||
/* A value as a JS argument inside an onclick="...". JSON.stringify's own double quotes end the
|
||||
attribute, so left bare they cut the handler short and the click dies on a syntax error. */
|
||||
const jsArg = (v) => esc(JSON.stringify(v));
|
||||
|
||||
/* "1 sprawa", "3 sprawy", "5 spraw". */
|
||||
function plPlural(n, one, few, many) {
|
||||
const a = Math.abs(n), d = a % 10, t = a % 100;
|
||||
if (a === 1) return one;
|
||||
return d >= 2 && d <= 4 && !(t >= 12 && t <= 14) ? few : many;
|
||||
}
|
||||
|
||||
const state = {
|
||||
token: '', user: null, users: [], containers: [],
|
||||
config: { practice_mode: 'law_firm', bills_clients: true },
|
||||
@@ -51,7 +62,7 @@ async function api(method, path, body) {
|
||||
is how an invoice dialog that never opened went unnoticed. */
|
||||
window.addEventListener('unhandledrejection', (e) => {
|
||||
const x = e.reason;
|
||||
if (x && x.status === 401) return;
|
||||
if (x && x.status === 401) { showLogin(); return; }
|
||||
toast(x && x.status ? x.message : 'Nie udało się wykonać tej operacji.');
|
||||
});
|
||||
|
||||
@@ -556,7 +567,7 @@ async function viewDashboard(C) {
|
||||
const s = await api('GET', '/billing/summary');
|
||||
const box = $('dashMoney');
|
||||
if (box) box.innerHTML = `<div class="card" style="margin-top:14px"><h3>Pieniądze
|
||||
<span class="n">${s.matters} spraw</span></h3>
|
||||
<span class="n">${s.matters} ${plPlural(s.matters, 'sprawa', 'sprawy', 'spraw')}</span></h3>
|
||||
<div class="tiles">
|
||||
<a class="tile" href="#/reports"><div class="k">W toku (WIP)</div><div class="v">${fmtMoney(s.wip_minor)}</div></a>
|
||||
<a class="tile ${s.outstanding_minor ? 'warn' : ''}" href="#/reports"><div class="k">Do zapłaty</div><div class="v">${fmtMoney(s.outstanding_minor)}</div></a>
|
||||
@@ -595,13 +606,13 @@ const FEE_TYPE = {
|
||||
};
|
||||
const DEADLINE_KIND = { procedural: 'procesowy', limitation: 'przedawnienie', hearing: 'rozprawa', contractual: 'umowny', internal: 'wewnętrzny' };
|
||||
const DEADLINE_SOURCE = { statute: 'ustawowy', court: 'sądowy', contract: 'umowny', internal: 'wewnętrzny' };
|
||||
const ROLE_LABEL = { viewer: 'podgląd', editor: 'praca nad sprawą', approver: 'zatwierdzanie', manager: 'zarządzanie dostępem' };
|
||||
const ROLE_LABEL = { viewer: 'podgląd', editor: 'praca nad sprawą', approver: 'zatwierdzanie', manager: 'kierownik (zarządzanie dostępem)' };
|
||||
const LEAD_STAGE = { new: 'nowe', qualifying: 'kwalifikacja', proposal: 'oferta', won: 'wygrane', lost: 'przegrane' };
|
||||
|
||||
async function viewMatters(C, q) {
|
||||
const rows = await api('GET', '/matters?' + new URLSearchParams({ q: q.q || '', ...(q.status ? { status: q.status } : {}) }));
|
||||
setCrumb([{ label: 'Sprawy' }]);
|
||||
C.innerHTML = pageHead('Sprawy', rows.length + ' spraw', `<button class="btn primary" onclick="openConflictCheck()">${svg(ICN.plus)}Nowa sprawa</button>`)
|
||||
C.innerHTML = pageHead('Sprawy', rows.length + ' ' + plPlural(rows.length, 'sprawa', 'sprawy', 'spraw'), `<button class="btn primary" onclick="openConflictCheck()">${svg(ICN.plus)}Nowa sprawa</button>`)
|
||||
+ `<div class="toolbar">
|
||||
<input type="search" id="mq" placeholder="Szukaj po nazwie lub sygnaturze…" value="${esc(q.q || '')}" />
|
||||
<select id="mstatus">${['', 'open', 'suspended', 'closed', 'archived'].map((s) =>
|
||||
@@ -852,7 +863,7 @@ async function renderMatterAccess(el, d) {
|
||||
async function viewParties(C, q) {
|
||||
const rows = await api('GET', '/parties?' + new URLSearchParams({ q: q.q || '' }));
|
||||
setCrumb([{ label: partiesWord() }]);
|
||||
C.innerHTML = pageHead(partiesWord(), rows.length + ' pozycji',
|
||||
C.innerHTML = pageHead(partiesWord(), rows.length + ' ' + plPlural(rows.length, 'pozycja', 'pozycje', 'pozycji'),
|
||||
`<button class="btn primary" onclick="openPartyForm()">${svg(ICN.plus)}${billsClients() ? 'Dodaj klienta lub stronę' : 'Dodaj stronę'}</button>`)
|
||||
+ `<div class="toolbar"><input type="search" id="pq" placeholder="Szukaj po nazwie, NIP lub KRS…" value="${esc(q.q || '')}" /></div>`
|
||||
+ (rows.length ? `<div class="card"><div class="tablewrap"><table><thead><tr>
|
||||
@@ -878,7 +889,7 @@ async function viewParty(C, id) {
|
||||
(p.kind === 'organisation'
|
||||
? `<button class="btn" onclick="enrichParty('${p.id}','krs')">${svg(ICN.search)}Aktualizuj z KRS</button>
|
||||
<button class="btn" onclick="enrichParty('${p.id}','vat')">${svg(ICN.search)}Sprawdź VAT</button>` : '')
|
||||
+ `<button class="btn" onclick="openPartyForm(${JSON.stringify(p).replace(/"/g, '"')})">Edytuj</button>`)
|
||||
+ `<button class="btn" onclick="openPartyForm(${jsArg(p)})">Edytuj</button>`)
|
||||
+ `<div id="enrichOut"></div>`
|
||||
+ `<div class="card"><h3>Dane</h3><div class="grid3">
|
||||
${field('NIP', p.nip)}${field('REGON', p.regon)}${field('KRS', p.krs)}
|
||||
@@ -927,7 +938,7 @@ async function viewIntake(C) {
|
||||
const [leads, checks] = await Promise.all([api('GET', '/leads'), api('GET', '/conflicts')]);
|
||||
const pending = checks.filter((c) => c.outcome === 'pending');
|
||||
setCrumb([{ label: 'Zapytania i konflikty' }]);
|
||||
C.innerHTML = pageHead('Zapytania i konflikty', leads.length + ' zapytań',
|
||||
C.innerHTML = pageHead('Zapytania i konflikty', leads.length + ' ' + plPlural(leads.length, 'zapytanie', 'zapytania', 'zapytań'),
|
||||
`<button class="btn" onclick="openLeadForm()">${svg(ICN.plus)}Nowe zapytanie</button>
|
||||
<button class="btn primary" onclick="openConflictCheck()">${svg(ICN.shield)}Sprawdź konflikt interesów</button>`)
|
||||
+ (pending.length ? `<div class="card"><h3>Konflikty do rozstrzygnięcia<span class="n">${pending.length}</span></h3>
|
||||
@@ -945,7 +956,7 @@ async function viewIntake(C) {
|
||||
<td><span class="chip ${l.stage === 'won' ? 'ok' : (l.stage === 'lost' ? '' : 'warn')}">${esc(LEAD_STAGE[l.stage] || l.stage)}</span></td>
|
||||
<td class="num">${l.matter_id ? `<a class="tiny" href="#/matters/${l.matter_id}">sprawa →</a>` : ''}</td>
|
||||
</tr>`).join('')}</tbody></table></div></div>` : '<div class="empty">Brak zapytań.</div>')
|
||||
+ `<div class="card"><h3>Ostatnie sprawdzenia konfliktu<span class="n">${checks.length > 25 ? '25 z ' + checks.length : checks.length}</span></h3>
|
||||
+ `<div class="card"><h3>Ostatnie sprawdzenia konfliktu<span class="n">${Math.min(checks.length, 25)}</span></h3>
|
||||
${checks.length ? `<div class="tablewrap"><table><thead><tr><th>Podmiot</th><th>Trafienia</th><th>Wynik</th><th>Kiedy</th></tr></thead><tbody>
|
||||
${checks.slice(0, 25).map((c) => `<tr class="click" onclick="openConflictResult('${c.id}')">
|
||||
<td>${esc(c.subject)}</td><td class="num">${c.hit_count}</td>
|
||||
@@ -966,8 +977,8 @@ async function viewLead(C, id) {
|
||||
const usable = d.checks.find((c) => (c.outcome === 'clear' || c.outcome === 'waived') && !c.matter_id);
|
||||
C.innerHTML = pageHead(l.name, LEAD_STAGE[l.stage] || l.stage,
|
||||
l.matter_id ? `<a class="btn" href="#/matters/${l.matter_id}">Przejdź do sprawy</a>`
|
||||
: (usable ? `<button class="btn primary" onclick="openMatterForm('${usable.id}', ${JSON.stringify(l.name)}, '${l.id}')">Otwórz sprawę</button>`
|
||||
: `<button class="btn primary" onclick="openConflictCheck(${JSON.stringify(l.name)}, ${JSON.stringify(l.adverse_names || '')}, '${l.id}')">${svg(ICN.shield)}Sprawdź konflikt interesów</button>`))
|
||||
: (usable ? `<button class="btn primary" onclick="openMatterForm('${usable.id}', ${jsArg(l.name)}, '${l.id}')">Otwórz sprawę</button>`
|
||||
: `<button class="btn primary" onclick="openConflictCheck(${jsArg(l.name)}, ${jsArg(l.adverse_names || '')}, '${l.id}')">${svg(ICN.shield)}Sprawdź konflikt interesów</button>`))
|
||||
+ `<div class="card"><h3>Zapytanie</h3><div class="grid3">
|
||||
${field('Osoba kontaktowa', l.contact_name)}${field('E-mail', l.email)}${field('Telefon', l.phone)}
|
||||
${field('Źródło', l.source)}${field('Dziedzina', l.practice_area)}
|
||||
@@ -1001,7 +1012,7 @@ async function viewInbox(C) {
|
||||
const shown = (list, total) => total > list.length
|
||||
? `${list.length} z ${total}` : String(total);
|
||||
setCrumb([{ label: 'Korespondencja' }]);
|
||||
C.innerHTML = pageHead('Korespondencja', d.items_total + ' nieprzypisanych przesyłek',
|
||||
C.innerHTML = pageHead('Korespondencja', d.items_total + ' ' + plPlural(d.items_total, 'nieprzypisana przesyłka', 'nieprzypisane przesyłki', 'nieprzypisanych przesyłek'),
|
||||
`<button class="btn primary" onclick="openCorrForm()">${svg(ICN.plus)}Zarejestruj przesyłkę</button>`)
|
||||
+ (d.undated_total ? `<div class="card"><h3>Bez ustalonej daty doręczenia<span class="n">${shown(d.undated, d.undated_total)}</span></h3>
|
||||
<div class="banner err">Każda z tych przesyłek to zegar, który być może już biegnie. Dopóki data doręczenia nie jest ustalona, nie ma od czego liczyć terminu.</div>
|
||||
@@ -1081,7 +1092,7 @@ function openCorrForm(matterId) {
|
||||
<label class="field">Data doręczenia<input id="cfDate" type="date" /></label>
|
||||
</div>
|
||||
<label class="field" style="margin-top:12px">Sprawa${matterId ? '' : ' (można przypisać później)'}
|
||||
<select id="cfMatter"><option value="">— bez sprawy (do przypisania) —</option></select></label>
|
||||
<select id="cfMatter"><option value="">— bez sprawy —</option></select></label>
|
||||
<div class="grid2" style="margin-top:12px">
|
||||
<label class="field">Identyfikator zewnętrzny<input id="cfRef" placeholder="np. EPO-2026-08-0001931" /></label>
|
||||
<label class="field">Ścieżka w aktach<input id="cfPath" placeholder="pisma/2026-sprzeciw.pdf" /></label>
|
||||
@@ -1090,7 +1101,7 @@ function openCorrForm(matterId) {
|
||||
`<button class="btn" onclick="closeModal()">Anuluj</button>
|
||||
<button class="btn primary" onclick="submitCorr()">Zarejestruj</button>`,
|
||||
{ wide: true });
|
||||
fillMatterSelect('cfMatter', matterId, '— bez sprawy (do przypisania) —');
|
||||
fillMatterSelect('cfMatter', matterId, '— bez sprawy —');
|
||||
}
|
||||
|
||||
async function fillMatterSelect(selectId, preselect, emptyLabel) {
|
||||
@@ -1556,7 +1567,7 @@ async function renderProfiles(el) {
|
||||
${billsClients() ? `<td class="num">${p.cost_rate_minor ? fmtMoney(p.cost_rate_minor) + '/h' : '<span class="chip warn">brak</span>'}</td>` : ''}
|
||||
<td class="tiny">${esc(p.bar_number || '—')}${p.bar_chamber ? ' · ' + esc(p.bar_chamber) : ''}</td>
|
||||
<td class="tiny">${p.oc_valid_to ? fmtDate(p.oc_valid_to) : '—'}</td>
|
||||
<td class="num"><button class="btn sm" onclick='openProfileForm(${JSON.stringify(p)})'>Edytuj</button></td>
|
||||
<td class="num"><button class="btn sm" onclick="openProfileForm(${jsArg(p)})">Edytuj</button></td>
|
||||
</tr>`).join('')}</tbody></table></div></div>`;
|
||||
}
|
||||
|
||||
@@ -1873,8 +1884,9 @@ async function renderAdminFirm(el) {
|
||||
|
||||
async function renderAdminRates(el) {
|
||||
el.innerHTML = '<div id="adminRates"></div><div id="adminProfiles"></div>';
|
||||
if (billsClients()) await renderRateCards($('adminRates'));
|
||||
await renderProfiles($('adminProfiles'));
|
||||
// Looked up on `el`: a tab switch mid-load has already replaced the document's copy.
|
||||
if (billsClients()) await renderRateCards(el.querySelector('#adminRates'));
|
||||
await renderProfiles(el.querySelector('#adminProfiles'));
|
||||
}
|
||||
|
||||
async function renderAdminSystem(el) {
|
||||
@@ -1887,8 +1899,8 @@ async function renderAdminSystem(el) {
|
||||
<p class="tiny faint">Sprawdzenie łączy się z drugą stroną — dlatego dzieje się tylko po naciśnięciu przycisku, nigdy przy wczytaniu ekranu.</p>
|
||||
</div>
|
||||
<div id="adminBackup"></div>`;
|
||||
await renderEmail($('adminEmail'));
|
||||
await renderBackup($('adminBackup'));
|
||||
await renderEmail(el.querySelector('#adminEmail'));
|
||||
await renderBackup(el.querySelector('#adminBackup'));
|
||||
}
|
||||
|
||||
async function renderAdminUsers(el) {
|
||||
@@ -2160,7 +2172,7 @@ async function addUbo(matterId) {
|
||||
}
|
||||
|
||||
async function saveAml(matterId, replacesCurrent) {
|
||||
if (replacesCurrent && !confirm('Zapisanie od razu zastąpi obecną ocenę nową, niezatwierdzoną. Poprzednia zostanie w rejestrze. Zapisać?')) return;
|
||||
if (replacesCurrent && !confirm('Zapisanie od razu zastąpi obecną ocenę nową, niezatwierdzoną. Poprzednia zostanie zachowana jako zastąpiona. Zapisać?')) return;
|
||||
const factors = [...document.querySelectorAll('.am-f')].filter((x) => x.checked).map((x) => x.value);
|
||||
try {
|
||||
await api('POST', `/matters/${matterId}/aml`, {
|
||||
@@ -2443,11 +2455,18 @@ async function deleteBackup(name) {
|
||||
}
|
||||
|
||||
async function saveSettings() {
|
||||
// A blank box clears the rate. Anything else must read as an amount: "1.500,00" would otherwise
|
||||
// parse as 1,50 zł and apply to new time entries with no warning.
|
||||
const rate = $('setRate').value.trim();
|
||||
if (rate && !(/^\d[\d\s]*([.,]\d{1,2})?$/.test(rate) && zlToMinor(rate) > 0)) {
|
||||
toast('Wpisz stawkę w złotych, np. 450,00.');
|
||||
return;
|
||||
}
|
||||
await api('PUT', '/admin/settings', {
|
||||
values: {
|
||||
firm_name: $('setFirm').value,
|
||||
// Settings values are text. Empty stays empty, so a blank box does not become a rate of zero.
|
||||
default_rate_minor: $('setRate').value.trim() ? String(zlToMinor($('setRate').value) ?? '') : '',
|
||||
// Settings values are text.
|
||||
default_rate_minor: rate ? String(zlToMinor(rate)) : '',
|
||||
deadline_horizon_days: $('setHorizon').value,
|
||||
practice_mode: $('setMode').value,
|
||||
firm_address: $('setAddr').value,
|
||||
@@ -2705,7 +2724,7 @@ async function openConflictResult(checkId, leadId) {
|
||||
(decided
|
||||
? (canOpen
|
||||
? `<button class="btn" onclick="closeModal()">Zamknij</button>
|
||||
<button class="btn primary" onclick="closeModal();openMatterForm('${c.id}', ${JSON.stringify(c.subject)}, '${leadId || ''}')">Otwórz sprawę</button>`
|
||||
<button class="btn primary" onclick="closeModal();openMatterForm('${c.id}', ${jsArg(c.subject)}, '${leadId || ''}')">Otwórz sprawę</button>`
|
||||
: `<button class="btn" onclick="closeModal()">Zamknij</button>`)
|
||||
: `<button class="btn" onclick="closeModal()">Anuluj</button>
|
||||
<button class="btn danger" onclick="decideConflict('${c.id}','declined','${leadId || ''}')">Odmawiamy zlecenia</button>
|
||||
@@ -2742,7 +2761,7 @@ function openMatterForm(checkId, clientName, leadId) {
|
||||
<label class="field">Sygnatura akt<input id="mfSig" /></label>
|
||||
</div>
|
||||
<div class="row" style="margin-top:12px">
|
||||
<button class="btn sm" onclick="openPartyForm({name:${JSON.stringify(clientName || '')}}, 'mfClient')">${svg(ICN.plus)}Nowy klient</button>
|
||||
<button class="btn sm" onclick="openPartyForm({name:${jsArg(clientName || '')}}, 'mfClient')">${svg(ICN.plus)}Nowy klient</button>
|
||||
<span class="faint tiny">Jeśli klienta nie ma jeszcze na liście.</span>
|
||||
</div>`,
|
||||
`<button class="btn" onclick="closeModal()">Anuluj</button>
|
||||
@@ -2959,7 +2978,7 @@ function openDeadline(matterId, derived) {
|
||||
<label class="field">Data doręczenia<input id="dlService" type="date" /></label>
|
||||
<label class="field">Liczba dni<input id="dlDays" type="number" value="14" min="1" /></label>
|
||||
</div>
|
||||
<div class="banner" style="margin-top:12px">Liczone w dniach kalendarzowych, bez dni roboczych i dni wolnych sądu. Jeśli przesyłka jest zarejestrowana, policz termin z zakładki Korespondencja: zostanie z nią powiązany.</div>`
|
||||
<div class="banner" style="margin-top:12px">Liczone w dniach kalendarzowych: soboty, niedziele i święta wliczają się do terminu. Gdy koniec terminu wypada w dzień wolny od pracy lub w sobotę, zapisana data się nie przesuwa, a kalendarz pokazuje, kiedy termin faktycznie upływa (art. 115 k.c.). Jeśli przesyłka jest zarejestrowana, policz termin z zakładki Korespondencja: zostanie z nią powiązany.</div>`
|
||||
: `<label class="field" style="margin-top:12px">Data<input id="dlDue" type="date" value="${todayISO()}" /></label>
|
||||
<label class="field" style="margin-top:12px">Podstawa<input id="dlBasis" placeholder="np. art. 118 k.c. — 3 lata od wymagalności" /></label>`}
|
||||
<label class="field" style="margin-top:12px">Odpowiedzialny<select id="dlOwner">${userOptions(state.user.id)}</select></label>`,
|
||||
|
||||
Reference in New Issue
Block a user