fix(ct): фиксируем порядок согласующих (order0) в SP при отправке
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -577,6 +577,9 @@ export class CtService {
|
|||||||
for (const m of chain) {
|
for (const m of chain) {
|
||||||
if (!m.spApprovalId) continue;
|
if (!m.spApprovalId) continue;
|
||||||
const status = m.role === "Инициатор" ? "Рекомендую" : "На согласовании";
|
const status = m.role === "Инициатор" ? "Рекомендую" : "На согласовании";
|
||||||
|
// Пишем order0 = позиция участника у инициатора. Удаление/добавление согласующих
|
||||||
|
// пересчитывает порядок только локально; здесь фиксируем его в SP, иначе согласующий
|
||||||
|
// при свежей загрузке (сортировка по order0) увидит другой порядок и не ту очередь.
|
||||||
const res = await this.http.fetch(
|
const res = await this.http.fetch(
|
||||||
this._liById(LISTS.APPROVAL_CHAIN, m.spApprovalId),
|
this._liById(LISTS.APPROVAL_CHAIN, m.spApprovalId),
|
||||||
SPHttpClient.configurations.v1,
|
SPHttpClient.configurations.v1,
|
||||||
@@ -587,7 +590,7 @@ export class CtService {
|
|||||||
"IF-MATCH": "*",
|
"IF-MATCH": "*",
|
||||||
"X-HTTP-Method": "MERGE",
|
"X-HTTP-Method": "MERGE",
|
||||||
},
|
},
|
||||||
body: JSON.stringify({ status }),
|
body: JSON.stringify({ status, order0: m.order, Title: String(m.order) }),
|
||||||
},
|
},
|
||||||
);
|
);
|
||||||
if (!res.ok)
|
if (!res.ok)
|
||||||
|
|||||||
Reference in New Issue
Block a user