Paul Schneider 8 years ago
commit a4c3a9afea
17 changed files with 79 additions and 34 deletions

@ -6,7 +6,7 @@ namespace BookAStar.Model.Interfaces
public interface IEstimate public interface IEstimate
{ {
List<string> AttachedFiles { get; set; } List<string> AttachedFiles { get; set; }
List<string> AttachedGraphicList { get; } List<string> AttachedGraphics { get; }
List<BillingLine> Bill { get; set; } List<BillingLine> Bill { get; set; }
string ClientId { get; set; } string ClientId { get; set; }
long? CommandId { get; set; } long? CommandId { get; set; }

@ -34,16 +34,16 @@ namespace Yavsc.Controllers
/// <param name="maxId">returned Ids must be lower than this value</param> /// <param name="maxId">returned Ids must be lower than this value</param>
/// <returns>book queries</returns> /// <returns>book queries</returns>
[HttpGet] [HttpGet]
public IEnumerable<BookQueryProviderView> GetCommands(long maxId=long.MaxValue) public IEnumerable<BookQueryProviderInfo> GetCommands(long maxId=long.MaxValue)
{ {
var uid = User.GetUserId(); var uid = User.GetUserId();
var now = DateTime.Now; var now = DateTime.Now;
var result = _context.Commands.Include(c => c.Location). var result = _context.Commands.Include(c => c.Location).
Include(c => c.Client).Where(c => c.PerformerId == uid && c.Id < maxId && c.EventDate > now). 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, Location = c.Location,
EventDate = c.EventDate, EventDate = c.EventDate,
Id = c.Id, Id = c.Id,

@ -12,7 +12,7 @@ namespace Yavsc.Helpers
{ {
var yaev = new BookQueryEvent 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, Previsional = query.Previsional,
EventDate = query.EventDate, EventDate = query.EventDate,
Location = query.Location, Location = query.Location,

@ -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; }
}
}

@ -0,0 +1,19 @@
namespace Yavsc.Interfaces
{
using System.Collections.Generic;
using Yavsc.Models.Billing;
public interface IEstimate
{
List<string> AttachedFiles { get; set; }
List<string> AttachedGraphics { get; }
List<CommandLine> 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; }
}
}

@ -1,7 +1,6 @@
using System; using System;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure; using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations; using Microsoft.Data.Entity.Migrations;
using Yavsc.Models; using Yavsc.Models;

@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations; using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations namespace Yavsc.Migrations

@ -1,7 +1,6 @@
using System; using System;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure; using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations; using Microsoft.Data.Entity.Migrations;
using Yavsc.Models; using Yavsc.Models;

@ -1,5 +1,3 @@
using System;
using System.Collections.Generic;
using Microsoft.Data.Entity.Migrations; using Microsoft.Data.Entity.Migrations;
namespace Yavsc.Migrations namespace Yavsc.Migrations

@ -1,8 +1,6 @@
using System; using System;
using Microsoft.Data.Entity; using Microsoft.Data.Entity;
using Microsoft.Data.Entity.Infrastructure; using Microsoft.Data.Entity.Infrastructure;
using Microsoft.Data.Entity.Metadata;
using Microsoft.Data.Entity.Migrations;
using Yavsc.Models; using Yavsc.Models;
namespace Yavsc.Migrations namespace Yavsc.Migrations

@ -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 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)] [Key(), DatabaseGenerated(DatabaseGeneratedOption.Identity)]
public long Id { get; set; } public long Id { get; set; }
@ -20,7 +19,7 @@ namespace Yavsc.Models.Billing
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
[ForeignKey("CommandId")] [ForeignKey("CommandId")]
public BookQuery Query { get; set; } public BookQuery Query { get; set; }
public string Description { get; set; } public string Description { get; set; }
public int? Status { get; set; } public int? Status { get; set; }
public string Title { get; set; } public string Title { get; set; }
@ -35,9 +34,10 @@ namespace Yavsc.Models.Billing
[NotMapped] [NotMapped]
public List<string> AttachedGraphics { get; set; } public List<string> AttachedGraphics { get; set; }
public string AttachedGraphicsString { public string AttachedGraphicsString
{
get { return string.Join(":", AttachedGraphics); } get { return string.Join(":", AttachedGraphics); }
set { AttachedGraphics = value.Split(':').ToList(); } set { AttachedGraphics = value.Split(':').ToList(); }
} }
/// <summary> /// <summary>
/// List of attached files /// List of attached files
@ -48,9 +48,10 @@ namespace Yavsc.Models.Billing
/// <returns></returns> /// <returns></returns>
[NotMapped] [NotMapped]
public List<string> AttachedFiles { get; set; } public List<string> AttachedFiles { get; set; }
public string AttachedFilesString { public string AttachedFilesString
{
get { return string.Join(":", AttachedFiles); } get { return string.Join(":", AttachedFiles); }
set { AttachedFiles = value.Split(':').ToList(); } set { AttachedFiles = value.Split(':').ToList(); }
} }
[Required] [Required]
@ -58,5 +59,10 @@ namespace Yavsc.Models.Billing
[Required] [Required]
public string ClientId { get; set; } public string ClientId { get; set; }
public string CommandType
{
get; set;
}
} }
} }

@ -24,7 +24,7 @@ using Yavsc.Model;
// You should have received a copy of the GNU Lesser General Public License // You should have received a copy of the GNU Lesser General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>. // along with this program. If not, see <http://www.gnu.org/licenses/>.
public class BookQueryEvent: BookQueryProviderView, IEvent public class BookQueryEvent: BookQueryProviderInfo, IEvent
{ {
public BookQueryEvent() public BookQueryEvent()
{ {

@ -3,8 +3,8 @@ using System;
namespace Yavsc.Model namespace Yavsc.Model
{ {
public class BookQueryProviderView {  public class BookQueryProviderInfo { 
public ClientProviderView Client { get; set; } public ClientProviderInfo Client { get; set; }
public Location Location { get; set; } public Location Location { get; set; }
public long Id { get; set; } public long Id { get; set; }
@ -12,7 +12,7 @@ public class BookQueryProviderView { 
public DateTime EventDate { get ; set; } public DateTime EventDate { get ; set; }
public decimal? Previsional { get; set; } public decimal? Previsional { get; set; }
} }
public class ClientProviderView {  public class ClientProviderInfo { 
public string UserName { get; set; } public string UserName { get; set; }
public string UserId { get; set; } public string UserId { get; set; }
public int Rate { get; set; } public int Rate { get; set; }

@ -20,5 +20,11 @@ namespace Yavsc
public EmailEntry Admin { get; set; } public EmailEntry Admin { get; set; }
public ThirdPartyFiles UserFiles { 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; }
} }
} }

@ -1,11 +1,11 @@
@model Yavsc.Model.societe.com.CompanyInfo @model Yavsc.SiteSettings
Les informations recueillies dans ce formulaire font l'objet 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, 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 vous disposez d'un droit d'accès, de modification, de rectification et de
suppression des données vous concernant. 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.

@ -8,21 +8,28 @@ Da road to the hell
✔ Accès aux profiles des intervenants @done (August 13th 2016, 0:57) ✔ 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) ✔ 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) ✔ 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 ☐ Proposition de devis sur BookQuery
☐ Signature de contrat ☐ Signature de contrat
☐ Chat privé ☐ Chat privé
✔ Salon public @done (September 28th 2016, 17:58)
☐ Accès mobile au salon public ☐ Accès mobile au salon public
☐ Accès Web au chat privé ☐ Accès Web au chat privé
## Jalon 2 ## Jalon 2
☐ Quota fs utilisateur ☐ 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 ☐ Paiement client d'un approvisionnement pour une demande de prestation définie
☐ Login Twitter ☐ Login Twitter
☐ Notifications et Twits de blogs, d'entées d'artiste, de success stories ☐ Notifications et Twits de blogs, d'entées d'artiste, de success stories
☐ Restrictions d'accès au chat privé ☐ Restrictions d'accès au chat privé
☐ Monétarisations ☐ Monétarisations
☐ Support multi-lanque de l'app mobile
## Jalon 3 ## Jalon 3

@ -2,6 +2,7 @@
"projects": [ "projects": [
"Yavsc", "Yavsc",
"Yavsc.Api", "Yavsc.Api",
"Yavsc.Client",
"wrap" "wrap"
], ],
"sdk": { "sdk": {

Loading…