Whenever it is claimed by any person that he or she has been unlawfully demoted, suspended, laid off or discharged, and that person has filed an application for a hearing as provided in Section 1016(c) and reinstatement or restoration to duty has been denied, the person may file a written claim for compensation and a demand for reinstatement. The claim and demand must be filed within 90 days from the date of the decision of the board following a hearing, or if no hearing is applied for, from the date on which it is claimed that the person was first illegally, wrongfully or invalidly demoted, laid off, suspended or discharged. The demand for reinstatement must be filed with the board and the claim for compensation must be filed with the City Clerk. Failure to file a demand for reinstatement with proof of filing with the board, within the time specified in this section, shall be a bar to any action to compel reinstatement. Proof of filing with the City Clerk of the claim for compensation within the time and in the manner specified shall be a condition precedent to any recovery of wages or salary claimed to be due on account of demotion, layoff, suspension or discharge. Except as provided in this section, claims for compensation shall conform to the requirements of Section 350.