no message

This commit is contained in:
2025-02-20 00:39:59 +03:00
parent 4e3597ba7a
commit f1440dd1e2
13 changed files with 56 additions and 105 deletions

35
.idea/workspace.xml generated
View File

@@ -7,45 +7,18 @@
</component> </component>
<component name="ChangeListManager"> <component name="ChangeListManager">
<list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment=""> <list default="true" id="e42177c3-2328-4b27-8a01-35779b2beb99" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Json/RecipientJson.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Json/RecipientsJson.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Recipient.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/RecipientsDataSet.java" afterDir="false" />
<change afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/UI/RecipientsForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" /> <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/properties" beforeDir="false" afterPath="$PROJECT_DIR$/properties" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReport.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/BugReport.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/Json/RecipientsJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/Json/RecipientsJson.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/Json/RecipientsJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReport/Json/RecipientsJson.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/BugReportsDatabase.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Json/RecipientJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Json/UserAccountJson.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/ComponentsServer.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/ComponentsServer.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Json/RecipientsJson.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Json/UserAccountsJson.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/CredentialsDatabase.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/CredentialsDatabase.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Recipient.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/Recipient.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/SubscriberWorkspace/UI/SubscriberWorkspacesForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/SubscriberWorkspace/UI/SubscriberWorkspacesForm.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/RecipientsDataSet.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Recipient/RecipientsDataSet.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/Subscriber.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/SubsribersDBTable.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubscriberDialog.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubscriberFields.form" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubscriberFields.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/Subscribes/UI/SubsribersForm.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountDialog.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UI/UserAccountDialog.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccountsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccountsDBTable.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccountsDBTable.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/ComponentsServer/UserAccount/UserAccountsDBTable.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/MainModule.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/MainModule.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AddSubscriber.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/AppendBugReportField.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DeleteSubscriber.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/DeleteSubscriberWorkspace.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/EditAccount.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/EditSubscriber.java" beforeDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishBugReport.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/PublishComponent.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SaveBugReportExecutor.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SaveBugReportExecutor.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SaveBugReportRecipients.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SaveBugReportRecipients.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SynchronizeBugReports.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SynchronizeBugReports.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SynchronizeBugReports.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/SynchronizeBugReports.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/TestPass.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/TestPass.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/All/UpdateBugReportField.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Passes/PassCode.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Interface/CallbackWindow.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Interface/CallbackWindow.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/AdministrationForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/AdministrationForm.java" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.form" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.form" afterDir="false" />
<change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" afterDir="false" /> <change beforePath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" beforeDir="false" afterPath="$PROJECT_DIR$/src/_VisualDVM/Visual/Windows/CallbackForm.java" afterDir="false" />
</list> </list>
<option name="SHOW_DIALOG" value="false" /> <option name="SHOW_DIALOG" value="false" />

View File

@@ -8,6 +8,7 @@ import _VisualDVM.ComponentsServer.BugReport.Json.RecipientJson;
import _VisualDVM.ComponentsServer.BugReport.Json.RecipientsJson; import _VisualDVM.ComponentsServer.BugReport.Json.RecipientsJson;
import _VisualDVM.ComponentsServer.BugReport.Json.VisualiserSettingsJson; import _VisualDVM.ComponentsServer.BugReport.Json.VisualiserSettingsJson;
import _VisualDVM.ComponentsServer.Component.ComponentType; import _VisualDVM.ComponentsServer.Component.ComponentType;
import _VisualDVM.ComponentsServer.Recipient.Recipient;
import _VisualDVM.ComponentsServer.UserAccount.UserAccount; import _VisualDVM.ComponentsServer.UserAccount.UserAccount;
import _VisualDVM.Constants; import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
@@ -155,15 +156,14 @@ public class BugReport extends rDBObject {
} }
//---> //--->
public void CheckSubscribers() { public void CheckRecipients() {
// for (Subscriber subscriber : Global.componentsServer.db.subscribers.Data.values()) for (Recipient recipient : Global.componentsServer.db.recipients.Data.values())
// subscriber.Select(packedRecipientsJson.contains(subscriber.address)); recipient.Select(packedRecipientsJson.contains(recipient.email));
} }
/*
public void saveRecipientsAsJson(Vector<Subscriber> subscribers) { public void saveRecipientsAsJson(Vector<Recipient> recipients) {
packedRecipientsJson = Utils_.gson.toJson(new RecipientsJson(subscribers)); packedRecipientsJson = Utils_.gson.toJson(new RecipientsJson(recipients));
} }
*/
public Vector<String> getRecipients() { public Vector<String> getRecipients() {
Vector<String> res = new Vector<>(); Vector<String> res = new Vector<>();
if (packedRecipientsJson.isEmpty()) return res; if (packedRecipientsJson.isEmpty()) return res;

View File

@@ -1,4 +1,5 @@
package _VisualDVM.ComponentsServer.BugReport.Json; package _VisualDVM.ComponentsServer.BugReport.Json;
import _VisualDVM.ComponentsServer.Recipient.Recipient;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
import java.util.List; import java.util.List;
@@ -9,11 +10,9 @@ public class RecipientsJson {
public RecipientsJson() { public RecipientsJson() {
} }
//при создании пакета. //при создании пакета.
/* public RecipientsJson(Vector<? extends Recipient> recipients) {
public RecipientsJson(Vector<? extends Subscriber> subscribers) {
array = new Vector<>(); array = new Vector<>();
for (Subscriber subscriber : subscribers) for (Recipient recipient : recipients)
array.add(new RecipientJson(subscriber.address)); array.add(new RecipientJson(recipient.email));
} }
*/
} }

View File

@@ -1,11 +1,11 @@
package _VisualDVM.ComponentsServer.Recipient.Json; package _VisualDVM.ComponentsServer.Recipient.Json;
import com.google.gson.annotations.Expose; import com.google.gson.annotations.Expose;
public class RecipientJson { public class UserAccountJson {
@Expose @Expose
public String email; public String email;
@Expose @Expose
public String name; public String name;
public RecipientJson(String email_in, String name_in){ public UserAccountJson(String email_in, String name_in){
email = email_in; email = email_in;
name = name_in; name = name_in;
} }

View File

@@ -3,7 +3,7 @@ import com.google.gson.annotations.Expose;
import java.util.List; import java.util.List;
import java.util.Vector; import java.util.Vector;
public class RecipientsJson { public class UserAccountsJson {
@Expose @Expose
public List<RecipientJson> values = new Vector<>(); public List<UserAccountJson> values = new Vector<>();
} }

View File

@@ -1,6 +1,6 @@
package _VisualDVM.ComponentsServer.Recipient; package _VisualDVM.ComponentsServer.Recipient;
import Common.Database.Objects.DBObject; import Common.Database.Objects.DBObject;
import _VisualDVM.ComponentsServer.Recipient.Json.RecipientJson; import _VisualDVM.ComponentsServer.Recipient.Json.UserAccountJson;
public class Recipient extends DBObject { public class Recipient extends DBObject {
public String email = ""; public String email = "";
public String name = ""; public String name = "";
@@ -17,7 +17,7 @@ public class Recipient extends DBObject {
} }
public Recipient() { public Recipient() {
} }
public Recipient(RecipientJson json) { public Recipient(UserAccountJson json) {
email = json.email; email = json.email;
name = json.name; name = json.name;
} }

View File

@@ -2,22 +2,23 @@ package _VisualDVM.ComponentsServer.Recipient;
import Common.Database.Tables.DataSet; import Common.Database.Tables.DataSet;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.DataSetControlForm; import Common.Visual.DataSetControlForm;
import _VisualDVM.ComponentsServer.Recipient.Json.RecipientJson; import _VisualDVM.ComponentsServer.Recipient.Json.UserAccountJson;
import _VisualDVM.ComponentsServer.Recipient.Json.RecipientsJson; import _VisualDVM.ComponentsServer.Recipient.Json.UserAccountsJson;
import _VisualDVM.ComponentsServer.Recipient.UI.RecipientsForm; import _VisualDVM.ComponentsServer.Recipient.UI.RecipientsForm;
import _VisualDVM.Constants;
import _VisualDVM.Global; import _VisualDVM.Global;
import javax.swing.*; import javax.swing.*;
import java.util.Vector;
public class RecipientsDataSet extends DataSet<String, Recipient> { public class RecipientsDataSet extends DataSet<String, Recipient> {
public RecipientsDataSet() { public RecipientsDataSet() {
super(String.class, Recipient.class); super(String.class, Recipient.class);
} }
public void Unpack(String packed){ public void Unpack(String packed){
System.out.println(Utils_.Brackets(packed));
clear(); clear();
RecipientsJson jsons = Utils_.gson.fromJson(packed, RecipientsJson.class); UserAccountsJson jsons = Utils_.gson.fromJson(packed, UserAccountsJson.class);
for (RecipientJson json: jsons.values){ for (UserAccountJson userAccountJson: jsons.values){
Global.componentsServer.db.recipients.put(json.email, new Recipient(json)); Global.componentsServer.db.recipients.put(userAccountJson.email, new Recipient(userAccountJson));
} }
} }
@Override @Override
@@ -32,4 +33,22 @@ public class RecipientsDataSet extends DataSet<String, Recipient> {
public String getSingleDescription() { public String getSingleDescription() {
return "адресат"; return "адресат";
} }
public Vector<String> getSelectedMails(){
//баг текущий. значит адресаты уже активные и правильные. дополняем их админами и автором.
Vector<String> res = new Vector<>();
for (Recipient recipient:Data.values()){
if (recipient.isSelected()&& !res.contains(recipient.email))
res.add(recipient.email);
}
//--
if (!res.contains(Global.mainModule.getAccount().email))
res.add(Global.mainModule.getAccount().email);
//--
for (String admin_mail : Constants.admins_mails) {
if (!res.contains(admin_mail))
res.add(admin_mail);
}
//--
return res;
}
} }

View File

@@ -6,8 +6,8 @@ import Common.Database.Tables.FKDataBehaviour;
import Common.Database.Tables.iDBTable; import Common.Database.Tables.iDBTable;
import Common.Utils.Utils_; import Common.Utils.Utils_;
import Common.Visual.DataSetControlForm; import Common.Visual.DataSetControlForm;
import _VisualDVM.ComponentsServer.Recipient.Json.RecipientJson; import _VisualDVM.ComponentsServer.Recipient.Json.UserAccountJson;
import _VisualDVM.ComponentsServer.Recipient.Json.RecipientsJson; import _VisualDVM.ComponentsServer.Recipient.Json.UserAccountsJson;
import _VisualDVM.ComponentsServer.SubscriberWorkspace.SubscriberWorkspace; import _VisualDVM.ComponentsServer.SubscriberWorkspace.SubscriberWorkspace;
import _VisualDVM.ComponentsServer.UserAccount.UI.UserAccountsForm; import _VisualDVM.ComponentsServer.UserAccount.UI.UserAccountsForm;
@@ -52,12 +52,12 @@ public class UserAccountsDBTable extends iDBTable<UserAccount> {
return res; return res;
} }
public String getPackedActiveRecipients(){ public String getPackedActiveRecipients(){
RecipientsJson res = new RecipientsJson(); UserAccountsJson res = new UserAccountsJson();
Vector<String> active = new Vector<>(); Vector<String> active = new Vector<>();
for (UserAccount userAccount: Data.values()){ for (UserAccount userAccount: Data.values()){
if ((userAccount.subscribe_active!=0) && !active.contains(userAccount.email)){ if ((userAccount.subscribe_active!=0) && !active.contains(userAccount.email)){
active.add(userAccount.email); active.add(userAccount.email);
res.values.add(new RecipientJson(userAccount.email, userAccount.name)); res.values.add(new UserAccountJson(userAccount.email, userAccount.name));
} }
} }
return Utils_.gson.toJson(res); return Utils_.gson.toJson(res);

View File

@@ -76,11 +76,8 @@ public class AppendBugReportField extends ComponentsServerPass<BugReport> {
message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name), message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name),
message_text message_text
); );
/*
Global.mainModule.getPass(PassCode.Email).Do( Global.mainModule.getPass(PassCode.Email).Do(
message, message,
Global.componentsServer.db.subscribers.checkRecipients(target.getRecipients()) Global.componentsServer.db.recipients.getSelectedMails());
);
*/
} }
} }

View File

@@ -67,12 +67,9 @@ public class PublishBugReport extends Pass<BugReport> {
message.addAttachement(screen); message.addAttachement(screen);
} }
} }
/*
Global.mainModule.getPass(PassCode.Email).Do( Global.mainModule.getPass(PassCode.Email).Do(
message, message,
Global.componentsServer.db.subscribers.checkRecipients(target.getRecipients()) Global.componentsServer.db.recipients.getSelectedMails());
);
*/
} }
@Override @Override
protected void showDone() throws Exception { protected void showDone() throws Exception {

View File

@@ -1,8 +1,4 @@
package _VisualDVM.Passes.All; package _VisualDVM.Passes.All;
import Common.Utils.Utils_;
import _VisualDVM.ComponentsServer.Recipient.Json.RecipientJson;
import _VisualDVM.ComponentsServer.Recipient.Json.RecipientsJson;
import _VisualDVM.ComponentsServer.Recipient.Recipient;
import _VisualDVM.Global; import _VisualDVM.Global;
import _VisualDVM.Passes.Server.ComponentsServerPass; import _VisualDVM.Passes.Server.ComponentsServerPass;
import _VisualDVM.Repository.Server.ServerCode; import _VisualDVM.Repository.Server.ServerCode;

View File

@@ -124,12 +124,9 @@ public class UpdateBugReportField extends ComponentsServerPass<BugReport> {
message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name), message_header + " " + Utils_.Brackets(Global.mainModule.getAccount().name),
message_text message_text
); );
/*
Global.mainModule.getPass(PassCode.Email).Do( Global.mainModule.getPass(PassCode.Email).Do(
message, message,
getServer().db.subscribers.checkRecipients(target.getRecipients()) Global.componentsServer.db.recipients.getSelectedMails());
);
*/
} }
} }
} }

View File

@@ -404,33 +404,6 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
} }
@Override @Override
public void ShowAccount() { public void ShowAccount() {
/*
lAccountName.setText(Utils_.Brackets(Global.mainModule.getAccount().name));
lAccountMail.setText(Utils_.Brackets(Global.mainModule.getAccount().email));
lAccountRole.setText(Utils_.Brackets(Global.mainModule.getAccount().role.getDescription()));
System.out.println("ROLE IS "+Global.mainModule.getAccount().role);
switch (Global.mainModule.getAccount().role) {
case Undefined:
setUdefinedRights();
break;
case User:
//видит только свои баги.
EnableBugreports();
setUserRights();
break;
case Developer:
EnableBugreports();
setDeveloperRights();
break;
case Admin:
EnableBugreports();
setAdminRights();
break;
default:
EnableBugreports();
break;
}
*/
lAccountName.setText(Utils_.Brackets(Global.mainModule.getAccount().name)); lAccountName.setText(Utils_.Brackets(Global.mainModule.getAccount().name));
lAccountMail.setText(Utils_.Brackets(Global.mainModule.getAccount().email)); lAccountMail.setText(Utils_.Brackets(Global.mainModule.getAccount().email));
lAccountRole.setText(Utils_.Brackets(Global.mainModule.getAccount().role.getDescription())); lAccountRole.setText(Utils_.Brackets(Global.mainModule.getAccount().role.getDescription()));
@@ -537,8 +510,8 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
SwitchListeners(false); SwitchListeners(false);
// currentBugReportTabs.setSelectedIndex(0); // currentBugReportTabs.setSelectedIndex(0);
BugReport target = Global.componentsServer.db.bugReports.getUI().getCurrent(); BugReport target = Global.componentsServer.db.bugReports.getUI().getCurrent();
// target.CheckSubscribers(); target.CheckRecipients();
// Global.componentsServer.db.subscribers.ShowUI(); Global.componentsServer.db.recipients.ShowUI();
//- //-
BugReportDescription.setText(target.description); BugReportDescription.setText(target.description);
BugReportDescription.ShowBegin(); BugReportDescription.ShowBegin();
@@ -574,7 +547,7 @@ public class CallbackForm implements FormWithSplitters, CallbackWindow {
@Override @Override
public void ShowNoCurrentBugReport() { public void ShowNoCurrentBugReport() {
SwitchListeners(false); SwitchListeners(false);
// Global.componentsServer.db.subscribers.ShowUI(); Global.componentsServer.db.recipients.ShowUI();
//- //-
BugReportDescription.setText(""); BugReportDescription.setText("");
BugReportComment.setText(""); BugReportComment.setText("");