diff --git a/js/costcalc_main.jsx b/js/costcalc_main.jsx index 554d887..a56c09d 100644 --- a/js/costcalc_main.jsx +++ b/js/costcalc_main.jsx @@ -1,1677 +1,1677 @@ "use strict"; var projectname=''; var projectduration=0; // Functions Tools // --------------------- // --------------------- //function loop for react js function Repeat(props) { let items = []; for (let i = 0; i < props.numTimes; i++) { items.push(props.children(i)); } return
{items}
; } //convert string to numeric function tonumeric (value) { return parseFloat( value.toString().replace(/[^0-9\.]+/g, '') ); } // Covert numeric to money string function tomoney(numeric,currency) { if (typeof numeric == 'string') { numeric = parseFloat(numeric); } let strcur=''; if(currency===undefined){ strcur=MainData.Currency; } else { strcur=currency; } return numeric.toFixed(0).replace(/(\d)(?=(\d{3})+\.)/g, '$1,') + ' '+strcur; } // return the sum of an array function sum(obj) { const val=Object.values(obj); var total = 0; for (var i = 0; i < val.length; i++) { total = total + tonumeric(val[i]); } return total; } // Comapare two obj return true is similar Object.compare = function (obj1, obj2) { //Loop through properties in object 1 for (var p in obj1) { //Check property exists on both objects if (obj1.hasOwnProperty(p) !== obj2.hasOwnProperty(p)) return false; switch (typeof (obj1[p])) { //Deep compare objects case 'object': if (!Object.compare(obj1[p], obj2[p])) return false; break; //Compare function code case 'function': if (typeof (obj2[p]) == 'undefined' || (p != 'compare' && obj1[p].toString() != obj2[p].toString())) return false; break; //Compare values default: if (obj1[p] != obj2[p]) return false; } } //Check object 2 for any extra properties for (var p in obj2) { if (typeof (obj1[p]) == 'undefined') return false; } return true; }; // Generate a random int function randomint(not){ var rnd; do { rnd=Math.floor(Math.random() * 100); var cont=false; for (let i = 0; i < not.length ; i++) { if (not[i]===rnd){ cont=true; } } } while(cont); return rnd; } // Inputs Definition // --------------------- // --------------------- // Display the amount selector class AmountInput extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); } handleChange(e) { this.props.onChange(e.target.value); } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } componentWillUnmount() { $('[data-toggle="tooltip"]').tooltip('dispose'); } render() { const value = this.props.value; let label=null; if(this.props.name!=null && this.props.name!==""){ label=; } return (
{label} {this.props.name} : {value} {this.props.unit}
); } } // Display a select input box class SelectorInput extends React.Component { constructor(props) { super(props); // this.state={listoptions:this.makelist(props.options)}; this.handleChange = this.handleChange.bind(this); } rate(i){ return i; } makelist(data){ var listoptions=[]; for (var i = 0; i < data.length; i++) { listoptions.push(); } return listoptions; } handleChange(select) { this.props.onChange(select.target.value); } makerate(){ if (this.props.rate!=null && this.props.rate!==""){ return(
Rate : {this.props.rate} {this.props.unit}
);} } maketitle(title){ const maxstr=20 if (title.length>maxstr){ title=title.substr(0,maxstr)+"..."; } return title; } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } componentWillUnmount() { $('[data-toggle="tooltip"]').tooltip('dispose'); } render() { let label=null; if(this.props.name!=null && this.props.name!==""){ label=
; } return (
{label}
{this.makelist(this.props.options)}
{this.makerate()}
) } } // Make the know more button class MakeknowmoreInput extends React.Component { constructor(props) { super(props); this.state={btnsize:20} } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } componentWillUnmount() { $('[data-toggle="tooltip"]').tooltip('dispose'); } render() { const data = this.props.data; if (((data.Url !== '') )) { // if (data.Url.length==1){ // return( // } url={data.Url[0].Url} // id="btn-plugin-knowmore" // class="btn-primary btn-sm" tips={"Know more about " + data.Name}/> // ); // }else { return (} options={data.Url} id="btn-plugin-knowmore" class="btn-primary btn-sm" tips={"Know more about " + data.Name}/>); //} } else{ return null } } } // Display a checkbox class CheckboxInput extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); this.state={checked:this.props.defaults}; } handleChange() { this.setState({checked: !this.state.checked}); this.props.onChange(!this.state.checked); } render() { return (
); } } // Display a btn with link class ButtonHrefInput extends React.Component { constructor(props) { super(props); } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } render() { return ( {this.props.name} ); } } // Button with validation popup class ButtonInputWpop extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); this.state={target:"Modal"+this.props.idp}; } handleChange() { const out={n:this.props.n,target:this.state.target}; this.props.onClick(out); } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } componentWillUnmount() { $('[data-toggle="tooltip"]').tooltip('dispose'); } render() { return ( ); } } // Display a button class ButtonInput extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); } handleChange() { this.props.onClick(this.props.n); } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } componentWillUnmount() { $('[data-toggle="tooltip"]').tooltip('dispose'); } render() { return ( ); } } // Display a menu class MenuInput extends React.Component { constructor(props) { super(props); this.state={listoptions:this.makelist(props.options)}; } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } componentWillUnmount() { $('[data-toggle="tooltip"]').tooltip('dispose'); } makelist(data){ var listoptions=[]; for (var i = 0; i < data.length; i++) { listoptions.push({data[i].Name}); } return listoptions; } render() { return (
{this.state.listoptions}
); } } // Text input box class TxtInput extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); } handleChange(e) { this.props.onChange(e.target.value); } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } componentWillUnmount() { $('[data-toggle="tooltip"]').tooltip('dispose'); } render() { let info=null ; if(this.props.info != null && this.props.info !== "") info={this.props.info} ; return (
{this.props.Prepend}
{info}
{this.props.InvalidMessage}
); } } // Outputs definition // --------------------- // --------------------- // Display the cost output box class CostOutput extends React.Component { constructor(props) { super(props); this.handleChange = this.handleChange.bind(this); } handleChange() { this.props.onCostChange(this.props.display); } componentDidMount() { $('[data-toggle="tooltip"]').tooltip(); } componentDidUpdate() { $('[data-toggle="tooltip"]').tooltip(); } render() { const classN="form-control "+this.props.class; return (
); } } // Display a text box for display function Textoutput(props){ return(
{props.text}
); } // Plugins definition // --------------------- // --------------------- class AmountRatesCost extends React.Component { constructor(props) { super(props); this.handleAmountChange = this.handleAmountChange.bind(this); this.handleRateChange = this.handleRateChange.bind(this); this.state={ Amount : 1, SelectRate : 0 , Rate : this.props.data.Rates[Object.keys(this.props.data.Rates)[0]], Adaptive:false, }; if(typeof this.props.data.Adaptive!=='undefined' && this.props.data.Adaptive===true){ this.state.Adaptive=true; } this.make_export(); } handleAmountChange(amount) { this.setState({Amount: amount}); } handleRateChange(select) { this.setState({SelectRate: select}); this.setState({Rate: this.props.data.Rates[Object.keys(this.props.data.Rates)[select]]}); } make_export(){ this.export=[ {Name:"Amount",Value:this.state.Amount+" "+this.props.data.AmountUnit}, {Name:this.props.data.RateName,Value:Object.keys(this.props.data.Rates)[this.state.SelectRate]} ]; this.props.export(this.export); } componentDidUpdate(){ this.makecost(this.state.Amount,this.state.Rate); this.make_export(); } render() { let Amount_min; let Amount_max; let Amount_stp; if(this.state.Adaptive){ Amount_min=this.props.data.AmountMin[this.state.SelectRate]; Amount_max=this.props.data.AmountMax[this.state.SelectRate]; Amount_stp=this.props.data.AmountStep[this.state.SelectRate]; } else { Amount_min=this.props.data.AmountMin; Amount_max=this.props.data.AmountMax; Amount_stp=this.props.data.AmountStep; } if(this.state.Amount>Amount_max){ this.state.Amount=Amount_max; } if(this.state.Amount
); } makecost(amount,rate) { let free; if(this.state.Adaptive){ free=this.props.data.AmountFree[this.state.SelectRate]; } else { free=this.props.data.AmountFree; } let total = (amount - free) * rate; if(this.props.data.ByYear) total=total*projectduration; total=tomoney(total); this.props.onCostChange(this.props.n,total); return total; } } class CategoryAmountRatesCost extends React.Component { constructor(props) { super(props); this.handleCatChange = this.handleCatChange.bind(this); this.handleAmountChange = this.handleAmountChange.bind(this); this.handleRateChange = this.handleRateChange.bind(this); this.state={ SelectCat : 0, Cat : this.props.data.Cat[Object.keys(this.props.data.Cat)[0]], Amount : 1, SelectRate : 0 , Rate : this.props.data.Rates[Object.keys(this.props.data.Rates)[0]], Adaptive: false, }; if(typeof this.props.data.Adaptive!=='undefined' && this.props.data.Adaptive===true){ this.state.Adaptive=true; } this.make_export(); } handleAmountChange(amount) { this.setState({Amount: amount}); } handleRateChange(select) { this.setState({SelectRate: select}); this.setState({Rate: this.props.data.Rates[Object.keys(this.props.data.Rates)[select]]}); } handleCatChange(select) { this.setState({SelectCat: select}); this.setState({Cat: this.props.data.Cat[Object.keys(this.props.data.Cat)[select]]}); } make_export(){ this.export=[ {Name:this.props.data.CatName,Value:Object.keys(this.props.data.Cat)[this.state.SelectCat]}, {Name:"Amount",Value:this.state.Amount+" "+this.props.data.AmountUnit}, {Name:this.props.data.RateName,Value:Object.keys(this.props.data.Rates)[this.state.SelectRate]} ]; this.props.export(this.export); } componentDidUpdate(){ this.makecost(this.state.Cat,this.state.Amount,this.state.Rate); this.make_export(); } render() { let Amount_min; let Amount_max; let Amount_stp; if(this.state.Adaptive){ Amount_min=this.props.data.AmountMin[this.state.SelectRate]; Amount_max=this.props.data.AmountMax[this.state.SelectRate]; Amount_stp=this.props.data.AmountStep[this.state.SelectRate]; } else { Amount_min=this.props.data.AmountMin; Amount_max=this.props.data.AmountMax; Amount_stp=this.props.data.AmountStep; } if(this.state.Amount>Amount_max){ this.state.Amount=Amount_max; } if(this.state.Amount
); } makecost(cat,amount,rate) { let free; if(this.state.Adaptive){ free=this.props.data.AmountFree[this.state.SelectRate]; } else { free=this.props.data.AmountFree; } var total=cat+(amount-free)*rate; if(this.props.data.ByYear) total=total*projectduration; total=tomoney(total); this.props.onCostChange(this.props.n,total); return total; } } class CategoryCost extends React.Component { constructor(props) { super(props); this.handleCatChange = this.handleCatChange.bind(this); this.state={SelectCat : 0, Cat : this.props.data.Cat[Object.keys(this.props.data.Cat)[0]] }; this.make_export(); } handleCatChange(select) { this.setState({SelectCat: select}); this.setState({Cat: this.props.data.Cat[Object.keys(this.props.data.Cat)[select]]}); } make_export(){ this.export=[ {Name:this.props.data.CatName,Value:Object.keys(this.props.data.Cat)[this.state.SelectCat]}, ]; this.props.export(this.export); } componentDidUpdate(){ this.makecost(this.state.Cat); this.make_export(); } render() { return (
); } makecost(cat) { var total=cat; if(this.props.data.ByYear) total=total*projectduration; total=tomoney(total); this.props.onCostChange(this.props.n,total); return total; } } class NoneSelect extends React.Component { constructor(props) { super(props); this.export=[] } render() { const Cost=tomoney(0); this.props.onCostChange(this.props.n,Cost); this.props.export(this.export); return (
Please select a provider in the list.
); } } class UserCost extends React.Component { constructor(props) { super(props); this.handleCostChange = this.handleCostChange.bind(this); this.handleProviderChange = this.handleProviderChange.bind(this); this.handleServiceChange = this.handleServiceChange.bind(this); this.handleYearChange = this.handleYearChange.bind(this); this.handleConvMoneyChange = this.handleConvMoneyChange.bind(this); this.state={ total:0, value:0, ProviderError:true, ServiceError:true, ByYear:false, }; this.export=[]; } handleYearChange(state){ this.setState({ByYear: state}); this.props.handlebyYearChange(state); } makecost(byYear,amount){ let total=amount; if(byYear) total=amount*projectduration; // this.setState({total:total}); this.props.onCostChange(this.props.n,tomoney(total)); } handleCostChange(value){ this.setState({value:value}); } handleProviderChange(txt){ this.props.handleProviderChange(txt); if(txt ===''){ this.setState({ProviderError: true}); } else { this.setState({ProviderError: false}); } } handleServiceChange(txt){ this.props.handleServiceChange(txt); if(txt ===''){ this.setState({ServiceError: true}); } else { this.setState({ServiceError: false}); } } handleConvMoneyChange(conv){ this.setState({conv:conv}); } componentDidUpdate(){ this.makecost(this.state.ByYear,this.state.value); // this.make_export(); } classtxt(error){ if(error){ return "is-invalid"; } else { return "is-valid"; } } render() { let Costname="Cost"; if(this.state.ByYear) Costname="Cost by year"; this.props.export(this.export); return (
); } } // Combine plugins // --------------------- // --------------------- // Manages what's display inside a plugin : provider selector, select the components... class ProviderPluginsSelector extends React.Component { constructor(props) { super(props); this.handleCostChange = this.handleCostChange.bind(this); this.handleProviderChange = this.handleProviderChange.bind(this); this.handleCommentChange = this.handleCommentChange.bind(this); this.handleAddPlugin = this.handleAddPlugin.bind(this); this.handleRmvPlugin = this.handleRmvPlugin.bind(this); this.handleProviderChangetxt = this.handleProviderChangetxt.bind(this); this.handleServiceChangetxt = this.handleServiceChangetxt.bind(this); this.handlebyYearChange = this.handlebyYearChange.bind(this); this.make_exportcmp = this.make_exportcmp.bind(this); this.make_export = this.make_export.bind(this); this.state={ selected:0, keys:this.ProvidersName(props.data), n:1, cost:0, comments:"", Provider:"", Name:"", manualname:false, manbyyear:false, show_plus:false, exportcmp:"", }; } handleCostChange(n,e) { if (this.state.cost !== e ) { this.setState({cost: e}); this.props.handleCostChange(n,e); } } handleProviderChange(select){ this.setState({selected:select}); if (select>0){ this.setState({show_plus:true}); }else { this.setState({show_plus:false}); } this.state.Provider=this.props.data.Data[select].Provider; this.state.Name=this.props.data.Data[select].Name; this.props.handleCostChange(this.props.n,this.state.cost); // Send a provider even when provider change Stats.RecordEvent('Provider',this.state.Provider,0); } componentDidUpdate(){ this.props.handleCostChange(this.props.n,this.state.cost); this.make_export(); } make_exportcmp(data){ this.state.exportcmp=data } make_export(){ const out={ Category:this.props.data.Name, Provider:this.state.Provider, Name:this.state.Name, Comments:this.state.comments, ExportCmp:this.state.exportcmp, Cost:this.state.cost, }; this.props.export(out,this.props.n) } handleCommentChange(com){ this.setState({comments:com}); } handleAddPlugin(n){ this.props.handleAddPlugin(n); } handleRmvPlugin(n){ this.props.handleRmvPlugin(n); } // The 3 nexts function are for user input management handleProviderChangetxt(txt){ this.setState({Provider:txt}); } handleServiceChangetxt(txt){ this.setState({Name:txt}); } handlebyYearChange(state){ this.setState({manbyyear:state}); } // Manage extra display info for a selected provider extrainfo(Cdata){ let Extra_inf=""; let Extra_infUrl=""; if ( typeof Cdata.ExtraInfoUrl !=='undefined' && Cdata.ExtraInfoUrl !==''){ Extra_infUrl=

To know more

; } if ( typeof Cdata.ExtraInfo !=='undefined' && Cdata.ExtraInfo !==''){ Extra_inf=
  {Cdata.ExtraInfo} {Extra_infUrl}
; } return(Extra_inf); } render() { const selected=this.state.selected; this.state.manualname=false; this.state.keys=this.ProvidersName(this.props.data); const Cmp=this.cmp2string(this.cmpdata(selected).Style); const Cdata=this.cmpdata(selected); const id=this.props.data.Name.replace(/\s/g,'')+this.props.n; return(
{this.extrainfo(Cdata)}
); } cmpdata(select){ let out=this.props.data.Data[select]; if (this.state.manualname){ out.Name=this.state.Name; out.ByYear=this.state.manbyyear; if ( this.state.Provider ==='') { this.state.keys[select] = 'Please provide a Provider'; }else { this.state.keys[select]=this.state.Provider; } } return out; } // return the correct style fct from the str input cmp2string(str){ switch (str) { case "AmountRatesCost" : return AmountRatesCost; case "CategoryCost" : return CategoryCost; case "CategoryAmountRatesCost" : return CategoryAmountRatesCost; case "NoneSelect":return NoneSelect; case "UserCost":{this.state.manualname=true; return UserCost;} } } ProvidersName(main){ const data = main.Data; var providers=[]; for (var i = 0; i < data.length; i++) { providers.push(data[i].Provider); } return providers; } } // Displays the header of a plugin (button +- name cost ...) class ModuleHeader extends React.Component{ constructor(props) { super(props); this.handleAddPlugin = this.handleAddPlugin.bind(this); this.handleRmvPlugin = this.handleRmvPlugin.bind(this); } handleAddPlugin(n){ this.props.handleAddPlugin(n); } handleRmvPlugin(n){ this.props.handleRmvPlugin(n); } byyear(by){ if(by){ return({projectduration}
years
); } else { return(); } } render() { let minus=null; let plus=null; let convout=null; if (this.props.show_minus){ minus=} onClick={this.handleRmvPlugin} n={this.props.n} tips="Remove this line" idp={this.props.id} info={this.props.data.Name}/>; } if (this.props.show_plus){ plus= } onClick={this.handleAddPlugin} n={this.props.n} tips={"Add a new "+this.props.data.Name}/>; } if (this.props.conv.Enable) { convout=; } return(
{plus}
{minus}
{/*
*/} {/*
*/} {/*
*/} {/*
*/}
{this.makeinfo(this.props.keys,this.props.selected,this.props.Cdata)}
{this.props.comments}
{convout}
{this.byyear(this.props.Cdata.ByYear)}
); } btnClick(){ // Send a category even when someone click on the category btn Stats.RecordEvent('Category',this.props.data.Name,this.props.n); } makeinfo(keys,selected,Cdata){ let name=Cdata.Name; if ( name ===''&&keys[selected]===''){ name='Please provide a Provider'; return ({name}); }else if(keys[selected]==='None'){ return ({name}); }else{ return ({keys[selected]} : {name}); } } } //displays one kind plugin it manages the add and removes option class ManagePlugins extends React.Component{ constructor(props) { super(props); this.handleCostChange = this.handleCostChange.bind(this); this.handleAddPlugin = this.handleAddPlugin.bind(this); this.handleRmvPlugin = this.handleRmvPlugin.bind(this); this.make_exportplug=this.make_exportplug.bind(this); this.make_export = this.make_export.bind(this); this.state={ displayed:[], varsum:{}, plugins:[], export:[], }; this.state.displayed.push(randomint(this.state.displayed)); } handleRmvPlugin(n){ $('#'+n.target).modal('hide'); var tmp=this.state.displayed; tmp.splice(n.n,1); this.setState({displayed:tmp}); this.handleCostChange(n.n,0); this.state.export.splice(n.n,1); } handleAddPlugin(n){ var tmp=this.state.displayed; tmp.splice(n+1,0,randomint(this.state.displayed)); this.setState({displayed:tmp}); } handleCostChange(n,cost) { this.state.varsum[n]=cost; this.props.handleCostChange(this.props.n,sum(this.state.varsum)); } make_exportplug(data,n) { this.state.export[n] = data; this.make_export() } make_export(){ if (this.state.export.length === this.give_n()) { this.props.export(this.state.export, this.props.n) } } give_id(index){ return this.state.displayed[index] } give_n(){ const disp=this.state.displayed; return disp.length } componentDidUpdate(){ this.make_export(); } render() { let show_minus = false; if (this.give_n()>1) { show_minus=true; } this.make_export(); return(
{(index) => }
);} } // displays all the plugins defined in the Maindata class PluginsMain extends React.Component { constructor(props) { super(props); this.handleCostChange = this.handleCostChange.bind(this); this.make_exportplug=this.make_exportplug.bind(this); this.make_export = this.make_export.bind(this); this.state={ varsum:{}, export:[], }; } handleCostChange(name,e) { this.state.varsum[name]=e; this.props.TotalCost(sum(this.state.varsum)); } make_exportplug(data,n) { this.state.export[n] = data; this.make_export(); } make_export(){ if (this.state.export.length === this.props.data.length) { this.props.export(this.state.export); } } render() { return(
Line controls
Category
Provider information
Cost
{(index) => }
); } } // MAIN // --------------------- // --------------------- class Main extends React.Component { constructor(props) { Money_GetRates(); super(props); this.handleCostChange = this.handleCostChange.bind(this); this.make_exportmain = this.make_exportmain.bind(this); this.handleNameChange = this.handleNameChange.bind(this); this.handleDurationChange = this.handleDurationChange.bind(this); this.handleConvMoneyChange = this.handleConvMoneyChange.bind(this); this.btnClick=this.btnClick.bind(this); this.state= { total: 0, export: [], exportmain:[], name:'', duration:MainData.DefaultDuration, conv:{Enable:false,Cur:''}, }; projectduration=this.state.duration; this.init=true; } componentDidUpdate(){ _paq.push(['enableLinkTracking']); } handleCostChange(total) { if (this.state.total !== total){ this.setState({total:total}); } } make_exportmain(idata) { const tmp=JSON.parse(JSON.stringify(idata)); let disp=false; if(!this.init){ if(!Object.compare(tmp,this.state.exportmain.data)){ disp=true; } } if((this.init)||(disp)){ this.setState({exportmain: {data: tmp, total: tomoney(this.state.total)}}); this.init=false; } } handleNameChange(name){ this.setState({name:name}); projectname=name; } handleDurationChange(d){ this.setState({duration:d}); projectduration=d; } handleConvMoneyChange(conv){ this.setState({conv:conv}); } btnClick(name,value){ Stats.RecordEvent('Options',name,value); } render() { return(
{this.page_head()}
{this.project_info()} {this.final_cost(this.state.conv)} {this.howto()}
{this.page_foot()}
); } project_info(){ return(
); } // Display the total cost final_cost(conv){ let disps=''; if(projectduration>1) disps='s'; let convout=''; if (conv.Enable) convout=; return(
{/**/}

Total Cost for {projectduration} year{disps}

{convout}
); } // Define the head (top) of the page page_head(){ let helpbtn=null; let imglogo=null; if (MainData.HelpUrl!=null && MainData.HelpUrl!=="") helpbtn= this.btnClick("helpbtn",0)}>  I need help with my DMP; if (MainData.InstLogo!=null && MainData.InstLogo!=="") imglogo=; return( ); } //Define the foot (bottom) of the page page_foot(){ return( ); } // Define the howto (user guide) howto(){ let curconv=null; if(Money_Enable) curconv=
Change Currency

If you need another currency than {MainData.Currency} you can add an extra currency by selecting in the Change Currency menu

Actual rate is automatically applied using openexchangerates

; return(

HOWTO

Project Name and Duration

The Project name is only used for you.

Project Duration is used for subscription services charged by year : the yearly cost will be multiplied by the duration of the project.

{curconv}
Categories
This tool is divided by categories (for example Activate storage). Click on the category name, and it will expand.
Providers

Providers can be chosen from the Select a provider box. You can then tune your settings for this provider to fit your needs.

If the provider you want is not present, you can add it manually with Provide your own provider and then enter your provider/service and cost.

Add or Remove Line

If you want to add a new line use the } tips={"Add a new category"} onClick={this.fctnull}/> button.

You can also remove a line with } tips={"Remove this line"} onClick={this.fctnull}/> button.

To know more about
Some extra information about the category or the provider can be obtained with the } tips={"Know more"} onClick={this.fctnull}/> button.
Comments your input
Comments are for your own usage, you can use it for remembering what each section is and for a nice export.
Export
You can export your work into different formats :
HTML : This format can be used in any wordprocessing software (such as Microsoft Word or Libreoffice).
HTML Source code, Markdown, and CSV formats are also possible.
Click on the in order to copy your work into your clipboard. A simple Paste will transfer your work into any software.
); } // Function use by the howto btn to move the page move2howto(){ Stats.RecordEvent('Options',"howtobtn",0); $('html,body').animate({scrollTop: $("#howto").offset().top},'slow'); } fctnull(){} } //Main Declaration // --------------------- // --------------------- ReactDOM.render(
,document.getElementById('root')); // Display the stats popup after 10s if (Stats.Enable) {setTimeout(function(){$('#PopupStats').modal('show')}, 10000);} //Enable tooltip $('[data-toggle="tooltip"]').tooltip();