Hours before retail employees punch in for their stores’ hectic Thanksgiving and Black Friday shifts, the San Francisco Board of Supervisors approved new protections for the city’s retail workers.

The supervisors voted unanimously on Tuesday afternoon in favor of measures aimed at giving retail staffers more predictable schedules and access to extra hours. The ordinances will require businesses to post workers’ schedules at least two weeks in advance. Workers will receive compensation for last-minute schedule changes, “on-call” hours, and instances in which they’re sent home before completing their assigned shifts.

Businesses must also offer existing part-time workers additional hours before hiring new employees, and they are required to give part-timers and full-timers equal access to scheduling and time-off requests. The legislation will apply to retail chains with 20 or more locations nationally or worldwide and that have at least 20 employees in San Francisco under one management system. David Chiu, president of the Board of Supervisors, told Fortune on Tuesday that the proposal will affect approximately 5% of the city’s workforce.

The San Francisco Chamber of Commerce has opposed the bill, arguing that it is too onerous for business owners. In particular, the Chamber has taken issue with the limits the new requirements will impose on employers’ staffing decisions.

Now that it has board approval, the proposal just needs the signature of Mayor Ed Lee, a Democrat, to become law. Even if the mayor rejects the legislation, which is unlikely, the measure has enough support among the city’s supervisors to override a veto.

While the action San Francisco is set to take on workers’ behalf is the first of its kind, one aspect of the legislation has precedent. Last year, voters in SeaTac, Wash. approved a measure that requires companies to offer more hours to part-time workers before they hire new employees. They voted for it as part of a ballot initiative to increase the minimum wage to $15 per hour, one of the nation’s highest rates.

If San Francisco’s retail worker bill becomes law, it will make a city already known as worker-friendly even more so. Earlier this month, 59% of voters cast ballots in favor of increasing San Francisco’s current minimum wage of $10.74 to $15 by 2017.

San Francisco’s proposal takes sharp aim at employers’ tendency to schedule workers’ hours with little notice—a practice especially prevalent in retail. Earlier this year, University of Chicago professors found that employers determined the work schedules of about half of young adults without employee input, which resulted in part-time schedules that fluctuated between 17 and 28 hours per week. Forty-seven percent of employees ages 26 to 32 who work part time receive one week or less in advance notice of the hours they’re expected to work, according to the Bureau of Labor Statistics.

Congress attempted to tackle this issue at the federal level in July when they proposed legislation that would give retail workers more predictable hours. “Workers need scheduling predictability so they can arrange for child care, pick up kids from school, or take an elderly parent to the doctor,” co-sponsor Representative George Miller, a Democrat from California, said at the time. But the “Schedules that Work” bill has gone nowhere since it was introduced.