From f086e03df06935bf85c1bb3721ae089bc45c1948 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Wed, 20 Sep 2023 13:39:33 +0500 Subject: [PATCH 001/126] fix(ajax): error handling --- frappe/public/js/frappe/request.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/frappe/public/js/frappe/request.js b/frappe/public/js/frappe/request.js index 30e707c1fa..dd76be7f87 100644 --- a/frappe/public/js/frappe/request.js +++ b/frappe/public/js/frappe/request.js @@ -133,6 +133,7 @@ frappe.request.call = function (opts) { } else { frappe.app.handle_session_expired(); } + opts.error_callback && opts.error_callback(); }, 404: function (xhr) { frappe.msgprint({ @@ -140,6 +141,7 @@ frappe.request.call = function (opts) { indicator: "red", message: __("The resource you are looking for is not available"), }); + opts.error_callback && opts.error_callback(); }, 403: function (xhr) { if (frappe.session.user === "Guest" && frappe.session.logged_in_user !== "Guest") { @@ -169,6 +171,7 @@ frappe.request.call = function (opts) { ), }); } + opts.error_callback && opts.error_callback(); }, 508: function (xhr) { frappe.utils.play_sound("error"); @@ -179,6 +182,7 @@ frappe.request.call = function (opts) { "Another transaction is blocking this one. Please try again in a few seconds." ), }); + opts.error_callback && opts.error_callback(); }, 413: function (data, xhr) { frappe.msgprint({ @@ -188,6 +192,7 @@ frappe.request.call = function (opts) { (frappe.boot.max_file_size || 5242880) / 1048576, ]), }); + opts.error_callback && opts.error_callback(); }, 417: function (xhr) { var r = xhr.responseJSON; @@ -220,6 +225,7 @@ frappe.request.call = function (opts) { }, 502: function (xhr) { frappe.msgprint(__("Internal Server Error")); + opts.error_callback && opts.error_callback(); }, }; From d38913714c3991017353a1c8c873509a67b9185c Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Wed, 20 Sep 2023 14:42:02 +0500 Subject: [PATCH 002/126] fix(xcall): optional error message --- frappe/public/js/frappe/request.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/request.js b/frappe/public/js/frappe/request.js index dd76be7f87..b622037338 100644 --- a/frappe/public/js/frappe/request.js +++ b/frappe/public/js/frappe/request.js @@ -19,7 +19,7 @@ frappe.xcall = function (method, params) { resolve(r.message); }, error: (r) => { - reject(r.message); + reject(r?.message); }, }); }); From b5ff56214263c3a69536f0dfae5e8eaab1608eb6 Mon Sep 17 00:00:00 2001 From: Saif Ur Rehman Date: Wed, 20 Sep 2023 14:49:56 +0500 Subject: [PATCH 003/126] fix(base_list): setup_filter_area error handling --- frappe/public/js/frappe/list/base_list.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/frappe/public/js/frappe/list/base_list.js b/frappe/public/js/frappe/list/base_list.js index 86a1b91091..7237fa4134 100644 --- a/frappe/public/js/frappe/list/base_list.js +++ b/frappe/public/js/frappe/list/base_list.js @@ -308,7 +308,9 @@ frappe.views.BaseList = class BaseList { this.filter_area = new FilterArea(this); if (this.filters && this.filters.length > 0) { - return this.filter_area.set(this.filters); + return this.filter_area.set(this.filters).catch(() => { + this.filter_area.clear(false); + }); } } From 07779047090e6d6675d4a31aea06b4cdff8a01b4 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 28 Sep 2023 18:20:44 +0200 Subject: [PATCH 004/126] refactor: clean fr translation duplicate as erpnext app already have --- frappe/translations/fr.csv | 26 +++++++++++--------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/frappe/translations/fr.csv b/frappe/translations/fr.csv index af1210cb29..9659e23f7d 100644 --- a/frappe/translations/fr.csv +++ b/frappe/translations/fr.csv @@ -151,7 +151,7 @@ Next,Suivant, No Data,Aucune Donnée, No address added yet.,Aucune adresse ajoutée., No contacts added yet.,Aucun contact ajouté., -No items found.,Aucun élément trouvé., +No items found,Aucun élément trouvé, None,Aucun, Not Permitted,Non Autorisé, Not active,Non actif, @@ -2188,7 +2188,7 @@ Select Your Region,Sélectionnez Votre Région, Select a Brand Image first.,Sélectionner une Image de Marque en premier., Select a DocType to make a new format,Sélectionner un DocType pour faire un nouveau format, Select a chat to start messaging.,Sélectionnez une conversation pour démarrer la messagerie., -Select a group node first.,Sélectionner d'abord un noeud de groupe, +Select a group node first.,Sélectionner d'abord un niveau parent, Select an existing format to edit or start a new format.,Sélectionner un format existant pour le modifier ou pour démarrer un nouveau format., Select an image of approx width 150px with a transparent background for best results.,Sélectionner une image d'une largeur d'environ 150px avec un fond transparent pour de meilleurs résultats., Select atleast 1 record for printing,Sélectionner au moins 1 enregistrement pour l'impression, @@ -3334,10 +3334,10 @@ Google Drive Integration.,Intégration de Google Drive., Google Drive has been configured.,Google Drive a été configuré., Google Integration is disabled.,L'intégration de Google est désactivée., Google Settings,Paramètres Google, -Group By,Par groupe, +Group By,Grouper par, Group By Based On,Grouper par basé sur, Group By Type,Regrouper par type, -Group By field is required to create a dashboard chart,Le champ Group By est requis pour créer un tableau de bord, +Group By field is required to create a dashboard chart,Le champ Grouper par est requis pour créer un tableau de bord, HH:mm,HH: mm, HH:mm:ss,HH: mm: ss, HOOK-.####,CROCHET-.####, @@ -3681,7 +3681,6 @@ Cancelled,Annulé, Chart,Graphique, Close,Fermer, Communication,la communication, -Compact Item Print,Impression de l'Article Compacté, Company,Société, Complete,Terminé, Completed,Terminé, @@ -3716,7 +3715,7 @@ Filters,Filtres, Get Items,Obtenir les Articles, Goal,Objectif, Group,Groupe, -Group Node,Noeud de Groupe, +Group Node,Niveau parent, Help,Aidez-moi, Help Article,Article d’Aide, Home,Accueil, @@ -3740,20 +3739,19 @@ Page {0} of {1},Page {0} sur {1}, Pending,En Attente, Phone,Téléphone, Please click on the following link to set your new password,Veuillez cliquer sur le lien suivant pour définir votre nouveau mot de passe, -Please select another payment method. Stripe does not support transactions in currency '{0}',Veuillez sélectionner une autre méthode de paiement. Stripe ne prend pas en charge les transactions en devise '{0}', Please specify,Veuillez spécifier, Printing,Impression, Priority,Priorité, Project,Projet, Quarterly,Trimestriel, -Queued,File d'Attente, -Quick Entry,Écriture Rapide, +Queued,Dans la file d'attente, +Quick Entry,Écriture rapide, Reason,Raison, Refreshing,Actualisation, Rename,Renommer, Reset,Réinitialiser, -Review,La revue, -Save,sauvegarder, +Review,Révoir, +Save,Sauvegarder, Search results for,Résultats de recherche pour, Select All,Sélectionner Tout, Send,Envoyer, @@ -3795,7 +3793,7 @@ Bold,Audacieux, CANCELLED,ANNULÉ, Calendar,Calendrier, Center,Centre, -Clear,Clair, +Clear,Nettoyer, Comment,Commentaire, Comments,Commentaires, DRAFT,BROUILLON, @@ -4145,7 +4143,6 @@ Linked Documents,Documents liés, Steps,Pas, email,email, Component,Composant, -Subtitle,Sous-titre, Prefix,Préfixe, Is Public,Est public, This chart will be available to all Users if this is set,Ce graphique sera disponible pour tous les utilisateurs si cela est défini, @@ -4439,7 +4436,7 @@ Add Space on Top,Ajouter de l'espace sur le dessus, Add Space on Bottom,Ajouter de l'espace en bas, Is Unique,Est unique, User Agent,Agent utilisateur, -Table Break,Pause de table, +Table Break,Saut de tableau, Hide Login,Masquer la connexion, Navbar Template,Modèle de barre de navigation, Navbar Template Values,Valeurs du modèle de barre de navigation, @@ -4585,7 +4582,6 @@ Shared with the following Users with Read access:{0},Partagé avec les utilisate Already in the following Users ToDo list:{0},Déjà dans la liste des tâches des utilisateurs suivante: {0}, Your assignment on {0} {1} has been removed by {2},Votre devoir sur {0} {1} a été supprimé par {2}, Invalid Credentials,Les informations d'identification invalides, -Print UOM after Quantity,Imprimer UdM après la quantité, Uncaught Server Exception,Exception de serveur non interceptée, There was an error building this page,Une erreur s'est produite lors de la construction de cette page, Hide Traceback,Masquer le traçage, From 5f5bfd008628ec5482984c0dc09acd4297347dfc Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:24:57 +0200 Subject: [PATCH 005/126] fix: change outline of like icon to gray-800 For consistency with other icons --- frappe/public/scss/common/icons.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/frappe/public/scss/common/icons.scss b/frappe/public/scss/common/icons.scss index 487078024a..21054f3a68 100644 --- a/frappe/public/scss/common/icons.scss +++ b/frappe/public/scss/common/icons.scss @@ -22,7 +22,7 @@ use.like-icon { --icon-stroke: transparent; cursor: pointer; - stroke: var(--gray-600); + stroke: var(--gray-800); } #icon-file-large { @@ -44,7 +44,6 @@ use.like-icon { .liked { use.like-icon { --icon-stroke: var(--red-500); - stroke: var(--icon-stroke); fill: var(--icon-stroke); } } From b8677d8d56adb31a6a2705fe5f09a618b393933e Mon Sep 17 00:00:00 2001 From: barredterra <14891507+barredterra@users.noreply.github.com> Date: Sat, 7 Oct 2023 11:46:49 +0200 Subject: [PATCH 006/126] fix: vertically center icon and count --- .../js/frappe/form/templates/form_sidebar.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/frappe/public/js/frappe/form/templates/form_sidebar.html b/frappe/public/js/frappe/form/templates/form_sidebar.html index 7a8416204a..6e6cb80be1 100644 --- a/frappe/public/js/frappe/form/templates/form_sidebar.html +++ b/frappe/public/js/frappe/form/templates/form_sidebar.html @@ -136,21 +136,21 @@