This commit is contained in:
mamoss 2025-05-21 14:15:56 +07:00
parent 3f90f6cad9
commit 358290e24a

View file

@ -1494,14 +1494,13 @@ export class ProfileSalaryTempController extends Controller {
*
*/
@Put("change/sort/{profileId}")
async Sort(@Path() profileId: string, @Body() requestBody: { id: string[] }) {
public async changeSortEditAll(@Path() profileId: string, @Body() requestBody: { id: string[] }) {
const salary = await this.salaryRepo.find({
where: { profileId: profileId },
});
const sortLevel = salary.map((data) => ({
...data,
id: data.id,
order: requestBody.id.indexOf(data.id) + 1,
}));