This commit is contained in:
2026-09-27 15:21:58 +03:30
parent 48ff6a912e
commit 671e491cd9
4 changed files with 6420 additions and 6 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
File diff suppressed because it is too large Load Diff
+33 -6
View File
@@ -26566,12 +26566,33 @@
const pr = prod.projects.find((p) => p.id === projId); const pr = prod.projects.find((p) => p.id === projId);
if (!pr) return; if (!pr) return;
// ... کد موجود (دریافت مقادیر و اعتبارسنجی) // 🆕 تعریف متغیرها (این بخش در نسخه قبلی حذف شده بود)
const version = document.getElementById("depVersion").value.trim();
const date = document.getElementById("depDate").value;
const releaseNotes = document.getElementById("depReleaseNotes").value.trim();
const url = document.getElementById("depUrl").value.trim();
// اعتبارسنجی‌ها
if (!version) {
showToast("نسخه الزامی است", "error");
return;
}
if (!date) {
showToast("تاریخ استقرار الزامی است", "error");
return;
}
if (!releaseNotes) {
showToast("ریلیز نوت الزامی است", "error");
return;
}
const deploymentDate = new Date(date).toISOString();
HistoryManager.pushState(); HistoryManager.pushState();
AutosaveManager.scheduleSave(); AutosaveManager.scheduleSave();
if (!pr.deployments) pr.deployments = []; if (!pr.deployments) pr.deployments = [];
// جمع‌آوری نیازمندی‌های وابستگی‌ها
const requiredDeployments = []; const requiredDeployments = [];
const requiredExploits = []; const requiredExploits = [];
@@ -26579,14 +26600,20 @@
const depProjectId = sel.dataset.depProject; const depProjectId = sel.dataset.depProject;
const depDeploymentId = sel.value; const depDeploymentId = sel.value;
if (depProjectId && depDeploymentId) if (depProjectId && depDeploymentId)
requiredDeployments.push({ projectId: depProjectId, deploymentId: depDeploymentId }); requiredDeployments.push({
projectId: depProjectId,
deploymentId: depDeploymentId,
});
}); });
document.querySelectorAll('.req-deployment-select[data-dep-type="exploit"]').forEach((sel) => { document.querySelectorAll('.req-deployment-select[data-dep-type="exploit"]').forEach((sel) => {
const expProjectId = sel.dataset.exploitProject; const expProjectId = sel.dataset.exploitProject;
const expDeploymentId = sel.value; const expDeploymentId = sel.value;
if (expProjectId && expDeploymentId) if (expProjectId && expDeploymentId)
requiredExploits.push({ projectId: expProjectId, deploymentId: expDeploymentId }); requiredExploits.push({
projectId: expProjectId,
deploymentId: expDeploymentId,
});
}); });
if (this.currentDeploymentMode === "add") { if (this.currentDeploymentMode === "add") {
@@ -26615,9 +26642,9 @@
dep.deploymentDate = deploymentDate; dep.deploymentDate = deploymentDate;
dep.releaseNotes = releaseNotes; dep.releaseNotes = releaseNotes;
dep.url = url; dep.url = url;
dep.requiredExploits = requiredExploits;
dep.requiredDeployments = requiredDeployments; dep.requiredDeployments = requiredDeployments;
showToast(`استقرار ویرایش شد`, "success"); dep.requiredExploits = requiredExploits;
showToast("استقرار ویرایش شد", "success");
} }
} }
@@ -26625,7 +26652,7 @@
refreshUI(); refreshUI();
// 🆕 اگر از مودال جزئیات پروژه آمده باشیم، به آنجا برمی‌گردیم // 🆕 اگر از مودال جزئیات پروژه آمده باشیم، به آنجا برمی‌گردیم
if (ProjectListManager.returnToProjectDetail) { if (typeof ProjectListManager !== "undefined" && ProjectListManager.returnToProjectDetail) {
ProjectListManager.restoreProjectDetailModal(); ProjectListManager.restoreProjectDetailModal();
} else { } else {
// در حالت عادی (از داشبورد محصول)، مودال جزئیات محصول را نمایش بده // در حالت عادی (از داشبورد محصول)، مودال جزئیات محصول را نمایش بده