hair cut message
This commit is contained in:
parent
29a2d2d66e
commit
33d4dd0b87
1 changed files with 17 additions and 12 deletions
|
|
@ -38,29 +38,34 @@ namespace Yavsc.Helpers
|
||||||
public static HairCutQueryEvent CreateEvent(this HairCutQuery query,
|
public static HairCutQueryEvent CreateEvent(this HairCutQuery query,
|
||||||
IStringLocalizer SR, BrusherProfile bpr)
|
IStringLocalizer SR, BrusherProfile bpr)
|
||||||
{
|
{
|
||||||
string head = SR["HaircutRdvQuery"];
|
|
||||||
string evdate = query.EventDate?.ToString("dddd dd/MM/yyyy à HH:mm")??"[pas de date spécifiée]";
|
string evdate = query.EventDate?.ToString("dddd dd/MM/yyyy à HH:mm")??"[pas de date spécifiée]";
|
||||||
string address = query.Location?.Address??"[pas de lieu spécifié]";
|
string address = query.Location?.Address??"[pas de lieu spécifié]";
|
||||||
var p = query.Prestation;
|
var p = query.Prestation;
|
||||||
string total = query.GetBillItems().Addition().ToString("C",CultureInfo.CurrentUICulture);
|
string total = query.GetBillItems().Addition().ToString("C",CultureInfo.CurrentUICulture);
|
||||||
string strprestation = query.Description;
|
string strprestation = query.GetDescription();
|
||||||
string bill = string.Join("\n", query.GetBillItems().Select(
|
string bill = string.Join("\n", query.GetBillItems().Select(
|
||||||
l=> $"{l.Name} {l.Description} {l.UnitaryCost} {l.Count}"));
|
l=> $"{l.Name} {l.Description} {l.UnitaryCost} € " +
|
||||||
|
((l.Count != 1) ? "*"+l.Count.ToString() : "")));
|
||||||
var yaev = new HairCutQueryEvent
|
var yaev = new HairCutQueryEvent
|
||||||
{
|
{
|
||||||
Sender = query.Client.UserName,
|
Sender = $"{strprestation} pour {query.Client.UserName}",
|
||||||
Message = $@"{head} pour {query.Client.UserName},
|
Message =
|
||||||
Date: {evdate},
|
$@"Un client vient de valider une demande de prestation à votre encontre:
|
||||||
Adresse: {address}
|
|
||||||
|
Prestation: {strprestation}
|
||||||
|
Client : {query.Client.UserName}
|
||||||
|
Date: {evdate},
|
||||||
|
Adresse: {address}
|
||||||
|
|
||||||
-----
|
-----
|
||||||
{strprestation}:
|
{query.AdditionalInfo}
|
||||||
|
|
||||||
|
Facture prévue (non réglée):
|
||||||
|
|
||||||
{bill}
|
{bill}
|
||||||
|
|
||||||
{total}
|
Total: {total}
|
||||||
--
|
|
||||||
{query.AdditionalInfo}
|
|
||||||
" ,
|
" ,
|
||||||
Client = new ClientProviderInfo {
|
Client = new ClientProviderInfo {
|
||||||
UserName = query.Client.UserName ,
|
UserName = query.Client.UserName ,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue