WIP estimate
This commit is contained in:
parent
be289e45e1
commit
3b57246f80
22 changed files with 407 additions and 52 deletions
|
|
@ -9,11 +9,14 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
using Interfaces;
|
||||
using Model;
|
||||
using Model.Social;
|
||||
using Model.Workflow;
|
||||
using System.Linq;
|
||||
|
||||
class BookQueryViewModel : ViewModel, IBookQueryData
|
||||
{
|
||||
public BookQueryViewModel()
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
public BookQueryViewModel(BookQueryData data)
|
||||
{
|
||||
|
|
@ -44,11 +47,28 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
return DataManager.Current.EstimationCache.LocalGet(this.Id);
|
||||
}
|
||||
}
|
||||
public Estimate Estimate { get
|
||||
{
|
||||
return DataManager.Current.Estimates.FirstOrDefault(
|
||||
e=>e.Query.Id == Id
|
||||
);
|
||||
} }
|
||||
|
||||
|
||||
public bool EstimationDone
|
||||
{
|
||||
get
|
||||
{
|
||||
return Estimate != null;
|
||||
}
|
||||
}
|
||||
|
||||
public string EditEstimateButtonText
|
||||
{
|
||||
get
|
||||
{
|
||||
return DraftEstimate != null ? "Editer le devis" : "Faire un devis" ;
|
||||
return DraftEstimate != null ?
|
||||
Strings.EditEstimate : Strings.DoEstimate;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -23,10 +23,9 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
/// </summary>
|
||||
/// <param name="data"></param>
|
||||
/// <param name="localState"></param>
|
||||
public EditEstimateViewModel(Estimate data, LocalState localState )
|
||||
public EditEstimateViewModel(Estimate data)
|
||||
{
|
||||
Data = data;
|
||||
State = localState;
|
||||
}
|
||||
|
||||
private void Bill_CollectionChanged(object sender, System.Collections.Specialized.NotifyCollectionChangedEventArgs e)
|
||||
|
|
@ -65,19 +64,20 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
}
|
||||
|
||||
|
||||
string newDesc;
|
||||
|
||||
[JsonIgnore]
|
||||
private string description;
|
||||
public string Description
|
||||
{
|
||||
get
|
||||
{
|
||||
return Data.Description;
|
||||
return description;
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
SetProperty<string>(ref newDesc, value, "Description");
|
||||
Data.Description = newDesc;
|
||||
SetProperty<string>(ref description, value);
|
||||
Data.Description = description;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -87,7 +87,7 @@ namespace BookAStar.ViewModels.EstimateAndBilling
|
|||
{
|
||||
get
|
||||
{
|
||||
return Data.Title;
|
||||
return title;
|
||||
}
|
||||
|
||||
set
|
||||
|
|
|
|||
|
|
@ -7,8 +7,11 @@ using XLabs.Forms.Mvvm;
|
|||
|
||||
namespace BookAStar.ViewModels.Signing
|
||||
{
|
||||
class EstimateSignaturePad: ViewModel
|
||||
class DocSigningViewModel: ViewModel
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// The doc to sign, in Markdown format
|
||||
/// </summary>
|
||||
public string Document { get; set; }
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue