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
+33 -6
View File
@@ -26566,12 +26566,33 @@
const pr = prod.projects.find((p) => p.id === projId);
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();
AutosaveManager.scheduleSave();
if (!pr.deployments) pr.deployments = [];
// جمع‌آوری نیازمندی‌های وابستگی‌ها
const requiredDeployments = [];
const requiredExploits = [];
@@ -26579,14 +26600,20 @@
const depProjectId = sel.dataset.depProject;
const depDeploymentId = sel.value;
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) => {
const expProjectId = sel.dataset.exploitProject;
const expDeploymentId = sel.value;
if (expProjectId && expDeploymentId)
requiredExploits.push({ projectId: expProjectId, deploymentId: expDeploymentId });
requiredExploits.push({
projectId: expProjectId,
deploymentId: expDeploymentId,
});
});
if (this.currentDeploymentMode === "add") {
@@ -26615,9 +26642,9 @@
dep.deploymentDate = deploymentDate;
dep.releaseNotes = releaseNotes;
dep.url = url;
dep.requiredExploits = requiredExploits;
dep.requiredDeployments = requiredDeployments;
showToast(`استقرار ویرایش شد`, "success");
dep.requiredExploits = requiredExploits;
showToast("استقرار ویرایش شد", "success");
}
}
@@ -26625,7 +26652,7 @@
refreshUI();
// 🆕 اگر از مودال جزئیات پروژه آمده باشیم، به آنجا برمی‌گردیم
if (ProjectListManager.returnToProjectDetail) {
if (typeof ProjectListManager !== "undefined" && ProjectListManager.returnToProjectDetail) {
ProjectListManager.restoreProjectDetailModal();
} else {
// در حالت عادی (از داشبورد محصول)، مودال جزئیات محصول را نمایش بده