You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
2.7 KiB
JavaScript

var app = angular.module('instantQuote', []);
app.controller('PBX', function ($scope) {
$scope.options = {
callsSelection: 1,
"calls": [
{
"name": "Mostly inbound",
"description": "Most calls that come through my phone system come from external parties",
"icon": "angle double down"
},
{
"name": "Balanced",
"description": "There's a good balance of inbound and outbound calls",
"icon": "balance scale"
},
{
"name": "Mostly outbound",
"description": "We make a lot of calls compared to how many we receive.",
"icon": "angle double up"
},
{
"name": "Not sure",
"description": "Help me analyse my bill",
"icon": "question circle outline"
},
],
"phones": [
{
"name": "Softphone only",
"tagline": "Use an app as your phone",
"description": "Use a powerful app as your office phone. For Windows, Mac, iOS and Android",
"image": "https://placehold.co/400x400"
},
{
"name": "Standard deskphone",
"tagline": "Fanvil X3S Lite",
"description": "A modern, Enterprise-ready phone",
"image": "https://fanvil.com/upload/images/20220413/10124btj44.png"
},
{
"name": "Advanced Deskphone",
"tagline": "Fanvil X6U",
"description": "A high-end modern, Enterprise-ready phone",
"image": "https://fanvil.com/upload/images/20210629/1500rx2r62.png"
},
{
"name": "Executive Deskphone",
"tagline": "Fanvil X210",
"description": "A high-end modern, Enterprise-ready phone",
"image": "https://fanvil.com/upload/images/20210628/1127hv2046.png"
},
],
"phoneNumbers": [
{
"phone": "",
"account": "",
"carrier": ""
}
]
}
$scope.addOption = (item, increment = 1) => {
if (typeof item.count === "undefined") {
item.count = 1
} else {
item.count+=increment
}
}
$scope.selectOption = (object,value) => {
$scope.options[object] = value;
}
$scope.addNumber = () => {
$scope.options.phoneNumbers.push({phone: '', account: '', carrier: ''})
}
$scope.firstName = "John";
$scope.lastName = "Doe";
});