Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanvidrine committed Dec 3, 2024
2 parents dfe6064 + 5cd3452 commit 33b7522
Show file tree
Hide file tree
Showing 42 changed files with 1,871 additions and 2,890 deletions.
1 change: 0 additions & 1 deletion .eslintrc.cjs

This file was deleted.

73 changes: 38 additions & 35 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,80 +1,83 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (7.1.3.3)
activesupport (8.0.0)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
uri (>= 0.13.1)
ast (2.4.2)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.8)
concurrent-ruby (1.2.3)
concurrent-ruby (1.3.4)
connection_pool (2.4.1)
drb (2.2.1)
i18n (1.14.5)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
json (2.7.2)
json (2.8.2)
language_server-protocol (3.17.0.3)
minitest (5.23.1)
mutex_m (0.2.0)
parallel (1.24.0)
parser (3.3.1.0)
logger (1.6.1)
minitest (5.25.1)
parallel (1.26.3)
parser (3.3.6.0)
ast (~> 2.4.1)
racc
prettier_print (1.2.1)
racc (1.8.0)
rack (3.0.11)
racc (1.8.1)
rack (3.1.8)
rainbow (3.1.1)
regexp_parser (2.9.2)
rexml (3.3.9)
rubocop (1.64.0)
rubocop (1.68.0)
json (~> 2.3)
language_server-protocol (>= 3.17.0)
parallel (~> 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml (>= 3.2.5, < 4.0)
rubocop-ast (>= 1.31.1, < 2.0)
regexp_parser (>= 2.4, < 3.0)
rubocop-ast (>= 1.32.2, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 2.4.0, < 3.0)
rubocop-ast (1.31.3)
rubocop-ast (1.36.1)
parser (>= 3.3.1.0)
rubocop-capybara (2.20.0)
rubocop-capybara (2.21.0)
rubocop (~> 1.41)
rubocop-discourse (3.8.0)
rubocop-discourse (3.8.6)
activesupport (>= 6.1)
rubocop (>= 1.59.0)
rubocop-capybara (>= 2.0.0)
rubocop-factory_bot (>= 2.0.0)
rubocop-rails (>= 2.25.0)
rubocop-rspec (>= 2.25.0)
rubocop-factory_bot (2.25.1)
rubocop (~> 1.41)
rubocop-rails (2.25.0)
rubocop-rspec (>= 3.0.1)
rubocop-rspec_rails (>= 2.30.0)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-rails (2.27.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.33.0, < 2.0)
rubocop (>= 1.52.0, < 2.0)
rubocop-ast (>= 1.31.1, < 2.0)
rubocop-rspec (2.29.2)
rubocop (~> 1.40)
rubocop-capybara (~> 2.17)
rubocop-factory_bot (~> 2.22)
rubocop-rspec_rails (~> 2.28)
rubocop-rspec_rails (2.28.3)
rubocop (~> 1.40)
rubocop-rspec (3.2.0)
rubocop (~> 1.61)
rubocop-rspec_rails (2.30.0)
rubocop (~> 1.61)
rubocop-rspec (~> 3, >= 3.0.1)
ruby-progressbar (1.13.0)
securerandom (0.3.2)
syntax_tree (6.2.0)
prettier_print (>= 1.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
unicode-display_width (2.5.0)
unicode-display_width (2.6.0)
uri (1.0.2)

PLATFORMS
ruby
Expand All @@ -84,4 +87,4 @@ DEPENDENCIES
syntax_tree

BUNDLED WITH
2.5.10
2.5.18
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{{#if
(or
siteSettings.sort_categories_by_event_start_date_enabled
siteSettings.disable_resorting_on_categories_enabled
this.siteSettings.sort_categories_by_event_start_date_enabled
this.siteSettings.disable_resorting_on_categories_enabled
)
}}
<section>
<h3>{{i18n
"discourse_post_event.category.settings_sections.event_sorting"
}}</h3>

{{#if siteSettings.sort_categories_by_event_start_date_enabled}}
{{#if this.siteSettings.sort_categories_by_event_start_date_enabled}}
<section class="field show-subcategory-list-field">
<label>
<Input
Expand All @@ -23,7 +23,7 @@
</section>
{{/if}}

{{#if siteSettings.disable_resorting_on_categories_enabled}}
{{#if this.siteSettings.disable_resorting_on_categories_enabled}}
<section class="field show-subcategory-list-field">
<label>
<Input
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import RestAdapter from "discourse/adapters/rest";

export default RestAdapter.extend({
export default class DiscoursePostEventAdapter extends RestAdapter {
basePath() {
return "/discourse-post-event/";
},
});
}
}
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { underscore } from "@ember/string";
import DiscoursePostEventAdapter from "./discourse-post-event-adapter";

export default DiscoursePostEventAdapter.extend({
export default class DiscoursePostEventEvent extends DiscoursePostEventAdapter {
pathFor(store, type, findArgs) {
const path =
this.basePath(store, type, findArgs) +
underscore(store.pluralize(this.apiNameFor(type)));
return this.appendQueryParams(path, findArgs);
},
}

apiNameFor() {
return "event";
},
});
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DiscoursePostEventNestedAdapter from "./discourse-post-event-nested-adapter";

export default DiscoursePostEventNestedAdapter.extend({
export default class DiscoursePostEventInvitee extends DiscoursePostEventNestedAdapter {
apiNameFor() {
return "invitee";
},
});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { Result } from "discourse/adapters/rest";
import { ajax } from "discourse/lib/ajax";
import DiscoursePostEventAdapter from "./discourse-post-event-adapter";

export default DiscoursePostEventAdapter.extend({
export default class DiscoursePostEventNestedAdapter extends DiscoursePostEventAdapter {
// TODO: destroy/update/create should be improved in core to allow for nested models
destroyRecord(store, type, record) {
return ajax(
Expand All @@ -15,7 +15,7 @@ export default DiscoursePostEventAdapter.extend({
type: "DELETE",
}
);
},
}

update(store, type, id, attrs) {
const data = {};
Expand All @@ -28,7 +28,7 @@ export default DiscoursePostEventAdapter.extend({
).then(function (json) {
return new Result(json[typeField], json);
});
},
}

createRecord(store, type, attrs) {
const data = {};
Expand All @@ -40,7 +40,7 @@ export default DiscoursePostEventAdapter.extend({
).then(function (json) {
return new Result(json[typeField], json);
});
},
}

pathFor(store, type, findArgs) {
const post_id = findArgs["post_id"];
Expand All @@ -61,5 +61,5 @@ export default DiscoursePostEventAdapter.extend({
}

return this.appendQueryParams(path, findArgs);
},
});
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import DiscoursePostEventNestedAdapter from "./discourse-post-event-nested-adapter";

export default DiscoursePostEventNestedAdapter.extend({
export default class DiscoursePostEventReminder extends DiscoursePostEventNestedAdapter {
apiNameFor() {
return "reminder";
},
});
}
}
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<td>{{holiday.date}}</td>
<td>{{holiday.name}}</td>
<td>{{this.holiday.date}}</td>
<td>{{this.holiday.name}}</td>
<td>
{{#if isHolidayDisabled}}
{{#if this.isHolidayDisabled}}
<DButton
@action={{action "enableHoliday" holiday region_code}}
@action={{action "enableHoliday" this.holiday this.region_code}}
@label="discourse_calendar.enable_holiday"
/>
{{else}}
<DButton
@action={{action "disableHoliday" holiday region_code}}
@action={{action "disableHoliday" this.holiday this.region_code}}
@label="discourse_calendar.disable_holiday"
/>
{{/if}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import Component from "@ember/component";
import { action } from "@ember/object";
import { classNameBindings, tagName } from "@ember-decorators/component";
import { ajax } from "discourse/lib/ajax";
import { popupAjaxError } from "discourse/lib/ajax-error";

export default Component.extend({
tagName: "tr",
classNameBindings: ["isHolidayDisabled:disabled"],
loading: false,
isHolidayDisabled: false,
@tagName("tr")
@classNameBindings("isHolidayDisabled:disabled")
export default class AdminHolidaysListItem extends Component {
loading = false;
isHolidayDisabled = false;

@action
disableHoliday(holiday, region_code) {
Expand All @@ -25,7 +26,7 @@ export default Component.extend({
.then(() => this.set("isHolidayDisabled", true))
.catch(popupAjaxError)
.finally(() => this.set("loading", false));
},
}

@action
enableHoliday(holiday, region_code) {
Expand All @@ -43,5 +44,5 @@ export default Component.extend({
.then(() => this.set("isHolidayDisabled", false))
.catch(popupAjaxError)
.finally(() => this.set("loading", false));
},
});
}
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from "@ember/component";
import { action } from "@ember/object";

export default Component.extend({
export default class BulkInviteSampleCsvFile extends Component {
@action
downloadSampleCsv() {
const sampleData = [
Expand All @@ -23,5 +23,5 @@ export default Component.extend({
btn.rel = "noopener noreferrer";
btn.download = "bulk-invite-sample.csv";
btn.click();
},
});
}
}
2 changes: 1 addition & 1 deletion assets/javascripts/discourse/components/csv-uploader.gjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { getOwner } from "@ember/owner";
import didInsert from "@ember/render-modifiers/modifiers/did-insert";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { or } from "truth-helpers";
import UppyUpload from "discourse/lib/uppy/uppy-upload";
import icon from "discourse-common/helpers/d-icon";
Expand Down
2 changes: 1 addition & 1 deletion assets/javascripts/discourse/components/event-date.gjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import Component from "@glimmer/component";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import I18n from "discourse-i18n";
import guessDateFormat from "../lib/guess-best-date-format";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { extractError } from "discourse/lib/ajax-error";
import { cook } from "discourse/lib/text";
import Group from "discourse/models/group";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import Component from "@glimmer/component";
import { tracked } from "@glimmer/tracking";
import EmberObject, { action } from "@ember/object";
import { inject as service } from "@ember/service";
import { service } from "@ember/service";
import { isPresent } from "@ember/utils";
import { TrackedArray } from "@ember-compat/tracked-built-ins";
import { ajax } from "discourse/lib/ajax";
Expand Down Expand Up @@ -107,6 +107,7 @@ export default class PostEventBulkInvite extends Component {
bulkInvite.identifier = selected[0];
this.setBulkInviteDisabled();
}

@action
updateBulkGroupInviteIdentifier(bulkInvite, _, groupNames) {
bulkInvite.identifier = groupNames[0];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ export default class PostEventInviteesModal extends Component {
this.isLoading = false;
}
}

<template>
<DModal
@title={{this.title}}
Expand Down
Loading

0 comments on commit 33b7522

Please sign in to comment.