This commit is contained in:
@@ -15,7 +15,7 @@ namespace AyaNovaQBI
|
|||||||
|
|
||||||
public string Name { get; set; }
|
public string Name { get; set; }
|
||||||
public bool Active { get; set; }//integration apps should always check if this is true before working or not and give appropriate error if turned off
|
public bool Active { get; set; }//integration apps should always check if this is true before working or not and give appropriate error if turned off
|
||||||
public string IntegrationData { get; set; }//foreign object data store for entire integration, can be used for custom data, unused by any AyaNova add-on's, expect json or xml or some other text value here
|
public string IntegrationData { get; set; } = String.Empty;//foreign object data store for entire integration, can be used for custom data, unused by any AyaNova add-on's, expect json or xml or some other text value here
|
||||||
|
|
||||||
|
|
||||||
public List<IntegrationItem> Items { get; set; } = new List<IntegrationItem>();
|
public List<IntegrationItem> Items { get; set; } = new List<IntegrationItem>();
|
||||||
|
|||||||
@@ -31,6 +31,14 @@ namespace AyaNovaQBI
|
|||||||
}
|
}
|
||||||
Close();
|
Close();
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//check if setup is required
|
||||||
|
if (string.IsNullOrWhiteSpace(util.QBIntegration.IntegrationData) || util.QBIntegration.Items.Count == 0)
|
||||||
|
{
|
||||||
|
MessageBox.Show("STUB: mainform, SETUP is required for qbi, no maps, no integration data set");
|
||||||
|
}
|
||||||
|
}
|
||||||
grid.Visible = true;
|
grid.Visible = true;
|
||||||
|
|
||||||
// grid.DataSource = util.GetInvoiceableItems();
|
// grid.DataSource = util.GetInvoiceableItems();
|
||||||
|
|||||||
@@ -565,13 +565,16 @@ namespace AyaNovaQBI
|
|||||||
await PopulateQBListCache();
|
await PopulateQBListCache();
|
||||||
await PopulateAyaListCache();
|
await PopulateAyaListCache();
|
||||||
|
|
||||||
|
if (string.IsNullOrWhiteSpace(QBIntegration.IntegrationData) || QBIntegration.Items.Count == 0)
|
||||||
|
return true;//all ok, no maps
|
||||||
|
|
||||||
//PFC - Validate settings, create if necessary (Util.ValidateSettings()) and save
|
//PFC - Validate settings, create if necessary (Util.ValidateSettings()) and save
|
||||||
//TODO: if QBIntegration.IntegrationData==null then nothing is set yet and it's fresh so trigger the setup stuff
|
//TODO: if QBIntegration.IntegrationData==null then nothing is set yet and it's fresh so trigger the setup stuff
|
||||||
// but perhaps this should be done / called by mainform as this block and function is strictly related to initialization and caching only
|
// but perhaps this should be done / called by mainform as this block and function is strictly related to initialization and caching only
|
||||||
// and mapping and setup is not really part of that
|
// and mapping and setup is not really part of that
|
||||||
// So, if there are no mappings and integrationData=null just return but if there are then they need to be validated here
|
// So, if there are no mappings and integrationData=null just return but if there are then they need to be validated here
|
||||||
|
|
||||||
next: if QBIntegration.IntegrationData==null then we're done for now let mainform handle initial setup
|
// next: if QBIntegration.IntegrationData==null then we're done for now let mainform handle initial setup
|
||||||
//also if there are no mappings then same thing, let mainform handle setup
|
//also if there are no mappings then same thing, let mainform handle setup
|
||||||
//However, if there *are* integration data or mappings then they need to be validated here
|
//However, if there *are* integration data or mappings then they need to be validated here
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user