Skip to content

Commit

Permalink
fix deprecation done function
Browse files Browse the repository at this point in the history
  • Loading branch information
yurikuzn committed Nov 11, 2024
1 parent fc30841 commit 33fd440
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,9 @@
* these Appropriate Legal Notices must retain the display of the "EspoCRM" word.
************************************************************************/

Espo.define('real-estate:views/real-estate-property/list-matching', ['views/main', 'search-manager', 'real-estate:views/real-estate-property/record/panels/matching-requests'], function (Dep, SearchManager, Panel) {
define('real-estate:views/real-estate-property/list-matching',
['views/main', 'search-manager', 'real-estate:views/real-estate-property/record/panels/matching-requests'],
function (Dep, SearchManager, Panel) {

return Dep.extend({

Expand Down Expand Up @@ -55,20 +57,20 @@ Espo.define('real-estate:views/real-estate-property/list-matching', ['views/main
var countLoaded = 0;

var proceed = function () {
if (countLoaded == 2) {
if (countLoaded === 2) {
this.wait(false);
}
}.bind(this);

this.getModelFactory().create('RealEstateProperty', function (model) {
this.getModelFactory().create('RealEstateProperty', (model) => {
this.model = model;
model.id = this.options.id;

this.model.fetch().done(function () {
this.model.fetch().then(() => {
countLoaded++;
proceed();
}.bind(this));
}, this);
});
});

this.getCollectionFactory().create('RealEstateRequest', function (collection) {
this.collection = collection;
Expand Down Expand Up @@ -204,4 +206,3 @@ Espo.define('real-estate:views/real-estate-property/list-matching', ['views/main

});
});

Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Espo.define('real-estate:views/real-estate-request/list-matching', ['views/main'
this.model = model;
model.id = this.options.id;

this.model.fetch().done(function () {
this.model.fetch().then(function () {
countLoaded++;
proceed();
}.bind(this));
Expand Down

0 comments on commit 33fd440

Please sign in to comment.