This commit is contained in:
@@ -771,15 +771,10 @@ namespace AyaNova.PlugIn.V8
|
|||||||
await util.PutAsync("user-option/" + RavenContactId.ToString(), d.ToString());
|
await util.PutAsync("user-option/" + RavenContactId.ToString(), d.ToString());
|
||||||
|
|
||||||
|
|
||||||
|
//###########
|
||||||
//----------------------------------
|
//CUSTOMER NOTES
|
||||||
|
//
|
||||||
}
|
//
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
todo customer note:
|
|
||||||
/* CLIENT NOTE
|
/* CLIENT NOTE
|
||||||
V8
|
V8
|
||||||
### ROUTE [Route("api/v{version:apiVersion}/customer-note")]
|
### ROUTE [Route("api/v{version:apiVersion}/customer-note")]
|
||||||
@@ -799,6 +794,31 @@ namespace AyaNova.PlugIn.V8
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
|
ClientNotes cnl = ClientNotes.GetItems(c.ID);
|
||||||
|
foreach (ClientNote cn in cnl)
|
||||||
|
{
|
||||||
|
tags.Clear();
|
||||||
|
d = new JObject();
|
||||||
|
d.customerId = RavenId;
|
||||||
|
d.userId = SafeGetUserMap(cn.Creator);
|
||||||
|
d.noteDate = util.StringDateToV8(cn.Created, true);
|
||||||
|
d.notes = cn.Notes;
|
||||||
|
Tagit(cn.ClientNoteTypeID, tags);
|
||||||
|
SetTags(d, tags);
|
||||||
|
await util.PostAsync("customer-note", d.ToString());
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//----------------------------------
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
#endregion Clients
|
#endregion Clients
|
||||||
|
|
||||||
#region Headoffices
|
#region Headoffices
|
||||||
|
|||||||
@@ -325,6 +325,38 @@ namespace AyaNova.PlugIn.V8
|
|||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
///////////////////////////////
|
||||||
|
// v7 to v8 Date conversion
|
||||||
|
//
|
||||||
|
//
|
||||||
|
public static string StringDateToV8(string s, bool neverEmpty=false)
|
||||||
|
{
|
||||||
|
if (string.IsNullOrWhiteSpace(s))
|
||||||
|
{
|
||||||
|
if (neverEmpty)
|
||||||
|
{
|
||||||
|
return DateTime.UtcNow.ToString("o");
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return string.Empty;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DateTime result=new DateTime();
|
||||||
|
if (DateTime.TryParse(s, out result))
|
||||||
|
return result.ToUniversalTime().ToString("o");
|
||||||
|
|
||||||
|
//couldn't be parsed
|
||||||
|
if(neverEmpty)
|
||||||
|
return DateTime.UtcNow.ToString("o");
|
||||||
|
return string.Empty;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public enum AyaUiFieldDataType : int
|
public enum AyaUiFieldDataType : int
|
||||||
{
|
{
|
||||||
NoType = 0,
|
NoType = 0,
|
||||||
|
|||||||
Reference in New Issue
Block a user