сохранение адресатов и исполнителя.восстановление

This commit is contained in:
2025-02-20 00:49:30 +03:00
parent f1440dd1e2
commit b445e3e879
5 changed files with 15 additions and 21 deletions

View File

@@ -9,7 +9,6 @@ public class RecipientsJson {
public List<RecipientJson> array = new Vector<>();
public RecipientsJson() {
}
//при создании пакета.
public RecipientsJson(Vector<? extends Recipient> recipients) {
array = new Vector<>();
for (Recipient recipient : recipients)

View File

@@ -1,9 +1,11 @@
package _VisualDVM.ComponentsServer.Recipient.UI;
import Common.Database.Tables.DataSet;
import Common.Visual.DataSetControlForm;
import Common.Visual.Menus.DataMenuBar;
import Common.Visual.Tables.ColumnInfo;
import _VisualDVM.ComponentsServer.Recipient.Recipient;
import _VisualDVM.ComponentsServer.UserAccount.UserAccount;
import _VisualDVM.Passes.PassCode;
import javax.swing.*;
public class RecipientsForm extends DataSetControlForm<Recipient> {
@@ -21,4 +23,8 @@ public class RecipientsForm extends DataSetControlForm<Recipient> {
}
);
}
@Override
protected DataMenuBar createMenuBar() {
return new DataMenuBar(dataSource.getPluralDescription(), PassCode.SaveBugReportExecutor,PassCode.SaveBugReportRecipients);
}
}

View File

@@ -11,12 +11,9 @@ public class SaveBugReportExecutor extends UpdateBugReportField {
}
@Override
protected boolean canStart(Object... args) throws Exception {
return false;
/*
return Global.componentsServer.db.subscribers.getUI().CheckCurrent(Log) &&
super.canStart("executor", Global.componentsServer.db.subscribers.getUI().getCurrent().name,
"executor_address", Global.componentsServer.db.subscribers.getUI().getCurrent().address
return Global.componentsServer.db.recipients.getUI().CheckCurrent(Log) &&
super.canStart("executor", Global.componentsServer.db.recipients.getUI().getCurrent().name,
"executor_address", Global.componentsServer.db.recipients.getUI().getCurrent().email
);
*/
}
}

View File

@@ -13,7 +13,8 @@ public class SaveBugReportRecipients extends UpdateBugReportField {
}
@Override
protected boolean canStart(Object... args) throws Exception {
//return super.canStart("packedRecipientsJson", Utils_.gson.toJson(new RecipientsJson(Global.componentsServer.db.subscribers.getUI().getSelectedItems())));
return false;
return super.canStart("packedRecipientsJson",
Utils_.gson.toJson(new RecipientsJson(Global.componentsServer.db.recipients.getUI().getSelectedItems())));
}
}