Photo by Sean O’Kane / The Verge

The company failed to give 60 days' notice for a mass layoffs, according to the lawsuit.

The lawsuit was filed after it was announced that the hourly workers would not be affected by the layoffs.

John Lynch and Daxton Hartsfield were both laid off from their jobs at the Gigafactory. More than 500 employees were terminated from the Gigafactory.

The two former employees allege they were among “more than 500” Gigafactory employees who were terminated

The mass layoffs violate the Worker Adjustment and Retraining Notification Act, which requires employers to notify workers at least 60 days in advance before shutting down a facility or laying off 50 or more workers from the same site.

The class members were not given an advance written notice of their dismissals. The employees were told that they would be terminated immediately. The basis for the reduction of the notification period to zero days advance notice was not provided by the company.

Sixty days worth of pay and benefits is what the former employees want. They are trying to get class-action status for their lawsuit for the people who were terminated without notice.

This followed a company-wide email by Musk detailing a worldwide hiring freeze and a plan to slash the company's workforce. Musk stated in the email that he had a bad feeling about the economy.

It was thought that hourly workers would not be affected by the layoffs. According to the company-wide email sent on June 3rd, there will be a reduction in the number of employees.

Initially, it appeared that Tesla’s hourly workers would be spared from the layoffs

Musk responded to a statement aboutTesla's staffing over the next 12 months by saying that the total headcount will increase, but that the salary should not change. The hourly workers started to trickle out this past weekend.

Musk's company may have run afoul of US labor laws twice. The employees who were fired were involved in writing an open letter about Musk. Several labor lawyers said that the firings may have violated federal law.