diff --git a/Yavsc.Abstract/Billing/BillingCodes.cs b/Yavsc.Abstract/Billing/BillingCodes.cs new file mode 100644 index 00000000..9ede8cf6 --- /dev/null +++ b/Yavsc.Abstract/Billing/BillingCodes.cs @@ -0,0 +1,10 @@ +namespace Yavsc.Models.Billing +{ + public static class BillingCodes + { + public const string Rdv = "Rdv"; + public const string MBrush = "MBrush"; + + public const string Brush = "Brush"; + } +} \ No newline at end of file diff --git a/Yavsc.Abstract/Billing/IBillable.cs b/Yavsc.Abstract/Billing/IBillable.cs index 069d7a5d..6da26bb8 100644 --- a/Yavsc.Abstract/Billing/IBillable.cs +++ b/Yavsc.Abstract/Billing/IBillable.cs @@ -4,6 +4,7 @@ using System.Collections.Generic; namespace Yavsc.Billing { public interface IBillable { + string BillingCode { get; set; } string GetDescription (); List GetBillItems(); long Id { get; set; } diff --git a/Yavsc/Models/Messaging/ClientProviderInfo.cs b/Yavsc.Abstract/Identity/ClientProviderInfo.cs similarity index 77% rename from Yavsc/Models/Messaging/ClientProviderInfo.cs rename to Yavsc.Abstract/Identity/ClientProviderInfo.cs index 19b206a6..0733b196 100644 --- a/Yavsc/Models/Messaging/ClientProviderInfo.cs +++ b/Yavsc.Abstract/Identity/ClientProviderInfo.cs @@ -2,15 +2,13 @@ using System.ComponentModel.DataAnnotations; namespace Yavsc.Models.Messaging { - using Models.Relationship; public class ClientProviderInfo { public string UserName { get; set; } public string Avatar { get; set; } - [Key] public string UserId { get; set; } public string EMail { get; set; } public string Phone { get; set; } - public Location BillingAddress { get; set; } + public ILocation BillingAddress { get; set; } } } diff --git a/Yavsc.Abstract/Makefile b/Yavsc.Abstract/Makefile index 72f14d69..fdb9bffb 100644 --- a/Yavsc.Abstract/Makefile +++ b/Yavsc.Abstract/Makefile @@ -1,5 +1,5 @@ CONFIG=Release -VERSION=1.0.5-rc5 +VERSION=1.0.5-rc6 PRJNAME=Yavsc.Abstract PKGFILENAME=$(PRJNAME).$(VERSION).nupkg DESTPATH=. diff --git a/Yavsc/Models/Messaging/RdvQueryProviderInfo.cs b/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs similarity index 80% rename from Yavsc/Models/Messaging/RdvQueryProviderInfo.cs rename to Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs index 123bbf13..3e25c991 100644 --- a/Yavsc/Models/Messaging/RdvQueryProviderInfo.cs +++ b/Yavsc.Abstract/Messaging/RdvQueryProviderInfo.cs @@ -3,12 +3,11 @@ using System; namespace Yavsc.Models { using Models.Messaging; - using Models.Relationship; public class RdvQueryProviderInfo { public ClientProviderInfo Client { get; set; } - public Location Location { get; set; } + public ILocation Location { get; set; } public long Id { get; set; } @@ -18,6 +17,7 @@ namespace Yavsc.Models public string Reason { get; set; } public string ActivityCode { get; set; } + public string BillingCode { get; set; } } } diff --git a/Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc6.nupkg b/Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc6.nupkg new file mode 100644 index 00000000..6aef7a9a Binary files /dev/null and b/Yavsc.Abstract/Yavsc.Abstract.1.0.5-rc6.nupkg differ diff --git a/Yavsc/ApiControllers/BookQueryApiController.cs b/Yavsc/ApiControllers/BookQueryApiController.cs index 18378a40..911ca49c 100644 --- a/Yavsc/ApiControllers/BookQueryApiController.cs +++ b/Yavsc/ApiControllers/BookQueryApiController.cs @@ -53,7 +53,8 @@ namespace Yavsc.Controllers Id = c.Id, Previsional = c.Previsional, Reason = c.Reason, - ActivityCode = c.ActivityCode + ActivityCode = c.ActivityCode, + BillingCode = c.BillingCode }). OrderBy(c=>c.Id). Take(25); diff --git a/Yavsc/ApiControllers/FrontOfficeApiController.cs b/Yavsc/ApiControllers/FrontOfficeApiController.cs index 94244ef1..3c70362f 100644 --- a/Yavsc/ApiControllers/FrontOfficeApiController.cs +++ b/Yavsc/ApiControllers/FrontOfficeApiController.cs @@ -15,7 +15,7 @@ namespace Yavsc.ApiControllers dbContext = context; } - [HttpGet,Route("Profiles/{actCode}")] + [HttpGet,Route("profiles/{actCode}")] IEnumerable Profiles (string actCode) { return dbContext.ListPerformers(actCode); diff --git a/Yavsc/Controllers/CommandController.cs b/Yavsc/Controllers/CommandController.cs index d8d20c7a..f807438e 100644 --- a/Yavsc/Controllers/CommandController.cs +++ b/Yavsc/Controllers/CommandController.cs @@ -91,7 +91,7 @@ namespace Yavsc.Controllers /// /// /// - public IActionResult Create(string id, string activityCode) + public IActionResult Create(string id, string activityCode, string billingCode) { if (string.IsNullOrWhiteSpace(id)) throw new InvalidOperationException( @@ -117,7 +117,8 @@ namespace Yavsc.Controllers PerformerId = pro.PerformerId, ClientId = userid, Client = user, - ActivityCode = activityCode + ActivityCode = activityCode, + BillingCode = billingCode }); } @@ -126,7 +127,7 @@ namespace Yavsc.Controllers [ValidateAntiForgeryToken] public async Task Create(RdvQuery command) { - + // TODO validate BillingCode value var uid = User.GetUserId(); var prid = command.PerformerId; if (string.IsNullOrWhiteSpace(uid) diff --git a/Yavsc/Helpers/EventHelpers.cs b/Yavsc/Helpers/EventHelpers.cs index ccc36795..07f091b5 100644 --- a/Yavsc/Helpers/EventHelpers.cs +++ b/Yavsc/Helpers/EventHelpers.cs @@ -24,7 +24,8 @@ namespace Yavsc.Helpers EventDate = query.EventDate, Location = query.Location, Id = query.Id, - ActivityCode = query.ActivityCode + ActivityCode = query.ActivityCode, + BillingCode = query.BillingCode }; return yaev; @@ -65,7 +66,8 @@ namespace Yavsc.Helpers Location = query.Location, Id = query.Id, Reason = "Commande groupée!", - ActivityCode = query.ActivityCode + ActivityCode = query.ActivityCode, + BillingCode = query.BillingCode }; return yaev; } diff --git a/Yavsc/Makefile b/Yavsc/Makefile index ff2151b0..459f1650 100644 --- a/Yavsc/Makefile +++ b/Yavsc/Makefile @@ -5,9 +5,14 @@ CONFIGURATION=Release ASPNET_LOG_LEVEL=info #warn HOSTING=localhost HOSTADMIN=root +FRMWRK=dnx451 +BINTARGET=Yavsc.dll +BINTARGETPATH=bin/$(CONFIGURATION)/$(FRMWRK)/$(BINTARGET) +all: $(BINTARGETPATH) -all: bin/$(CONFIGURATION) +$(BINTARGETPATH): + dnu build deploy: clean pushInPre pushInProd diff --git a/Yavsc/Models/Billing/NominativeServiceCommand.cs b/Yavsc/Models/Billing/NominativeServiceCommand.cs index 112f041e..6d772ea4 100644 --- a/Yavsc/Models/Billing/NominativeServiceCommand.cs +++ b/Yavsc/Models/Billing/NominativeServiceCommand.cs @@ -97,5 +97,10 @@ namespace Yavsc.Models.Billing [ForeignKey("PaymentId"), Display(Name = "Acquittement de la facture")] public virtual PayPalPayment Regularisation { get; set; } + [Required] + public string BillingCode + { + get; set; + } } } diff --git a/Yavsc/Services/MessageServices.cs b/Yavsc/Services/MessageServices.cs index 088a721e..7b68de2a 100755 --- a/Yavsc/Services/MessageServices.cs +++ b/Yavsc/Services/MessageServices.cs @@ -46,12 +46,6 @@ namespace Yavsc.Services throw new NotImplementedException("No GCM reg ids"); var msg = new MessageWithPayload() { - notification = new Notification() - { - title = ev.Topic+" "+ev.Sender, - body = ev.CreateBody(), - icon = "icon" - }, data = ev, registration_ids = regids.ToArray() }; diff --git a/Yavsc/Startup/Startup.Workflow.cs b/Yavsc/Startup/Startup.Workflow.cs index 68208498..351e7889 100644 --- a/Yavsc/Startup/Startup.Workflow.cs +++ b/Yavsc/Startup/Startup.Workflow.cs @@ -10,6 +10,7 @@ namespace Yavsc using Microsoft.Data.Entity; using Models; using Yavsc.Billing; + using Yavsc.Models.Billing; using Yavsc.Models.Haircut; using Yavsc.Models.Workflow; @@ -76,7 +77,7 @@ mais n'implemente pas l'interface IQueryable } } - RegisterBilling("Brush", new Func + RegisterBilling(BillingCodes.Brush, new Func ( ( db, id) => { var query = db.HairCutQueries.Include(q=>q.Prestation).Include(q=>q.Regularisation).Single(q=>q.Id == id) ; @@ -84,9 +85,9 @@ mais n'implemente pas l'interface IQueryable return query; })) ; - RegisterBilling("MBrush",new Func + RegisterBilling(BillingCodes.MBrush,new Func ( (db, id) => db.HairMultiCutQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id))); - RegisterBilling("Rdv", new Func + RegisterBilling(BillingCodes.Rdv, new Func ( (db, id) => db.RdvQueries.Include(q=>q.Regularisation).Single(q=>q.Id == id))); } public static System.Reflection.Assembly OnYavscResourceResolve(object sender, ResolveEventArgs ev) diff --git a/Yavsc/Views/Command/Create.cshtml b/Yavsc/Views/Command/Create.cshtml index 5c29c08a..dd8c6e14 100644 --- a/Yavsc/Views/Command/Create.cshtml +++ b/Yavsc/Views/Command/Create.cshtml @@ -180,6 +180,7 @@ @Html.HiddenFor(model=>model.Location.Latitude) @Html.HiddenFor(model=>model.Location.Longitude) + @@ -195,6 +196,7 @@ @Html.HiddenFor(model=>model.ClientId) @Html.HiddenFor(model=>model.PerformerId) @Html.HiddenFor(model=>model.ActivityCode) + @Html.HiddenFor(model=>model.BillingCode) diff --git a/Yavsc/Views/FrontOffice/Profiles.cshtml b/Yavsc/Views/FrontOffice/Profiles.cshtml index 3f44dd10..59d48761 100644 --- a/Yavsc/Views/FrontOffice/Profiles.cshtml +++ b/Yavsc/Views/FrontOffice/Profiles.cshtml @@ -11,6 +11,7 @@ @Html.DisplayFor(m=>profile)
+
diff --git a/Yavsc/project.json b/Yavsc/project.json index 802b4cf6..79e2b3ae 100755 --- a/Yavsc/project.json +++ b/Yavsc/project.json @@ -113,8 +113,7 @@ "Microsoft.AspNet.OWin": "1.0.0-rc1-final", "System.Json": "4.0.20126.16343", "Yavsc.Abstract": { - "type": "build", - "version": "1.0.5" + "type": "build" }, "Extensions.AspNet.Authentication.Instagram": "1.0.0-t150809211713", "Microsoft.AspNet.Http.Extensions": "1.0.0-rc1-final", @@ -166,4 +165,4 @@ "postpublish": "echo after publish" }, "embed": "Views/**/*.cshtml" -} \ No newline at end of file +} diff --git a/Yavsc/project.lock.json b/Yavsc/project.lock.json index 4683fcff..f2c729c4 100644 --- a/Yavsc/project.lock.json +++ b/Yavsc/project.lock.json @@ -11437,7 +11437,7 @@ "Microsoft.AspNet.Mvc.Formatters.Json >= 6.0.0-rc1-final", "Microsoft.AspNet.OWin >= 1.0.0-rc1-final", "System.Json >= 4.0.20126.16343", - "Yavsc.Abstract >= 1.0.5", + "Yavsc.Abstract ", "Extensions.AspNet.Authentication.Instagram >= 1.0.0-t150809211713", "Microsoft.AspNet.Http.Extensions >= 1.0.0-rc1-final", "Microsoft.DiaSymReader.Native >= 1.5.0",