mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Rules now have auto-complete.
This commit is contained in:
parent
e4ae925d2b
commit
4270fe07ab
@ -20,7 +20,8 @@ use FireflyIII\Models\AccountType;
|
|||||||
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
use FireflyIII\Repositories\Account\AccountRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
use FireflyIII\Repositories\Account\AccountTaskerInterface;
|
||||||
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
use FireflyIII\Repositories\Bill\BillRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Category\CategoryRepositoryInterface as CRI;
|
use FireflyIII\Repositories\Budget\BudgetRepositoryInterface;
|
||||||
|
use FireflyIII\Repositories\Category\CategoryRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
use FireflyIII\Repositories\Journal\JournalRepositoryInterface;
|
||||||
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
use FireflyIII\Repositories\Tag\TagRepositoryInterface;
|
||||||
use FireflyIII\Support\CacheProperties;
|
use FireflyIII\Support\CacheProperties;
|
||||||
@ -50,6 +51,7 @@ class JsonController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function action(Request $request)
|
public function action(Request $request)
|
||||||
{
|
{
|
||||||
|
sleep(5);
|
||||||
$count = intval($request->get('count')) > 0 ? intval($request->get('count')) : 1;
|
$count = intval($request->get('count')) > 0 ? intval($request->get('count')) : 1;
|
||||||
$keys = array_keys(config('firefly.rule-actions'));
|
$keys = array_keys(config('firefly.rule-actions'));
|
||||||
$actions = [];
|
$actions = [];
|
||||||
@ -83,6 +85,22 @@ class JsonController extends Controller
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @param JournalCollectorInterface $collector
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function allTransactionJournals(JournalCollectorInterface $collector)
|
||||||
|
{
|
||||||
|
$collector->setLimit(100)->setPage(1);
|
||||||
|
$return = array_unique($collector->getJournals()->pluck('description')->toArray());
|
||||||
|
sort($return);
|
||||||
|
|
||||||
|
return Response::json($return);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param BillRepositoryInterface $repository
|
* @param BillRepositoryInterface $repository
|
||||||
*
|
*
|
||||||
@ -180,13 +198,26 @@ class JsonController extends Controller
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a list of categories.
|
* @param BudgetRepositoryInterface $repository
|
||||||
*
|
|
||||||
* @param CRI $repository
|
|
||||||
*
|
*
|
||||||
* @return \Illuminate\Http\JsonResponse
|
* @return \Illuminate\Http\JsonResponse
|
||||||
*/
|
*/
|
||||||
public function categories(CRI $repository)
|
public function budgets(BudgetRepositoryInterface $repository)
|
||||||
|
{
|
||||||
|
$return = array_unique($repository->getBudgets()->pluck('name')->toArray());
|
||||||
|
sort($return);
|
||||||
|
|
||||||
|
return Response::json($return);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns a list of categories.
|
||||||
|
*
|
||||||
|
* @param CategoryRepositoryInterface $repository
|
||||||
|
*
|
||||||
|
* @return \Illuminate\Http\JsonResponse
|
||||||
|
*/
|
||||||
|
public function categories(CategoryRepositoryInterface $repository)
|
||||||
{
|
{
|
||||||
$return = array_unique($repository->getCategories()->pluck('name')->toArray());
|
$return = array_unique($repository->getCategories()->pluck('name')->toArray());
|
||||||
sort($return);
|
sort($return);
|
||||||
@ -278,22 +309,6 @@ class JsonController extends Controller
|
|||||||
return Response::json(['steps' => $steps, 'template' => $template]);
|
return Response::json(['steps' => $steps, 'template' => $template]);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @param JournalCollectorInterface $collector
|
|
||||||
*
|
|
||||||
* @return \Illuminate\Http\JsonResponse
|
|
||||||
*/
|
|
||||||
public function allTransactionJournals(JournalCollectorInterface $collector)
|
|
||||||
{
|
|
||||||
$collector->setLimit(100)->setPage(1);
|
|
||||||
$return = array_unique($collector->getJournals()->pluck('description')->toArray());
|
|
||||||
sort($return);
|
|
||||||
|
|
||||||
return Response::json($return);
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param JournalCollectorInterface $collector
|
* @param JournalCollectorInterface $collector
|
||||||
* @param string $what
|
* @param string $what
|
||||||
@ -302,8 +317,8 @@ class JsonController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function transactionJournals(JournalCollectorInterface $collector, string $what)
|
public function transactionJournals(JournalCollectorInterface $collector, string $what)
|
||||||
{
|
{
|
||||||
$type = config('firefly.transactionTypesByWhat.' . $what);
|
$type = config('firefly.transactionTypesByWhat.' . $what);
|
||||||
$types = [$type];
|
$types = [$type];
|
||||||
|
|
||||||
$collector->setTypes($types)->setLimit(100)->setPage(1);
|
$collector->setTypes($types)->setLimit(100)->setPage(1);
|
||||||
$return = array_unique($collector->getJournals()->pluck('description')->toArray());
|
$return = array_unique($collector->getJournals()->pluck('description')->toArray());
|
||||||
@ -332,6 +347,7 @@ class JsonController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function trigger(Request $request)
|
public function trigger(Request $request)
|
||||||
{
|
{
|
||||||
|
sleep(5);
|
||||||
$count = intval($request->get('count')) > 0 ? intval($request->get('count')) : 1;
|
$count = intval($request->get('count')) > 0 ? intval($request->get('count')) : 1;
|
||||||
$keys = array_keys(config('firefly.rule-triggers'));
|
$keys = array_keys(config('firefly.rule-triggers'));
|
||||||
$triggers = [];
|
$triggers = [];
|
||||||
|
@ -8,8 +8,34 @@
|
|||||||
* See the LICENSE file for details.
|
* See the LICENSE file for details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
var triggerCount = 0;
|
/** global: triggerCount, actionCount */
|
||||||
var actionCount = 0;
|
|
||||||
|
$(function () {
|
||||||
|
"use strict";
|
||||||
|
if (triggerCount === 0) {
|
||||||
|
console.log('addNewTrigger() because count is zero');
|
||||||
|
addNewTrigger();
|
||||||
|
}
|
||||||
|
if (actionCount === 0) {
|
||||||
|
console.log('addNewAction() because count is zero');
|
||||||
|
addNewAction();
|
||||||
|
}
|
||||||
|
if (triggerCount > 0) {
|
||||||
|
console.log('onAddNewTrigger() because count is > zero');
|
||||||
|
onAddNewTrigger();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (actionCount > 0) {
|
||||||
|
console.log('onAddNewAction() because count is > zero');
|
||||||
|
onAddNewAction();
|
||||||
|
}
|
||||||
|
|
||||||
|
$('.add_rule_trigger').click(addNewTrigger);
|
||||||
|
$('.add_rule_action').click(addNewAction);
|
||||||
|
$('.test_rule_triggers').click(testRuleTriggers);
|
||||||
|
$('.remove-trigger').unbind('click').click(removeTrigger);
|
||||||
|
$('.remove-action').unbind('click').click(removeAction);
|
||||||
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This method triggers when a new trigger must be added to the form.
|
* This method triggers when a new trigger must be added to the form.
|
||||||
@ -17,35 +43,33 @@ var actionCount = 0;
|
|||||||
function addNewTrigger() {
|
function addNewTrigger() {
|
||||||
"use strict";
|
"use strict";
|
||||||
triggerCount++;
|
triggerCount++;
|
||||||
|
console.log('click on add_rule_trigger');
|
||||||
|
|
||||||
|
// disable the button
|
||||||
|
$('.add_rule_trigger').attr('disabled', 'disabled');
|
||||||
|
console.log('Disabled the button');
|
||||||
|
|
||||||
// get the HTML for the new trigger
|
// get the HTML for the new trigger
|
||||||
$.getJSON('json/trigger', {count: triggerCount}).done(function (data) {
|
$.getJSON('json/trigger', {count: triggerCount}).done(function (data) {
|
||||||
|
console.log('new trigger html retrieved');
|
||||||
|
|
||||||
// append it:
|
// append it to the other triggers
|
||||||
$('tbody.rule-trigger-tbody').append(data.html);
|
$('tbody.rule-trigger-tbody').append(data.html);
|
||||||
|
$('.remove-trigger').unbind('click').click(removeTrigger);
|
||||||
// update all "remove trigger"-buttons so they will respond correctly
|
|
||||||
// and remove the trigger.
|
|
||||||
$('.remove-trigger').unbind('click').click(function (e) {
|
|
||||||
removeTrigger(e);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// update all "select trigger type" dropdown buttons so they will respond correctly
|
|
||||||
$('select[name^="rule-trigger["]').unbind('change').change(function (e) {
|
|
||||||
var target = $(e.target);
|
|
||||||
updateTriggerAutoComplete(target)
|
|
||||||
});
|
|
||||||
|
|
||||||
// update all "select trigger type" dropdowns
|
// update all "select trigger type" dropdowns
|
||||||
// so the accompanying text-box has the correct autocomplete.
|
// so the accompanying text-box has the correct autocomplete.
|
||||||
onAddNewTrigger();
|
onAddNewTrigger();
|
||||||
|
|
||||||
|
$('.add_rule_trigger').removeAttr('disabled');
|
||||||
|
console.log('Enabled the button');
|
||||||
|
|
||||||
|
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
alert('Cannot get a new trigger.');
|
alert('Cannot get a new trigger.');
|
||||||
|
$('.add_rule_trigger').removeAttr('disabled');
|
||||||
});
|
});
|
||||||
|
return false;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,21 +78,34 @@ function addNewTrigger() {
|
|||||||
*/
|
*/
|
||||||
function addNewAction() {
|
function addNewAction() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
console.log('click on add_rule_action');
|
||||||
actionCount++;
|
actionCount++;
|
||||||
|
|
||||||
|
// disable the button
|
||||||
|
$('.add_rule_action').attr('disabled', 'disabled');
|
||||||
|
console.log('Disabled the button');
|
||||||
|
|
||||||
|
|
||||||
$.getJSON('json/action', {count: actionCount}).done(function (data) {
|
$.getJSON('json/action', {count: actionCount}).done(function (data) {
|
||||||
$('tbody.rule-action-tbody').append(data.html);
|
$('tbody.rule-action-tbody').append(data.html);
|
||||||
|
|
||||||
// add action things.
|
// add action things.
|
||||||
$('.remove-action').unbind('click').click(function (e) {
|
$('.remove-action').unbind('click').click(removeAction);
|
||||||
removeAction(e);
|
|
||||||
|
|
||||||
return false;
|
// update all "select trigger type" dropdowns
|
||||||
});
|
// so the accompanying text-box has the correct autocomplete.
|
||||||
|
onAddNewAction();
|
||||||
|
|
||||||
|
$('.add_rule_action').removeAttr('disabled');
|
||||||
|
console.log('Enabled the button');
|
||||||
|
|
||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
alert('Cannot get a new action.');
|
alert('Cannot get a new action.');
|
||||||
|
|
||||||
|
$('.add_rule_action').removeAttr('disabled');
|
||||||
|
console.log('Enabled the button');
|
||||||
});
|
});
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -78,6 +115,7 @@ function addNewAction() {
|
|||||||
*/
|
*/
|
||||||
function removeTrigger(e) {
|
function removeTrigger(e) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
console.log('click on remove-trigger');
|
||||||
var target = $(e.target);
|
var target = $(e.target);
|
||||||
if (target.prop("tagName") == "I") {
|
if (target.prop("tagName") == "I") {
|
||||||
target = target.parent();
|
target = target.parent();
|
||||||
@ -87,8 +125,10 @@ function removeTrigger(e) {
|
|||||||
|
|
||||||
// if now at zero, immediatly add one again:
|
// if now at zero, immediatly add one again:
|
||||||
if ($('.rule-trigger-tbody tr').length == 0) {
|
if ($('.rule-trigger-tbody tr').length == 0) {
|
||||||
|
console.log('Add a new trigger again');
|
||||||
addNewTrigger();
|
addNewTrigger();
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -98,6 +138,7 @@ function removeTrigger(e) {
|
|||||||
*/
|
*/
|
||||||
function removeAction(e) {
|
function removeAction(e) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
console.log('click on remove-action');
|
||||||
var target = $(e.target);
|
var target = $(e.target);
|
||||||
if (target.prop("tagName") == "I") {
|
if (target.prop("tagName") == "I") {
|
||||||
target = target.parent();
|
target = target.parent();
|
||||||
@ -107,8 +148,32 @@ function removeAction(e) {
|
|||||||
|
|
||||||
// if now at zero, immediatly add one again:
|
// if now at zero, immediatly add one again:
|
||||||
if ($('.rule-action-tbody tr').length == 0) {
|
if ($('.rule-action-tbody tr').length == 0) {
|
||||||
|
console.log('Add a new action again');
|
||||||
addNewAction();
|
addNewAction();
|
||||||
}
|
}
|
||||||
|
return false;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Method fires when a new action is added. It will update ALL action value input fields.
|
||||||
|
*/
|
||||||
|
function onAddNewAction() {
|
||||||
|
"use strict";
|
||||||
|
console.log('now in onAddNewAction');
|
||||||
|
|
||||||
|
// update all "select action type" dropdown buttons so they will respond correctly
|
||||||
|
$('select[name^="rule-action["]').unbind('change').change(function (e) {
|
||||||
|
var target = $(e.target);
|
||||||
|
updateActionInput(target)
|
||||||
|
});
|
||||||
|
|
||||||
|
$.each($('.rule-action-holder'), function (i, v) {
|
||||||
|
console.log('Update action input for row ' + i);
|
||||||
|
var holder = $(v);
|
||||||
|
var select = holder.find('select');
|
||||||
|
updateActionInput(select);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -116,21 +181,74 @@ function removeAction(e) {
|
|||||||
*/
|
*/
|
||||||
function onAddNewTrigger() {
|
function onAddNewTrigger() {
|
||||||
"use strict";
|
"use strict";
|
||||||
console.log('updateTriggerAutoComplete');
|
console.log('now in onAddNewTrigger');
|
||||||
|
|
||||||
|
// update all "select trigger type" dropdown buttons so they will respond correctly
|
||||||
|
$('select[name^="rule-trigger["]').unbind('change').change(function (e) {
|
||||||
|
var target = $(e.target);
|
||||||
|
updateTriggerInput(target)
|
||||||
|
});
|
||||||
|
|
||||||
$.each($('.rule-trigger-holder'), function (i, v) {
|
$.each($('.rule-trigger-holder'), function (i, v) {
|
||||||
|
console.log('Update trigger input for row ' + i);
|
||||||
var holder = $(v);
|
var holder = $(v);
|
||||||
var select = holder.find('select');
|
var select = holder.find('select');
|
||||||
console.log('Now at input #' + i);
|
updateTriggerInput(select);
|
||||||
updateTriggerAutoComplete(select);
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Creates a nice auto complete action depending on the type of the select list value thing.
|
||||||
|
*
|
||||||
|
* @param selectList
|
||||||
|
*/
|
||||||
|
function updateActionInput(selectList) {
|
||||||
|
console.log('now in updateActionInput');
|
||||||
|
// the actual row this select list is in:
|
||||||
|
var parent = selectList.parent().parent();
|
||||||
|
// the text input we're looking for:
|
||||||
|
var input = parent.find('input[name^="rule-action-value["]');
|
||||||
|
input.removeAttr('disabled');
|
||||||
|
switch (selectList.val()) {
|
||||||
|
default:
|
||||||
|
input.typeahead('destroy');
|
||||||
|
console.log('Cannot or will not do stuff to "' + selectList.val() + '"');
|
||||||
|
break;
|
||||||
|
case 'set_category':
|
||||||
|
console.log('Create autocomplete for category list');
|
||||||
|
createAutoComplete(input, 'json/categories');
|
||||||
|
break;
|
||||||
|
case 'clear_category':
|
||||||
|
case 'clear_budget':
|
||||||
|
case 'remove_all_tags':
|
||||||
|
input.attr('disabled', 'disabled');
|
||||||
|
break;
|
||||||
|
case 'set_budget':
|
||||||
|
console.log('Create autocomplete for budget list');
|
||||||
|
createAutoComplete(input, 'json/budgets');
|
||||||
|
break;
|
||||||
|
case 'add_tag':
|
||||||
|
case 'remove_tag':
|
||||||
|
createAutoComplete(input, 'json/tags');
|
||||||
|
break;
|
||||||
|
case 'set_description':
|
||||||
|
createAutoComplete(input, 'json/transaction-journals/all');
|
||||||
|
break;
|
||||||
|
case 'set_source_account':
|
||||||
|
createAutoComplete(input, 'json/all-accounts');
|
||||||
|
break;
|
||||||
|
case 'set_destination_account':
|
||||||
|
createAutoComplete(input, 'json/all-accounts');
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a nice auto complete trigger depending on the type of the select list value thing.
|
* Creates a nice auto complete trigger depending on the type of the select list value thing.
|
||||||
*
|
*
|
||||||
* @param selectList
|
* @param selectList
|
||||||
*/
|
*/
|
||||||
function updateTriggerAutoComplete(selectList) {
|
function updateTriggerInput(selectList) {
|
||||||
// the actual row this select list is in:
|
// the actual row this select list is in:
|
||||||
var parent = selectList.parent().parent();
|
var parent = selectList.parent().parent();
|
||||||
// the text input we're looking for:
|
// the text input we're looking for:
|
||||||
@ -179,6 +297,7 @@ function createAutoComplete(input, URI) {
|
|||||||
|
|
||||||
function testRuleTriggers() {
|
function testRuleTriggers() {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
console.log('click on test_rule_triggers');
|
||||||
|
|
||||||
// Serialize all trigger data
|
// Serialize all trigger data
|
||||||
var triggerData = $(".rule-trigger-tbody").find("input[type=text], input[type=checkbox], select").serializeArray();
|
var triggerData = $(".rule-trigger-tbody").find("input[type=text], input[type=checkbox], select").serializeArray();
|
||||||
@ -203,4 +322,5 @@ function testRuleTriggers() {
|
|||||||
}).fail(function () {
|
}).fail(function () {
|
||||||
alert('Cannot get transactions for given triggers.');
|
alert('Cannot get transactions for given triggers.');
|
||||||
});
|
});
|
||||||
|
return false;
|
||||||
}
|
}
|
@ -1,40 +0,0 @@
|
|||||||
/*
|
|
||||||
* create.js
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** global: triggerCount, actionCount */
|
|
||||||
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
"use strict";
|
|
||||||
if (triggerCount === 0) {
|
|
||||||
addNewTrigger();
|
|
||||||
}
|
|
||||||
if (actionCount === 0) {
|
|
||||||
addNewAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
$('.add_rule_trigger').click(function () {
|
|
||||||
addNewTrigger();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.add_rule_action').click(function () {
|
|
||||||
addNewAction();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.test_rule_triggers').click(function () {
|
|
||||||
testRuleTriggers();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,53 +0,0 @@
|
|||||||
/*
|
|
||||||
* edit.js
|
|
||||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
|
||||||
*
|
|
||||||
* This software may be modified and distributed under the terms of the
|
|
||||||
* Creative Commons Attribution-ShareAlike 4.0 International License.
|
|
||||||
*
|
|
||||||
* See the LICENSE file for details.
|
|
||||||
*/
|
|
||||||
|
|
||||||
/** global: triggerCount, actionCount */
|
|
||||||
|
|
||||||
$(function () {
|
|
||||||
"use strict";
|
|
||||||
if (triggerCount === 0) {
|
|
||||||
addNewTrigger();
|
|
||||||
}
|
|
||||||
if (actionCount === 0) {
|
|
||||||
addNewAction();
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
$('.add_rule_trigger').click(function () {
|
|
||||||
addNewTrigger();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.test_rule_triggers').click(function () {
|
|
||||||
testRuleTriggers();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.add_rule_action').click(function () {
|
|
||||||
addNewAction();
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
$('.remove-trigger').unbind('click').click(function (e) {
|
|
||||||
removeTrigger(e);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
|
|
||||||
// add action things.
|
|
||||||
$('.remove-action').unbind('click').click(function (e) {
|
|
||||||
removeAction(e);
|
|
||||||
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
});
|
|
@ -1,4 +1,4 @@
|
|||||||
<tr data-count="{{ count }}">
|
<tr data-count="{{ count }}" class="rule-action-holder">
|
||||||
<td style="width:40px;">
|
<td style="width:40px;">
|
||||||
<a href="#" class="btn btn-danger btn-sm remove-action"><i class="fa fa-trash"></i></a>
|
<a href="#" class="btn btn-danger btn-sm remove-action"><i class="fa fa-trash"></i></a>
|
||||||
</td>
|
</td>
|
||||||
|
@ -63,7 +63,7 @@
|
|||||||
</table>
|
</table>
|
||||||
<p>
|
<p>
|
||||||
<br/>
|
<br/>
|
||||||
<a href="#" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</a>
|
<button type="button" class="btn btn-default add_rule_trigger">{{ 'add_rule_trigger'|_ }}</button>
|
||||||
<a href="#" class="btn btn-default test_rule_triggers">{{ 'test_rule_triggers'|_ }}</a>
|
<a href="#" class="btn btn-default test_rule_triggers">{{ 'test_rule_triggers'|_ }}</a>
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
@ -128,12 +128,12 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js"></script>
|
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js"></script>
|
||||||
<script type="text/javascript" src="js/ff/rules/create-edit.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var triggerCount = {{ triggerCount }};
|
var triggerCount = {{ triggerCount }};
|
||||||
var actionCount = {{ actionCount }};
|
var actionCount = {{ actionCount }};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="js/ff/rules/create.js"></script>
|
<script type="text/javascript" src="js/ff/rules/create-edit.js"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block styles %}
|
{% block styles %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -127,10 +127,10 @@
|
|||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% block scripts %}
|
{% block scripts %}
|
||||||
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js"></script>
|
<script type="text/javascript" src="js/lib/bootstrap3-typeahead.min.js"></script>
|
||||||
<script type="text/javascript" src="js/ff/rules/create-edit.js"></script>
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
var triggerCount = {{ triggerCount }};
|
var triggerCount = {{ triggerCount }};
|
||||||
var actionCount = {{ actionCount }};
|
var actionCount = {{ actionCount }};
|
||||||
</script>
|
</script>
|
||||||
<script type="text/javascript" src="js/ff/rules/edit.js"></script>
|
<script type="text/javascript" src="js/ff/rules/create-edit.js"></script>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
@ -383,6 +383,7 @@ Route::group(
|
|||||||
Route::get('all-accounts', ['uses' => 'JsonController@allAccounts', 'as' => 'all-accounts']);
|
Route::get('all-accounts', ['uses' => 'JsonController@allAccounts', 'as' => 'all-accounts']);
|
||||||
Route::get('revenue-accounts', ['uses' => 'JsonController@revenueAccounts', 'as' => 'revenue-accounts']);
|
Route::get('revenue-accounts', ['uses' => 'JsonController@revenueAccounts', 'as' => 'revenue-accounts']);
|
||||||
Route::get('categories', ['uses' => 'JsonController@categories', 'as' => 'categories']);
|
Route::get('categories', ['uses' => 'JsonController@categories', 'as' => 'categories']);
|
||||||
|
Route::get('budgets', ['uses' => 'JsonController@budgets', 'as' => 'budgets']);
|
||||||
Route::get('tags', ['uses' => 'JsonController@tags', 'as' => 'tags']);
|
Route::get('tags', ['uses' => 'JsonController@tags', 'as' => 'tags']);
|
||||||
Route::get('tour', ['uses' => 'JsonController@tour', 'as' => 'tour']);
|
Route::get('tour', ['uses' => 'JsonController@tour', 'as' => 'tour']);
|
||||||
Route::get('box/in', ['uses' => 'JsonController@boxIn', 'as' => 'box.in']);
|
Route::get('box/in', ['uses' => 'JsonController@boxIn', 'as' => 'box.in']);
|
||||||
|
Loading…
Reference in New Issue
Block a user