jsgantt-improved icon indicating copy to clipboard operation
jsgantt-improved copied to clipboard

Sundays as free days?

Open navijo opened this issue 7 years ago • 10 comments

Hi, first of all, congratulations for your plugin. It is awesome in most aspects. Secondly, I have a question: Is there any way to get sundays as free days and don't count them on the duration?

Thanks!

navijo avatar Jan 12 '18 17:01 navijo

Nowdays is counting all days right? this is a good suggestion! thanks

mariohmol avatar Nov 28 '18 15:11 mariohmol

Can u suggest how to change this function to make it work?

  • https://github.com/jsGanttImproved/jsgantt-improved/blob/develop/src/task.ts#L307

Thinking that we have a config like

  • https://github.com/jsGanttImproved/jsgantt-improved/blob/develop/src/draw.ts#L48

mariohmol avatar Dec 26 '18 00:12 mariohmol

I do not know if I understood correctly, but I think this is about not having unworked days, like weekends, right?

If so, I've already made this implementation and can post here.

Taking advantage, I apologize to @mariohmol for the delay in the implementation of click events, I have been very busy, but now I will contribute more, with this excellent repository.

geeksilva97 avatar Feb 18 '19 12:02 geeksilva97

Hello guys, this is a bit old topic but wondering if this was sorted? If this not easy to implement maybe you may give us a 'pTaskDuration' field on the object. So we can supply the duration. Because on some charts we'd like to use as default (count weekends) and some of them we want to keep only 5 days.

Added pTaskDuration as an example.

g.AddTaskItemObject({
  pID: 1,
  pName: "Define Chart <strong>API</strong>",
  pStart: "2017-08-05",
  pEnd: "2017-08-16",
  pPlanStart: "2017-08-05",
  pPlanEnd: "2017-08-16",
  pTaskDuration:"10 days"
  pClass: "ggroupblack",
  pLink: "",
  pMile: 0,
  pRes: "Brian",
  pComp: 0,
  pGroup: 0,
  pParent: 0,
  pOpen: 1,
  pDepend: "",
  pCaption: "",
  pCost: 1000,
  pNotes: "Some Notes text",
  category: "My Category",
  sector: "Finance"
});

minasm avatar Aug 12 '19 12:08 minasm

Hi. but there is a pDuration field.. that does that.. no?

mariohmol avatar Aug 12 '19 13:08 mariohmol

@geeksilva97 do u still have the implementation for it? thanks!

mariohmol avatar Aug 12 '19 13:08 mariohmol

Yes I have, I've been allocated a lot of time on some projects. I will send a PR with an implementation for this feature.

geeksilva97 avatar Aug 12 '19 14:08 geeksilva97

kkkk thats ok mate =)

mariohmol avatar Aug 12 '19 14:08 mariohmol

How can I see the changes I made?

What's port for

npm run watch ?

geeksilva97 avatar Aug 12 '19 14:08 geeksilva97

run 2 terminals.. one with npm run watch and other with npm run start

mariohmol avatar Aug 12 '19 15:08 mariohmol