fix(cupang): 자동 등록된 센터가 이름 대신 id 로 보이던 문제

센터 이름은 페이지를 열 때 받은 목록(cpg-centers)에서 찾는데,
업로드 도중 자동 등록된 센터는 그 목록에 없어 centerName() 이
id 숫자를 그대로 반환했다. 업로드 응답의 센터를 목록에 합친다.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-07 18:28:18 +09:00
parent 4fce96b438
commit af87f317ab
@@ -537,6 +537,18 @@
}); });
}) })
.then(function (data) { .then(function (data) {
// 업로드 중 자동 등록된 센터는 페이지를 열 때 받은 목록에 없다.
// 합쳐 두지 않으면 센터 이름 대신 id 숫자가 보인다.
(data.groups || []).forEach(function (g) {
(g.centers || []).forEach(function (c) {
if (c.center_id == null) return;
var known = centers.filter(function (x) {
return String(x.id) === String(c.center_id);
}).length > 0;
if (!known) centers.push({ id: c.center_id, name: c.center_name });
});
});
var dateGroups = (data.groups || []).map(function (g) { var dateGroups = (data.groups || []).map(function (g) {
return { return {
ship_date: g.ship_date || "", ship_date: g.ship_date || "",