style: fix formatting

This commit is contained in:
prssanna 2021-02-01 19:50:27 +05:30
parent 1d346702ed
commit a3585e40f7
9 changed files with 25 additions and 24 deletions

View File

@ -123,7 +123,7 @@ frappe.treeview_settings["Account"] = {
}, "add"); }, "add");
}, },
onrender: function(node) { onrender: function(node) {
if(frappe.boot.user.can_read.indexOf("GL Entry") !== -1){ if (frappe.boot.user.can_read.indexOf("GL Entry") !== -1) {
// show Dr if positive since balance is calculated as debit - credit else show Cr // show Dr if positive since balance is calculated as debit - credit else show Cr
let balance = node.data.balance_in_account_currency || node.data.balance; let balance = node.data.balance_in_account_currency || node.data.balance;

View File

@ -1,12 +1,12 @@
frappe.listview_settings['Contract'] = { frappe.listview_settings['Contract'] = {
add_fields: ["status"], add_fields: ["status"],
get_indicator: function (doc) { get_indicator: function (doc) {
if (doc.status == "Unsigned") { if (doc.status == "Unsigned") {
return [__(doc.status), "red", "status,=," + doc.status]; return [__(doc.status), "red", "status,=," + doc.status];
} else if (doc.status == "Active") { } else if (doc.status == "Active") {
return [__(doc.status), "green", "status,=," + doc.status]; return [__(doc.status), "green", "status,=," + doc.status];
} else if (doc.status == "Inactive") { } else if (doc.status == "Inactive") {
return [__(doc.status), "gray", "status,=," + doc.status]; return [__(doc.status), "gray", "status,=," + doc.status];
} }
}, },
}; };

View File

@ -24,8 +24,8 @@ frappe.ui.form.on('Course Scheduling Tool', {
<caption>${__('Following course schedules were created')}</caption> <caption>${__('Following course schedules were created')}</caption>
<thead><tr><th>${__("Course")}</th><th>${__("Date")}</th></tr></thead> <thead><tr><th>${__("Course")}</th><th>${__("Date")}</th></tr></thead>
<tbody> <tbody>
${course_schedules.map( ${course_schedules.map(c =>
c => `<tr><td><a href="/app/course-schedule/${c.name}">${c.name}</a></td> `<tr><td><a href="/app/course-schedule/${c.name}">${c.name}</a></td>
<td>${c.schedule_date}</td></tr>` <td>${c.schedule_date}</td></tr>`
).join('')} ).join('')}
</tbody> </tbody>

View File

@ -12,19 +12,19 @@ frappe.treeview_settings["Healthcare Service Unit"] = {
get_tree_nodes: 'erpnext.healthcare.utils.get_children', get_tree_nodes: 'erpnext.healthcare.utils.get_children',
ignore_fields:["parent_healthcare_service_unit"], ignore_fields:["parent_healthcare_service_unit"],
onrender: function(node) { onrender: function(node) {
if (node.data.occupied_out_of_vacant!==undefined){ if (node.data.occupied_out_of_vacant!==undefined) {
$('<span class="balance-area pull-right">' $('<span class="balance-area pull-right">'
+ " " + node.data.occupied_out_of_vacant + " " + node.data.occupied_out_of_vacant
+ '</span>').insertBefore(node.$ul); + '</span>').insertBefore(node.$ul);
} }
if (node.data && node.data.inpatient_occupancy!==undefined) { if (node.data && node.data.inpatient_occupancy!==undefined) {
if (node.data.inpatient_occupancy == 1){ if (node.data.inpatient_occupancy == 1) {
if (node.data.occupancy_status == "Occupied"){ if (node.data.occupancy_status == "Occupied") {
$('<span class="balance-area pull-right">' $('<span class="balance-area pull-right">'
+ " " + node.data.occupancy_status + " " + node.data.occupancy_status
+ '</span>').insertBefore(node.$ul); + '</span>').insertBefore(node.$ul);
} }
if (node.data.occupancy_status == "Vacant"){ if (node.data.occupancy_status == "Vacant") {
$('<span class="balance-area pull-right">' $('<span class="balance-area pull-right">'
+ " " + node.data.occupancy_status + " " + node.data.occupancy_status
+ '</span>').insertBefore(node.$ul); + '</span>').insertBefore(node.$ul);

View File

@ -41,7 +41,7 @@ frappe.team_updates = {
me.add_row(d); me.add_row(d);
}); });
} else { } else {
frappe.show_alert({message:__('No more updates'), indicator:'gray'}); frappe.show_alert({message: __('No more updates'), indicator: 'gray'});
me.more.parent().addClass('hidden'); me.more.parent().addClass('hidden');
} }
} }

View File

@ -58,7 +58,7 @@ body.product-page {
.card-grid { .card-grid {
display: grid; display: grid;
grid-gap: 15px; grid-gap: 15px;
grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
} }
} }

View File

@ -10,7 +10,7 @@ frappe.pages['point-of-sale'].on_page_load = function(wrapper) {
frappe.require('assets/js/point-of-sale.min.js', function() { frappe.require('assets/js/point-of-sale.min.js', function() {
wrapper.pos = new erpnext.PointOfSale.Controller(wrapper); wrapper.pos = new erpnext.PointOfSale.Controller(wrapper);
window.cur_pos = wrapper.pos; window.cur_pos = wrapper.pos;
}) });
}; };
frappe.pages['point-of-sale'].refresh = function(wrapper) { frappe.pages['point-of-sale'].refresh = function(wrapper) {

View File

@ -1,7 +1,6 @@
import frappe import frappe
from frappe.search.full_text_search import FullTextSearch from frappe.search.full_text_search import FullTextSearch
from whoosh.fields import TEXT, ID, KEYWORD, Schema from whoosh.fields import TEXT, ID, KEYWORD, Schema
from frappe.website.render import render_page
from frappe.utils import strip_html_tags from frappe.utils import strip_html_tags
from whoosh.qparser import MultifieldParser, FieldsPlugin, WildcardPlugin from whoosh.qparser import MultifieldParser, FieldsPlugin, WildcardPlugin
from whoosh.analysis import StemmingAnalyzer from whoosh.analysis import StemmingAnalyzer
@ -52,7 +51,7 @@ class ProductSearch(FullTextSearch):
if item.web_long_description: if item.web_long_description:
content = strip_html_tags(item.web_long_description) content = strip_html_tags(item.web_long_description)
elif description: elif item.description:
content = strip_html_tags(item.description) content = strip_html_tags(item.description)
return frappe._dict( return frappe._dict(

View File

@ -35,7 +35,7 @@ $.extend(shopping_cart, {
}, },
get_update_address_dialog() { get_update_address_dialog() {
return new frappe.ui.Dialog({ let d = new frappe.ui.Dialog({
title: "Select Address", title: "Select Address",
fields: [{ fields: [{
'fieldtype': 'HTML', 'fieldtype': 'HTML',
@ -56,7 +56,7 @@ $.extend(shopping_cart, {
}, },
callback: function(r) { callback: function(r) {
d.hide(); d.hide();
if(!r.exc) { if (!r.exc) {
$(".cart-tax-items").html(r.message.taxes); $(".cart-tax-items").html(r.message.taxes);
shopping_cart.parent.find( shopping_cart.parent.find(
`.address-container[data-address-type="${address_type}"]` `.address-container[data-address-type="${address_type}"]`
@ -66,6 +66,8 @@ $.extend(shopping_cart, {
}); });
} }
}); });
return d;
}, },
get_address_template(type) { get_address_template(type) {