From 031a0fb05a2bf0df0212d127648c61f9d39f71ea Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Oct 2016 12:47:34 +0200 Subject: [PATCH 1/6] +Yavsc.Client --- global.json | 1 + 1 file changed, 1 insertion(+) diff --git a/global.json b/global.json index 4671db44..19201b63 100644 --- a/global.json +++ b/global.json @@ -2,6 +2,7 @@ "projects": [ "Yavsc", "Yavsc.Api", + "Yavsc.Client", "wrap" ], "sdk": { From 802c367c3d3c93823f200cfe8383c588948a8311 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Oct 2016 12:47:50 +0200 Subject: [PATCH 2/6] sync with server --- BookAStar/BookAStar/Interfaces/IEstimate.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/BookAStar/BookAStar/Interfaces/IEstimate.cs b/BookAStar/BookAStar/Interfaces/IEstimate.cs index 23726fdc..9a1f92b3 100644 --- a/BookAStar/BookAStar/Interfaces/IEstimate.cs +++ b/BookAStar/BookAStar/Interfaces/IEstimate.cs @@ -6,7 +6,7 @@ namespace BookAStar.Model.Interfaces public interface IEstimate { List AttachedFiles { get; set; } - List AttachedGraphicList { get; } + List AttachedGraphics { get; } List Bill { get; set; } string ClientId { get; set; } long? CommandId { get; set; } From 5790ac3ab8e9c9db510ef9a053a5b7b18429289b Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Oct 2016 12:48:03 +0200 Subject: [PATCH 3/6] updated --- Yavsc/tasks.todo | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Yavsc/tasks.todo b/Yavsc/tasks.todo index 5a597400..9f9bf76c 100644 --- a/Yavsc/tasks.todo +++ b/Yavsc/tasks.todo @@ -8,21 +8,28 @@ Da road to the hell ✔ Accès aux profiles des intervenants @done (August 13th 2016, 0:57) ✔ Demande de devis, spécifiant une date et un lieu, envers un pro (ou "BookQuery", ou "demande de rendez-vous") @done (August 13th 2016, 0:57) ✔ Notifications commande @done (September 15th 2016, 15:00) + ✔ Rendu html du format Markdown-av (+audio&video) @done (October 6th 2016, 14:32) + ✔ Rendu Android, via WebKit WebView @done (October 6th 2016, 14:32) + ✔ Salon public @done (September 28th 2016, 17:58) + + ☐ Saisie basique du devis + ☐ Devis au formats TeX et Pdf en ligne à accès restreint ☐ Proposition de devis sur BookQuery ☐ Signature de contrat ☐ Chat privé - ✔ Salon public @done (September 28th 2016, 17:58) ☐ Accès mobile au salon public ☐ Accès Web au chat privé ## Jalon 2 ☐ Quota fs utilisateur + ☐ Gestion de contenu des pages du site, au fromat Markdown-av ☐ Paiement client d'un approvisionnement pour une demande de prestation définie ☐ Login Twitter ☐ Notifications et Twits de blogs, d'entées d'artiste, de success stories ☐ Restrictions d'accès au chat privé ☐ Monétarisations + ☐ Support multi-lanque de l'app mobile ## Jalon 3 From e385af9f95ce71d743a43585219c9c0bcba15703 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Oct 2016 12:49:24 +0200 Subject: [PATCH 4/6] refactoring --- .../ApiControllers/BookQueryApiController.cs | 6 ++-- Yavsc/Helpers/EventHelpers.cs | 2 +- Yavsc/Interfaces/IBookQueryData.cs | 14 ++++++++ Yavsc/Interfaces/IEstimate.cs | 19 +++++++++++ Yavsc/Model/Billing/Estimate.cs | 32 +++++++++++-------- Yavsc/Model/Messaging/BookQueryEvent.cs | 2 +- Yavsc/Model/Messaging/ClientProviderInfo.cs | 6 ++-- 7 files changed, 60 insertions(+), 21 deletions(-) create mode 100644 Yavsc/Interfaces/IBookQueryData.cs create mode 100644 Yavsc/Interfaces/IEstimate.cs diff --git a/Yavsc/ApiControllers/BookQueryApiController.cs b/Yavsc/ApiControllers/BookQueryApiController.cs index 7819434d..ead226c6 100644 --- a/Yavsc/ApiControllers/BookQueryApiController.cs +++ b/Yavsc/ApiControllers/BookQueryApiController.cs @@ -34,16 +34,16 @@ namespace Yavsc.Controllers /// returned Ids must be lower than this value /// book queries [HttpGet] - public IEnumerable GetCommands(long maxId=long.MaxValue) + public IEnumerable GetCommands(long maxId=long.MaxValue) { var uid = User.GetUserId(); var now = DateTime.Now; var result = _context.Commands.Include(c => c.Location). Include(c => c.Client).Where(c => c.PerformerId == uid && c.Id < maxId && c.EventDate > now). - Select(c => new BookQueryProviderView + Select(c => new BookQueryProviderInfo { - Client = new ClientProviderView { UserName = c.Client.UserName, UserId = c.ClientId }, + Client = new ClientProviderInfo { UserName = c.Client.UserName, UserId = c.ClientId }, Location = c.Location, EventDate = c.EventDate, Id = c.Id, diff --git a/Yavsc/Helpers/EventHelpers.cs b/Yavsc/Helpers/EventHelpers.cs index fbdb614a..610b1e47 100644 --- a/Yavsc/Helpers/EventHelpers.cs +++ b/Yavsc/Helpers/EventHelpers.cs @@ -12,7 +12,7 @@ namespace Yavsc.Helpers { var yaev = new BookQueryEvent { - Client = new ClientProviderView { UserName = query.Client.UserName , UserId = query.ClientId } , + Client = new ClientProviderInfo { UserName = query.Client.UserName , UserId = query.ClientId } , Previsional = query.Previsional, EventDate = query.EventDate, Location = query.Location, diff --git a/Yavsc/Interfaces/IBookQueryData.cs b/Yavsc/Interfaces/IBookQueryData.cs new file mode 100644 index 00000000..ab156929 --- /dev/null +++ b/Yavsc/Interfaces/IBookQueryData.cs @@ -0,0 +1,14 @@ +using System; +using Yavsc.Model; + +namespace Yavsc.Interfaces +{ + public interface IBookQueryData + { + ClientProviderInfo Client { get; set; } + DateTime EventDate { get; set; } + long Id { get; set; } + Location Location { get; set; } + decimal? Previsionnal { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Interfaces/IEstimate.cs b/Yavsc/Interfaces/IEstimate.cs new file mode 100644 index 00000000..1c833cc6 --- /dev/null +++ b/Yavsc/Interfaces/IEstimate.cs @@ -0,0 +1,19 @@ +namespace Yavsc.Interfaces +{ + using System.Collections.Generic; + using Yavsc.Models.Billing; + public interface IEstimate + { + List AttachedFiles { get; set; } + List AttachedGraphics { get; } + List Bill { get; set; } + string ClientId { get; set; } + long? CommandId { get; set; } + string CommandType { get; set; } + string Description { get; set; } + long Id { get; set; } + string OwnerId { get; set; } + int? Status { get; set; } + string Title { get; set; } + } +} \ No newline at end of file diff --git a/Yavsc/Model/Billing/Estimate.cs b/Yavsc/Model/Billing/Estimate.cs index ecc0ecc4..c53e6899 100644 --- a/Yavsc/Model/Billing/Estimate.cs +++ b/Yavsc/Model/Billing/Estimate.cs @@ -1,13 +1,12 @@ - -using System.Collections.Generic; -using System.ComponentModel.DataAnnotations; -using System.ComponentModel.DataAnnotations.Schema; -using System.Linq; -using Yavsc.Models.Booking; - namespace Yavsc.Models.Billing { - public partial class Estimate + using System.Collections.Generic; + using System.ComponentModel.DataAnnotations; + using System.ComponentModel.DataAnnotations.Schema; + using System.Linq; + using Yavsc.Interfaces; + using Yavsc.Models.Booking; + public partial class Estimate : IEstimate { [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)] public long Id { get; set; } @@ -20,7 +19,7 @@ namespace Yavsc.Models.Billing /// /// [ForeignKey("CommandId")] - public BookQuery Query { get; set; } + public BookQuery Query { get; set; } public string Description { get; set; } public int? Status { get; set; } public string Title { get; set; } @@ -35,9 +34,10 @@ namespace Yavsc.Models.Billing [NotMapped] public List AttachedGraphics { get; set; } - public string AttachedGraphicsString { + public string AttachedGraphicsString + { get { return string.Join(":", AttachedGraphics); } - set { AttachedGraphics = value.Split(':').ToList(); } + set { AttachedGraphics = value.Split(':').ToList(); } } /// /// List of attached files @@ -48,9 +48,10 @@ namespace Yavsc.Models.Billing /// [NotMapped] public List AttachedFiles { get; set; } - public string AttachedFilesString { + public string AttachedFilesString + { get { return string.Join(":", AttachedFiles); } - set { AttachedFiles = value.Split(':').ToList(); } + set { AttachedFiles = value.Split(':').ToList(); } } [Required] @@ -58,5 +59,10 @@ namespace Yavsc.Models.Billing [Required] public string ClientId { get; set; } + + public string CommandType + { + get; set; + } } } diff --git a/Yavsc/Model/Messaging/BookQueryEvent.cs b/Yavsc/Model/Messaging/BookQueryEvent.cs index 060e2677..05a80b95 100644 --- a/Yavsc/Model/Messaging/BookQueryEvent.cs +++ b/Yavsc/Model/Messaging/BookQueryEvent.cs @@ -24,7 +24,7 @@ using Yavsc.Model; // You should have received a copy of the GNU Lesser General Public License // along with this program. If not, see . -public class BookQueryEvent: BookQueryProviderView, IEvent +public class BookQueryEvent: BookQueryProviderInfo, IEvent { public BookQueryEvent() { diff --git a/Yavsc/Model/Messaging/ClientProviderInfo.cs b/Yavsc/Model/Messaging/ClientProviderInfo.cs index 7febd680..f1524266 100644 --- a/Yavsc/Model/Messaging/ClientProviderInfo.cs +++ b/Yavsc/Model/Messaging/ClientProviderInfo.cs @@ -3,8 +3,8 @@ using System; namespace Yavsc.Model { -public class BookQueryProviderView {  - public ClientProviderView Client { get; set; } +public class BookQueryProviderInfo {  + public ClientProviderInfo Client { get; set; } public Location Location { get; set; } public long Id { get; set; } @@ -12,7 +12,7 @@ public class BookQueryProviderView {  public DateTime EventDate { get ; set; } public decimal? Previsional { get; set; } } - public class ClientProviderView {  + public class ClientProviderInfo {  public string UserName { get; set; } public string UserId { get; set; } public int Rate { get; set; } From 30a36417a00f5a22768751b3b6c70db3e19aa1c3 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Oct 2016 12:50:23 +0200 Subject: [PATCH 5/6] using site settings to build legal page --- Yavsc/Settings/SiteSettings.cs | 6 ++++++ Yavsc/Views/Shared/memo.pages.md.cshtml | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Yavsc/Settings/SiteSettings.cs b/Yavsc/Settings/SiteSettings.cs index a9d8218a..03cc63ee 100644 --- a/Yavsc/Settings/SiteSettings.cs +++ b/Yavsc/Settings/SiteSettings.cs @@ -20,5 +20,11 @@ namespace Yavsc public EmailEntry Admin { get; set; } public ThirdPartyFiles UserFiles { get; set; } + public string BusinessName { get; set; } + public string Street { get; set; } + public string PostalCode { get; set; } + public string CountryCode { get; set; } + + } } diff --git a/Yavsc/Views/Shared/memo.pages.md.cshtml b/Yavsc/Views/Shared/memo.pages.md.cshtml index 4cd95472..b2352c28 100644 --- a/Yavsc/Views/Shared/memo.pages.md.cshtml +++ b/Yavsc/Views/Shared/memo.pages.md.cshtml @@ -1,11 +1,11 @@ -@model Yavsc.Model.societe.com.CompanyInfo +@model Yavsc.SiteSettings Les informations recueillies dans ce formulaire font l'objet -d'un traitement informatique destiné à l'usage exclusif de @Model.name. +d'un traitement informatique destiné à l'usage exclusif de @Model.BusinessName. Conformément à l'article 34 de la loi Informatique et Liberté du 6 janvier 1978, vous disposez d'un droit d'accès, de modification, de rectification et de suppression des données vous concernant. -Pour l'exercer, veuillez vous adresser par écrit à : @Model.street @Model.postal_code @Model.country_code. +Pour l'exercer, veuillez vous adresser par écrit à : @Model.Street @Model.PostalCode @Model.CountryCode. From 2392526142ba60e0b864ca8e3b1474fb6caba793 Mon Sep 17 00:00:00 2001 From: Paul Schneider Date: Fri, 7 Oct 2016 12:50:35 +0200 Subject: [PATCH 6/6] supress warnings --- Yavsc/Migrations/20160917010249_yaev.Designer.cs | 1 - Yavsc/Migrations/20160917010249_yaev.cs | 2 -- Yavsc/Migrations/20160920215459_avatar.Designer.cs | 1 - Yavsc/Migrations/20160920215459_avatar.cs | 2 -- Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs | 2 -- 5 files changed, 8 deletions(-) diff --git a/Yavsc/Migrations/20160917010249_yaev.Designer.cs b/Yavsc/Migrations/20160917010249_yaev.Designer.cs index 1a023d4c..d537446e 100644 --- a/Yavsc/Migrations/20160917010249_yaev.Designer.cs +++ b/Yavsc/Migrations/20160917010249_yaev.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20160917010249_yaev.cs b/Yavsc/Migrations/20160917010249_yaev.cs index de480dae..ef4720f5 100644 --- a/Yavsc/Migrations/20160917010249_yaev.cs +++ b/Yavsc/Migrations/20160917010249_yaev.cs @@ -1,5 +1,3 @@ -using System; -using System.Collections.Generic; using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/20160920215459_avatar.Designer.cs b/Yavsc/Migrations/20160920215459_avatar.Designer.cs index 1ec560ff..8c469b1e 100644 --- a/Yavsc/Migrations/20160920215459_avatar.Designer.cs +++ b/Yavsc/Migrations/20160920215459_avatar.Designer.cs @@ -1,7 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; using Microsoft.Data.Entity.Migrations; using Yavsc.Models; diff --git a/Yavsc/Migrations/20160920215459_avatar.cs b/Yavsc/Migrations/20160920215459_avatar.cs index 46ac8643..d98a4b20 100644 --- a/Yavsc/Migrations/20160920215459_avatar.cs +++ b/Yavsc/Migrations/20160920215459_avatar.cs @@ -1,5 +1,3 @@ -using System; -using System.Collections.Generic; using Microsoft.Data.Entity.Migrations; namespace Yavsc.Migrations diff --git a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs index 498caf50..33fa1701 100644 --- a/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs +++ b/Yavsc/Migrations/ApplicationDbContextModelSnapshot.cs @@ -1,8 +1,6 @@ using System; using Microsoft.Data.Entity; using Microsoft.Data.Entity.Infrastructure; -using Microsoft.Data.Entity.Metadata; -using Microsoft.Data.Entity.Migrations; using Yavsc.Models; namespace Yavsc.Migrations