Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Default Event Duration - Request. #51

Closed
Jacob-Daniel opened this issue Sep 30, 2024 · 4 comments
Closed

Custom Default Event Duration - Request. #51

Jacob-Daniel opened this issue Sep 30, 2024 · 4 comments
Assignees
Labels
enhancement New feature or request

Comments

@Jacob-Daniel
Copy link

Jacob-Daniel commented Sep 30, 2024

Hi,

Thanks for your work on this.

I am wanting to use this plugin for a campsite booking application, I would like to set the Default Duration to allDay. I have run into trouble trying to set this up:

Summary of Issues

Environment:
Strapi Version: 4.25.x
Plugin Name: @offset-dev/strapi-calendar
Steps Taken:
Installation of the Plugin:

Installed @offset-dev/strapi-calendar using a package manager (pnpm).

At this point, the install is all good and the plugin is available in admin.

Initial Plugin Configuration:
Configured the plugin in config/plugins.js:

module.exports = ({ env }) => ({
  "strapi-calendar": {
    enabled: true,
  },
});

Encountered the following error:

Error: Error loading the plugin strapi-calendar because strapi-calendar is not installed.
Adjusting Plugin Name, modified the configuration to:

module.exports = ({ env }) => ({
  "@offset-dev/strapi-calendar": {
    enabled: true,
  },
});

Received the error:

Error: Plugin name "@offset-dev/strapi-calendar" is not in kebab (an-example-of-kebab-case).
Using Kebab-Case:

Attempted to set the plugin in kebab-case with:

module.exports = ({ env }) => ({
  'strapi-calendar': {
    enabled: true,
    defaultDuration: 1440, // Set full day to 24 hours
  },
});

Encountered the same error regarding installation:

Error: Error loading the plugin strapi-calendar because strapi-calendar is not installed.
Custom Resolve Path:

Attempted to resolve the plugin using a custom path:

module.exports = ({ env }) => ({
  'strapi-calendar': {
    enabled: true,
    resolve: './src/plugins/@offset-dev/strapi-calendar',
  },
});

Received the same installation error.
Error Details:

Error: Plugin not installed despite verification that the plugin was included in the project.
Error: Plugin name not in the expected kebab-case format.
Error: Issues with loading the plugin configuration leading to a failure in starting Strapi.

Current Status:
The Strapi application fails to start due to plugin configuration issues, specifically with naming conventions and installation recognition.

Thank you,

Jacob

@LuisRodriguezLD
Copy link
Contributor

Hey Jacob,
Sounds like you are wanting to override the code in this plugin, for that you might need a different approach.
I would recommend cloning the repo and using yalc to link your strapi app and your calendar plugin. More info on that here

@Jacob-Daniel
Copy link
Author

Hi Luis,

Thanks for the quick reply, that is helpful.

Would it be helpful to extend the plugin/ create a fork to add

view.settings.section.general.default-duration.fullDay

I have not worked on a open-source project before, would be happy to have a look into it.

Jacob

@LuisRodriguezLD
Copy link
Contributor

Yes, that sounds like a great idea!
Please make a PR and I'll be happy to review as soon as I can.

@LuisRodriguezLD LuisRodriguezLD added enhancement New feature or request in progress We are currently working on this item labels Sep 30, 2024
@LuisRodriguezLD
Copy link
Contributor

Completed #52

@LuisRodriguezLD LuisRodriguezLD added enhancement New feature or request and removed enhancement New feature or request in progress We are currently working on this item labels Oct 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants