WIP - admin office front end
This commit is contained in:
parent
bd3d62f029
commit
be52137c15
11 changed files with 51 additions and 35 deletions
|
@ -1,4 +1,6 @@
|
|||
|
||||
.pictogram {
|
||||
max-width: 30px;
|
||||
}
|
||||
.color-code {
|
||||
max-width: 40px;
|
||||
max-width: 30px;
|
||||
}
|
|
@ -1,4 +1,6 @@
|
|||
|
||||
.pictogram {
|
||||
max-width: 30px;
|
||||
}
|
||||
.color-code {
|
||||
max-width: 40px;
|
||||
max-width: 30px;
|
||||
}
|
|
@ -66,5 +66,5 @@ public interface IAdvisorCustomerHistoryRepository
|
|||
/// <param name="companyId"></param>
|
||||
/// <param name="syncDate"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> ErpInvoiceToCrmRpc(string companyId, string syncDate);
|
||||
Task<string> InvoiceErpToCrmRpc(string companyId, string syncDate);
|
||||
}
|
|
@ -66,5 +66,5 @@ public interface ICountryCustomerHistoryRepository
|
|||
/// <param name="companyId"></param>
|
||||
/// <param name="syncDate"></param>
|
||||
/// <returns></returns>
|
||||
Task<string> ErpInvoiceToCrmRpc(string countryCode, string companyId, string syncDate);
|
||||
Task<string> InvoiceErpToCrmRpc(string countryCode, string companyId, string syncDate);
|
||||
}
|
|
@ -128,9 +128,9 @@ public class AdvisorCustomerHistoryRepository : IAdvisorCustomerHistoryRepositor
|
|||
/// <param name="companyId"></param>
|
||||
/// <param name="syncDate"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> ErpInvoiceToCrmRpc(string companyId, string syncDate)
|
||||
public async Task<string> InvoiceErpToCrmRpc(string companyId, string syncDate)
|
||||
{
|
||||
var x = await _client.GetAsync($"{_api.CrmCustomers}/{companyId}/{_api.CrmRpcSyncExt}/{syncDate}");
|
||||
var x = await _client.GetAsync($"{_api.SyncRpc}/companies/{companyId}/{_api.SyncRpcInvoiceExt}/{syncDate}");
|
||||
if (!x.IsSuccessStatusCode)
|
||||
return string.Empty;
|
||||
var content = await x.Content.ReadAsStringAsync();
|
||||
|
|
|
@ -134,9 +134,9 @@ public class CountryCustomerHistoryRepository : ICountryCustomerHistoryRepositor
|
|||
/// <param name="companyId"></param>
|
||||
/// <param name="syncDate"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<string> ErpInvoiceToCrmRpc(string countryCode, string companyId, string syncDate)
|
||||
public async Task<string> InvoiceErpToCrmRpc(string countryCode, string companyId, string syncDate)
|
||||
{
|
||||
var x = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/{_api.CrmRpcSyncExt}/{syncDate}");
|
||||
var x = await _client.GetAsync($"{_api.OfficeCustomers}/{countryCode}/{companyId}/{_api.SyncRpcInvoiceExt}/{syncDate}");
|
||||
if (!x.IsSuccessStatusCode)
|
||||
return string.Empty;
|
||||
var content = await x.Content.ReadAsStringAsync();
|
||||
|
|
|
@ -182,7 +182,7 @@ public partial class AdvisorCreateActivityPage : IDisposable
|
|||
// product inventory has not been updated
|
||||
// send rpc call to sync ERP to CRM
|
||||
Toast.ShowInfo("Vent mens data synkroniseres ...", "ERP til CRM ...");
|
||||
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, _company.HistorySync);
|
||||
var ts = await HistoryRepo.InvoiceErpToCrmRpc(CompanyId, _company.HistorySync);
|
||||
while (string.IsNullOrWhiteSpace(ts))
|
||||
await Task.Delay(500);
|
||||
// save pDate
|
||||
|
|
|
@ -139,7 +139,7 @@ public partial class AdvisorCustomerViewPage : IDisposable
|
|||
|
||||
await FetchContacts(CompanyId);
|
||||
|
||||
var ts = await HistoryRepo.ErpInvoiceToCrmRpc(CompanyId, Company.HistorySync);
|
||||
var ts = await HistoryRepo.InvoiceErpToCrmRpc(CompanyId, Company.HistorySync);
|
||||
|
||||
// remove loading image
|
||||
Working = false;
|
||||
|
|
|
@ -70,7 +70,7 @@ public partial class CountryCreateNewOrderPage : IDisposable
|
|||
var today = $"{DateTime.Now:yyyy-MM-dd}";
|
||||
var ts = _company.HistorySync;
|
||||
if (ts != today)
|
||||
ts = await InventoryRepo.ErpInvoiceToCrmRpc(CountryCode, CompanyId, ts);
|
||||
ts = await InventoryRepo.InvoiceErpToCrmRpc(CountryCode, CompanyId, ts);
|
||||
while (ts != today)
|
||||
await Task.Delay(500);
|
||||
// raise flag if report is closed
|
||||
|
|
|
@ -7,16 +7,16 @@
|
|||
"image": "grumpy-coder.png"
|
||||
},
|
||||
"apiConfig": {
|
||||
"baseUrl": "https://zeta.innotec.dk",
|
||||
"baseUrl": "https://eta.innotec.dk",
|
||||
"catalog": "api/v2/catalog",
|
||||
"crmCustomers": "api/v2/crm/companies",
|
||||
"crmInventoryExt": "history/inventory",
|
||||
"crmProductExt": "history/products",
|
||||
"crmReports": "api/v2/crm/advisors/reports",
|
||||
"crmActivities": "api/v2/crm/advisors/activities",
|
||||
"crmRpcSyncExt": "invoices/rpc",
|
||||
"crmTasks": "api/v2/crm/advisors/tasks",
|
||||
"crmWorkplaceExt": "workplaces",
|
||||
"officeBase": "api/v2/office",
|
||||
"officeAdvisors": "api/v2/office/users/advisors",
|
||||
"officeCustomers": "api/v2/office/customers",
|
||||
"officeReports": "api/v2/office/reports",
|
||||
|
@ -29,6 +29,8 @@
|
|||
"serviceVatEu": "api/v2/services/vies",
|
||||
"servicesVatNo": "api/v2/services/brReg",
|
||||
"servicesAuth": "token",
|
||||
"syncRpc": "api/v2/rpc",
|
||||
"syncRpcInvoiceExt": "invoices/rpc",
|
||||
"userInfo": "api/auth/userinfo",
|
||||
"warehouse": "api/v2/warehouse/packages"
|
||||
},
|
||||
|
|
|
@ -12,6 +12,7 @@
|
|||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see [https://www.gnu.org/licenses/agpl-3.0.en.html]
|
||||
//
|
||||
|
||||
namespace Wonky.Entity.Configuration;
|
||||
|
||||
public class ApiConfig
|
||||
|
@ -20,7 +21,7 @@ public class ApiConfig
|
|||
/// Application base url
|
||||
/// </summary>
|
||||
public string BaseUrl { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for product catalog request
|
||||
/// </summary>
|
||||
|
@ -45,37 +46,37 @@ public class ApiConfig
|
|||
/// Application uri for customer information request
|
||||
/// </summary>
|
||||
public string CrmCustomers { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for customer product inventory request
|
||||
/// </summary>
|
||||
public string CrmInventoryExt { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for customer product sale request
|
||||
/// </summary>
|
||||
public string CrmProductExt { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for updating customer product sale request
|
||||
/// </summary>
|
||||
public string CrmRpcSyncExt { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for getting workplace(s)
|
||||
/// </summary>
|
||||
public string CrmWorkplaceExt { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Office base url
|
||||
/// </summary>
|
||||
public string OfficeBase { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for administration of sales representatives
|
||||
/// </summary>
|
||||
public string OfficeAdvisors { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for administration of administrative users
|
||||
/// </summary>
|
||||
public string OfficeUsers { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for administrative reset of user credentials
|
||||
/// </summary>
|
||||
|
@ -95,45 +96,54 @@ public class ApiConfig
|
|||
/// Application uri for token request
|
||||
/// </summary>
|
||||
public string ServicesAuth { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GLS tracking url
|
||||
/// </summary>
|
||||
public string ServicesGlsTrackUrl { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// GLS customer entity
|
||||
/// </summary>
|
||||
public string ServicesGlsId { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// url for sending mail message
|
||||
/// </summary>
|
||||
public string ServicesMail { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// VAT registrar url Denmark
|
||||
/// </summary>
|
||||
public string ServicesVatDk { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// VAT registrar url Norway
|
||||
/// </summary>
|
||||
public string ServicesVatNo { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// VAT registrar url EU
|
||||
/// </summary>
|
||||
public string ServicesVatEu { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Base sync url
|
||||
/// </summary>
|
||||
public string SyncRpc { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for updating customer product sale request
|
||||
/// </summary>
|
||||
public string SyncRpcInvoiceExt { get; set; } = "";
|
||||
|
||||
/// <summary>
|
||||
/// Application uri for user information request
|
||||
/// </summary>
|
||||
public string UserInfo { get; set; } = "";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Uri for warehouse requests
|
||||
/// </summary>
|
||||
public string Warehouse { get; set; } = "";
|
||||
|
||||
}
|
Loading…
Reference in a new issue